summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice/libimobiledevice.h
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-03-16 03:13:38 +0100
committerGravatar Martin Szulecki2010-03-16 03:13:38 +0100
commit08d2af5d611319748afba2aaba5e6c8a99f1b396 (patch)
tree8bf4a3533f2acf11368dc37a9c653689ace99b77 /include/libimobiledevice/libimobiledevice.h
parent3e0c5021100c879ff7d0776d4c7bb4f0ec88e0d7 (diff)
downloadlibimobiledevice-08d2af5d611319748afba2aaba5e6c8a99f1b396.tar.gz
libimobiledevice-08d2af5d611319748afba2aaba5e6c8a99f1b396.tar.bz2
Complete documentation of public interface and fix a lot of bogus comments
This change unifies the documentation comment syntax, fixes a few bad documentation comments and completes documentation where it was missing.
Diffstat (limited to 'include/libimobiledevice/libimobiledevice.h')
-rw-r--r--include/libimobiledevice/libimobiledevice.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/include/libimobiledevice/libimobiledevice.h b/include/libimobiledevice/libimobiledevice.h
index 73e82fe..0c6a08f 100644
--- a/include/libimobiledevice/libimobiledevice.h
+++ b/include/libimobiledevice/libimobiledevice.h
@@ -1,6 +1,6 @@
1/** 1/**
2 * @file libimobiledevice/libimobiledevice.h 2 * @file libimobiledevice/libimobiledevice.h
3 * @brief Common code and device handling 3 * @brief Device/Connection handling and communication
4 * \internal 4 * \internal
5 * 5 *
6 * Copyright (c) 2008 Jonathan Beck All Rights Reserved. 6 * Copyright (c) 2008 Jonathan Beck All Rights Reserved.
@@ -32,7 +32,8 @@ extern "C" {
32#include <sys/stat.h> 32#include <sys/stat.h>
33#include <plist/plist.h> 33#include <plist/plist.h>
34 34
35/* Error Codes */ 35/** @name Error Codes */
36/*@{*/
36#define IDEVICE_E_SUCCESS 0 37#define IDEVICE_E_SUCCESS 0
37#define IDEVICE_E_INVALID_ARG -1 38#define IDEVICE_E_INVALID_ARG -1
38#define IDEVICE_E_UNKNOWN_ERROR -2 39#define IDEVICE_E_UNKNOWN_ERROR -2
@@ -40,7 +41,9 @@ extern "C" {
40#define IDEVICE_E_NOT_ENOUGH_DATA -4 41#define IDEVICE_E_NOT_ENOUGH_DATA -4
41#define IDEVICE_E_BAD_HEADER -5 42#define IDEVICE_E_BAD_HEADER -5
42#define IDEVICE_E_SSL_ERROR -6 43#define IDEVICE_E_SSL_ERROR -6
44/*@}*/
43 45
46/** Represents an error code. */
44typedef int16_t idevice_error_t; 47typedef int16_t idevice_error_t;
45 48
46typedef struct idevice_private idevice_private; 49typedef struct idevice_private idevice_private;
@@ -53,23 +56,25 @@ typedef idevice_connection_private *idevice_connection_t; /**< The connection ha
53void idevice_set_debug_level(int level); 56void idevice_set_debug_level(int level);
54 57
55/* discovery (events/asynchronous) */ 58/* discovery (events/asynchronous) */
56// event type 59/** The event type for device add or removal */
57enum idevice_event_type { 60enum idevice_event_type {
58 IDEVICE_DEVICE_ADD = 1, 61 IDEVICE_DEVICE_ADD = 1,
59 IDEVICE_DEVICE_REMOVE 62 IDEVICE_DEVICE_REMOVE
60}; 63};
61 64
62// event data structure 65/* event data structure */
66/** Provides information about the occoured event. */
63typedef struct { 67typedef struct {
64 enum idevice_event_type event; 68 enum idevice_event_type event; /**< The event type. */
65 const char *uuid; 69 const char *uuid; /**< The device unique id. */
66 int conn_type; 70 int conn_type; /**< The connection type. Currently only 1 for usbmuxd. */
67} idevice_event_t; 71} idevice_event_t;
68 72
69// event callback function prototype 73/* event callback function prototype */
74/** Callback to notifiy if a device was added or removed. */
70typedef void (*idevice_event_cb_t) (const idevice_event_t *event, void *user_data); 75typedef void (*idevice_event_cb_t) (const idevice_event_t *event, void *user_data);
71 76
72// functions 77/* functions */
73idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data); 78idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data);
74idevice_error_t idevice_event_unsubscribe(); 79idevice_error_t idevice_event_unsubscribe();
75 80