diff options
| author | 2014-03-27 10:07:09 -0400 | |
|---|---|---|
| committer | 2014-03-27 21:40:43 -0400 | |
| commit | 2342dc5b4ef148b993fbe3816f3facdef8365546 (patch) | |
| tree | 69f812d91b2fc07db0fad5dcba6c80d2f8b6849e /include/libimobiledevice/heartbeat.h | |
| parent | ee82e861a8c942b5013accd7589cf898d1f97167 (diff) | |
| download | libimobiledevice-2342dc5b4ef148b993fbe3816f3facdef8365546.tar.gz libimobiledevice-2342dc5b4ef148b993fbe3816f3facdef8365546.tar.bz2 | |
Moved Doxygen comments from source files to public headers.
Conflicts:
include/libimobiledevice/afc.h
Diffstat (limited to 'include/libimobiledevice/heartbeat.h')
| -rw-r--r-- | include/libimobiledevice/heartbeat.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/include/libimobiledevice/heartbeat.h b/include/libimobiledevice/heartbeat.h index 8db2941..c943e51 100644 --- a/include/libimobiledevice/heartbeat.h +++ b/include/libimobiledevice/heartbeat.h | |||
| @@ -48,12 +48,84 @@ typedef int16_t heartbeat_error_t; | |||
| 48 | typedef struct heartbeat_client_private heartbeat_client_private; | 48 | typedef struct heartbeat_client_private heartbeat_client_private; |
| 49 | typedef heartbeat_client_private *heartbeat_client_t; /**< The client handle. */ | 49 | typedef heartbeat_client_private *heartbeat_client_t; /**< The client handle. */ |
| 50 | 50 | ||
| 51 | /** | ||
| 52 | * Connects to the heartbeat service on the specified device. | ||
| 53 | * | ||
| 54 | * @param device The device to connect to. | ||
| 55 | * @param service The service descriptor returned by lockdownd_start_service. | ||
| 56 | * @param client Pointer that will point to a newly allocated | ||
| 57 | * heartbeat_client_t upon successful return. Must be freed using | ||
| 58 | * heartbeat_client_free() after use. | ||
| 59 | * | ||
| 60 | * @return HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when | ||
| 61 | * client is NULL, or an HEARTBEAT_E_* error code otherwise. | ||
| 62 | */ | ||
| 51 | heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descriptor_t service, heartbeat_client_t * client); | 63 | heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descriptor_t service, heartbeat_client_t * client); |
| 64 | |||
| 65 | /** | ||
| 66 | * Starts a new heartbeat service on the specified device and connects to it. | ||
| 67 | * | ||
| 68 | * @param device The device to connect to. | ||
| 69 | * @param client Pointer that will point to a newly allocated | ||
| 70 | * heartbeat_client_t upon successful return. Must be freed using | ||
| 71 | * heartbeat_client_free() after use. | ||
| 72 | * @param label The label to use for communication. Usually the program name. | ||
| 73 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 74 | * | ||
| 75 | * @return HEARTBEAT_E_SUCCESS on success, or an HEARTBEAT_E_* error | ||
| 76 | * code otherwise. | ||
| 77 | */ | ||
| 52 | heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client, const char* label); | 78 | heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client, const char* label); |
| 79 | |||
| 80 | /** | ||
| 81 | * Disconnects a heartbeat client from the device and frees up the | ||
| 82 | * heartbeat client data. | ||
| 83 | * | ||
| 84 | * @param client The heartbeat client to disconnect and free. | ||
| 85 | * | ||
| 86 | * @return HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when | ||
| 87 | * client is NULL, or an HEARTBEAT_E_* error code otherwise. | ||
| 88 | */ | ||
| 53 | heartbeat_error_t heartbeat_client_free(heartbeat_client_t client); | 89 | heartbeat_error_t heartbeat_client_free(heartbeat_client_t client); |
| 54 | 90 | ||
| 91 | |||
| 92 | /** | ||
| 93 | * Sends a plist to the service. | ||
| 94 | * | ||
| 95 | * @param client The heartbeat client | ||
| 96 | * @param plist The plist to send | ||
| 97 | * | ||
| 98 | * @return HEARTBEAT_E_SUCCESS on success, | ||
| 99 | * HEARTBEAT_E_INVALID_ARG when client or plist is NULL | ||
| 100 | */ | ||
| 55 | heartbeat_error_t heartbeat_send(heartbeat_client_t client, plist_t plist); | 101 | heartbeat_error_t heartbeat_send(heartbeat_client_t client, plist_t plist); |
| 102 | |||
| 103 | /** | ||
| 104 | * Receives a plist from the service. | ||
| 105 | * | ||
| 106 | * @param client The heartbeat client | ||
| 107 | * @param plist The plist to store the received data | ||
| 108 | * | ||
| 109 | * @return HEARTBEAT_E_SUCCESS on success, | ||
| 110 | * HEARTBEAT_E_INVALID_ARG when client or plist is NULL | ||
| 111 | */ | ||
| 56 | heartbeat_error_t heartbeat_receive(heartbeat_client_t client, plist_t * plist); | 112 | heartbeat_error_t heartbeat_receive(heartbeat_client_t client, plist_t * plist); |
| 113 | |||
| 114 | /** | ||
| 115 | * Receives a plist using the given heartbeat client. | ||
| 116 | * | ||
| 117 | * @param client The heartbeat client to use for receiving | ||
| 118 | * @param plist pointer to a plist_t that will point to the received plist | ||
| 119 | * upon successful return | ||
| 120 | * @param timeout Maximum time in milliseconds to wait for data. | ||
| 121 | * | ||
| 122 | * @return HEARTBEAT_E_SUCCESS on success, | ||
| 123 | * HEARTBEAT_E_INVALID_ARG when client or *plist is NULL, | ||
| 124 | * HEARTBEAT_E_PLIST_ERROR when the received data cannot be | ||
| 125 | * converted to a plist, HEARTBEAT_E_MUX_ERROR when a | ||
| 126 | * communication error occurs, or HEARTBEAT_E_UNKNOWN_ERROR | ||
| 127 | * when an unspecified error occurs. | ||
| 128 | */ | ||
| 57 | heartbeat_error_t heartbeat_receive_with_timeout(heartbeat_client_t client, plist_t * plist, uint32_t timeout_ms); | 129 | heartbeat_error_t heartbeat_receive_with_timeout(heartbeat_client_t client, plist_t * plist, uint32_t timeout_ms); |
| 58 | 130 | ||
| 59 | #ifdef __cplusplus | 131 | #ifdef __cplusplus |
