diff options
Diffstat (limited to 'include/libimobiledevice/notification_proxy.h')
-rw-r--r-- | include/libimobiledevice/notification_proxy.h | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/include/libimobiledevice/notification_proxy.h b/include/libimobiledevice/notification_proxy.h index a9d2d3f..f4f090b 100644 --- a/include/libimobiledevice/notification_proxy.h +++ b/include/libimobiledevice/notification_proxy.h @@ -31,6 +31,7 @@ extern "C" { #include <libimobiledevice/libimobiledevice.h> #include <libimobiledevice/lockdown.h> +/** Service identifier passed to lockdownd_start_service() to start the notification proxy service */ #define NP_SERVICE_NAME "com.apple.mobile.notification_proxy" /** Error Codes */ @@ -43,22 +44,26 @@ typedef enum { } np_error_t; /** - * @name Notifications that can be send + * @name Notifications that can be sent * * For use with np_post_notification() (client --> device) */ +/**@{*/ +//! @cond #define NP_SYNC_WILL_START "com.apple.itunes-mobdev.syncWillStart" #define NP_SYNC_DID_START "com.apple.itunes-mobdev.syncDidStart" #define NP_SYNC_DID_FINISH "com.apple.itunes-mobdev.syncDidFinish" #define NP_SYNC_LOCK_REQUEST "com.apple.itunes-mobdev.syncLockRequest" -/*@}*/ +//! @endcond +/**@}*/ /** * @name Notifications that can be received * * For use with np_observe_notification() (device --> client) */ -/*@{*/ +/**@{*/ +//! @cond #define NP_SYNC_CANCEL_REQUEST "com.apple.itunes-client.syncCancelRequest" #define NP_SYNC_SUSPEND_REQUEST "com.apple.itunes-client.syncSuspendRequest" #define NP_SYNC_RESUME_REQUEST "com.apple.itunes-client.syncResumeRequest" @@ -81,12 +86,13 @@ typedef enum { #define NP_ITDBPREP_DID_END "com.apple.itdbprep.notification.didEnd" #define NP_LANGUAGE_CHANGED "com.apple.language.changed" #define NP_ADDRESS_BOOK_PREF_CHANGED "com.apple.AddressBook.PreferenceChanged" -/*@}*/ +//! @endcond +/**@}*/ -typedef struct np_client_private np_client_private; +typedef struct np_client_private np_client_private; /**< \private */ typedef np_client_private *np_client_t; /**< The client handle. */ -/** Reports which notification was received. */ +/** Callback function that reports which notification was received. */ typedef void (*np_notify_cb_t) (const char *notification, void *user_data); /* Interface */ @@ -103,7 +109,7 @@ typedef void (*np_notify_cb_t) (const char *notification, void *user_data); * or NP_E_CONN_FAILED when the connection to the device could not be * established. */ -np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t service, np_client_t *client); +LIBIMOBILEDEVICE_API np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t service, np_client_t *client); /** * Starts a new notification proxy service on the specified device and connects to it. @@ -118,7 +124,7 @@ np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t servic * @return NP_E_SUCCESS on success, or an NP_E_* error * code otherwise. */ -np_error_t np_client_start_service(idevice_t device, np_client_t* client, const char* label); +LIBIMOBILEDEVICE_API np_error_t np_client_start_service(idevice_t device, np_client_t* client, const char* label); /** * Disconnects a notification_proxy client from the device and frees up the @@ -128,7 +134,7 @@ np_error_t np_client_start_service(idevice_t device, np_client_t* client, const * * @return NP_E_SUCCESS on success, or NP_E_INVALID_ARG when client is NULL. */ -np_error_t np_client_free(np_client_t client); +LIBIMOBILEDEVICE_API np_error_t np_client_free(np_client_t client); /** @@ -139,7 +145,7 @@ np_error_t np_client_free(np_client_t client); * * @return NP_E_SUCCESS on success, or an error returned by np_plist_send */ -np_error_t np_post_notification(np_client_t client, const char *notification); +LIBIMOBILEDEVICE_API np_error_t np_post_notification(np_client_t client, const char *notification); /** * Tells the device to send a notification on the specified event. @@ -150,7 +156,7 @@ np_error_t np_post_notification(np_client_t client, const char *notification); * @return NP_E_SUCCESS on success, NP_E_INVALID_ARG when client or * notification are NULL, or an error returned by np_plist_send. */ -np_error_t np_observe_notification(np_client_t client, const char *notification); +LIBIMOBILEDEVICE_API np_error_t np_observe_notification(np_client_t client, const char *notification); /** * Tells the device to send a notification on specified events. @@ -163,7 +169,7 @@ np_error_t np_observe_notification(np_client_t client, const char *notification) * @return NP_E_SUCCESS on success, NP_E_INVALID_ARG when client is null, * or an error returned by np_observe_notification. */ -np_error_t np_observe_notifications(np_client_t client, const char **notification_spec); +LIBIMOBILEDEVICE_API np_error_t np_observe_notifications(np_client_t client, const char **notification_spec); /** * This function allows an application to define a callback function that will @@ -187,7 +193,7 @@ np_error_t np_observe_notifications(np_client_t client, const char **notificatio * NP_E_INVALID_ARG when client is NULL, or NP_E_UNKNOWN_ERROR when * the callback thread could no be created. */ -np_error_t np_set_notify_callback(np_client_t client, np_notify_cb_t notify_cb, void *userdata); +LIBIMOBILEDEVICE_API np_error_t np_set_notify_callback(np_client_t client, np_notify_cb_t notify_cb, void *user_data); #ifdef __cplusplus } |