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/webinspector.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/webinspector.h')
| -rw-r--r-- | include/libimobiledevice/webinspector.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/include/libimobiledevice/webinspector.h b/include/libimobiledevice/webinspector.h index dfd4dd2..499e7f0 100644 --- a/include/libimobiledevice/webinspector.h +++ b/include/libimobiledevice/webinspector.h | |||
| @@ -48,12 +48,85 @@ typedef int16_t webinspector_error_t; | |||
| 48 | typedef struct webinspector_client_private webinspector_client_private; | 48 | typedef struct webinspector_client_private webinspector_client_private; |
| 49 | typedef webinspector_client_private *webinspector_client_t; /**< The client handle. */ | 49 | typedef webinspector_client_private *webinspector_client_t; /**< The client handle. */ |
| 50 | 50 | ||
| 51 | |||
| 52 | /** | ||
| 53 | * Connects to the webinspector service on the specified device. | ||
| 54 | * | ||
| 55 | * @param device The device to connect to. | ||
| 56 | * @param service The service descriptor returned by lockdownd_start_service. | ||
| 57 | * @param client Pointer that will point to a newly allocated | ||
| 58 | * webinspector_client_t upon successful return. Must be freed using | ||
| 59 | * webinspector_client_free() after use. | ||
| 60 | * | ||
| 61 | * @return WEBINSPECTOR_E_SUCCESS on success, WEBINSPECTOR_E_INVALID_ARG when | ||
| 62 | * client is NULL, or an WEBINSPECTOR_E_* error code otherwise. | ||
| 63 | */ | ||
| 51 | webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service_descriptor_t service, webinspector_client_t * client); | 64 | webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service_descriptor_t service, webinspector_client_t * client); |
| 65 | |||
| 66 | /** | ||
| 67 | * Starts a new webinspector service on the specified device and connects to it. | ||
| 68 | * | ||
| 69 | * @param device The device to connect to. | ||
| 70 | * @param client Pointer that will point to a newly allocated | ||
| 71 | * webinspector_client_t upon successful return. Must be freed using | ||
| 72 | * webinspector_client_free() after use. | ||
| 73 | * @param label The label to use for communication. Usually the program name. | ||
| 74 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 75 | * | ||
| 76 | * @return WEBINSPECTOR_E_SUCCESS on success, or an WEBINSPECTOR_E_* error | ||
| 77 | * code otherwise. | ||
| 78 | */ | ||
| 52 | webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client, const char* label); | 79 | webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client, const char* label); |
| 80 | |||
| 81 | /** | ||
| 82 | * Disconnects a webinspector client from the device and frees up the | ||
| 83 | * webinspector client data. | ||
| 84 | * | ||
| 85 | * @param client The webinspector client to disconnect and free. | ||
| 86 | * | ||
| 87 | * @return WEBINSPECTOR_E_SUCCESS on success, WEBINSPECTOR_E_INVALID_ARG when | ||
| 88 | * client is NULL, or an WEBINSPECTOR_E_* error code otherwise. | ||
| 89 | */ | ||
| 53 | webinspector_error_t webinspector_client_free(webinspector_client_t client); | 90 | webinspector_error_t webinspector_client_free(webinspector_client_t client); |
| 54 | 91 | ||
| 92 | |||
| 93 | /** | ||
| 94 | * Sends a plist to the service. | ||
| 95 | * | ||
| 96 | * @param client The webinspector client | ||
| 97 | * @param plist The plist to send | ||
| 98 | * | ||
| 99 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, | ||
| 100 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when client or plist is NULL | ||
| 101 | */ | ||
| 55 | webinspector_error_t webinspector_send(webinspector_client_t client, plist_t plist); | 102 | webinspector_error_t webinspector_send(webinspector_client_t client, plist_t plist); |
| 103 | |||
| 104 | /** | ||
| 105 | * Receives a plist from the service. | ||
| 106 | * | ||
| 107 | * @param client The webinspector client | ||
| 108 | * @param plist The plist to store the received data | ||
| 109 | * | ||
| 110 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, | ||
| 111 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when client or plist is NULL | ||
| 112 | */ | ||
| 56 | webinspector_error_t webinspector_receive(webinspector_client_t client, plist_t * plist); | 113 | webinspector_error_t webinspector_receive(webinspector_client_t client, plist_t * plist); |
| 114 | |||
| 115 | /** | ||
| 116 | * Receives a plist using the given webinspector client. | ||
| 117 | * | ||
| 118 | * @param client The webinspector client to use for receiving | ||
| 119 | * @param plist pointer to a plist_t that will point to the received plist | ||
| 120 | * upon successful return | ||
| 121 | * @param timeout Maximum time in milliseconds to wait for data. | ||
| 122 | * | ||
| 123 | * @return WEBINSPECTOR_E_SUCCESS on success, | ||
| 124 | * WEBINSPECTOR_E_INVALID_ARG when client or *plist is NULL, | ||
| 125 | * WEBINSPECTOR_E_PLIST_ERROR when the received data cannot be | ||
| 126 | * converted to a plist, WEBINSPECTOR_E_MUX_ERROR when a | ||
| 127 | * communication error occurs, or WEBINSPECTOR_E_UNKNOWN_ERROR | ||
| 128 | * when an unspecified error occurs. | ||
| 129 | */ | ||
| 57 | webinspector_error_t webinspector_receive_with_timeout(webinspector_client_t client, plist_t * plist, uint32_t timeout_ms); | 130 | webinspector_error_t webinspector_receive_with_timeout(webinspector_client_t client, plist_t * plist, uint32_t timeout_ms); |
| 58 | 131 | ||
| 59 | #ifdef __cplusplus | 132 | #ifdef __cplusplus |
