libimobiledevice  1.3.0-dirty
API Documentation - Return to Homepage
notification_proxy.h File Reference

Description

Observe and post notifications.

Macros

#define NP_SERVICE_NAME   "com.apple.mobile.notification_proxy"
 Service identifier passed to lockdownd_start_service() to start the notification proxy service.
 

Typedefs

typedef np_client_private * np_client_t
 The client handle.
 
typedef void(* np_notify_cb_t) (const char *notification, void *user_data)
 Callback function that reports which notification was received.
 

Enumerations

enum  np_error_t {
  NP_E_SUCCESS = 0 ,
  NP_E_INVALID_ARG = -1 ,
  NP_E_PLIST_ERROR = -2 ,
  NP_E_CONN_FAILED = -3 ,
  NP_E_UNKNOWN_ERROR = -256
}
 Error Codes.
 

Functions

np_error_t np_client_new (idevice_t device, lockdownd_service_descriptor_t service, np_client_t *client)
 Connects to the notification_proxy on the specified device.
 
np_error_t np_client_start_service (idevice_t device, np_client_t *client, const char *label)
 Starts a new notification proxy service on the specified device and connects to it.
 
np_error_t np_client_free (np_client_t client)
 Disconnects a notification_proxy client from the device and frees up the notification_proxy client data.
 
np_error_t np_post_notification (np_client_t client, const char *notification)
 Sends a notification to the device's notification_proxy.
 
np_error_t np_observe_notification (np_client_t client, const char *notification)
 Tells the device to send a notification on the specified event.
 
np_error_t np_observe_notifications (np_client_t client, const char **notification_spec)
 Tells the device to send a notification on specified events.
 
np_error_t np_set_notify_callback (np_client_t client, np_notify_cb_t notify_cb, void *user_data)
 This function allows an application to define a callback function that will be called when a notification has been received.