summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice/diagnostics_relay.h
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2022-04-12 02:26:34 +0200
committerGravatar Nikias Bassen2022-04-12 02:26:34 +0200
commitdca3cf8c5bd804bf563fd43a6cdfdb1a5b85d490 (patch)
tree56a21e7f928fd20da792772d8a899c7f3df64db7 /include/libimobiledevice/diagnostics_relay.h
parentea6084c4ed624b6191b4b47737e33d88911bebc8 (diff)
downloadlibimobiledevice-dca3cf8c5bd804bf563fd43a6cdfdb1a5b85d490.tar.gz
libimobiledevice-dca3cf8c5bd804bf563fd43a6cdfdb1a5b85d490.tar.bz2
Documentation fixes
Diffstat (limited to 'include/libimobiledevice/diagnostics_relay.h')
-rw-r--r--include/libimobiledevice/diagnostics_relay.h63
1 files changed, 52 insertions, 11 deletions
diff --git a/include/libimobiledevice/diagnostics_relay.h b/include/libimobiledevice/diagnostics_relay.h
index d37ad74..f80a86b 100644
--- a/include/libimobiledevice/diagnostics_relay.h
+++ b/include/libimobiledevice/diagnostics_relay.h
@@ -30,6 +30,7 @@ extern "C" {
30#include <libimobiledevice/libimobiledevice.h> 30#include <libimobiledevice/libimobiledevice.h>
31#include <libimobiledevice/lockdown.h> 31#include <libimobiledevice/lockdown.h>
32 32
33/** Service identifier passed to lockdownd_start_service() to start the diagnostics relay service */
33#define DIAGNOSTICS_RELAY_SERVICE_NAME "com.apple.mobile.diagnostics_relay" 34#define DIAGNOSTICS_RELAY_SERVICE_NAME "com.apple.mobile.diagnostics_relay"
34 35
35/** Error Codes */ 36/** Error Codes */
@@ -42,18 +43,19 @@ typedef enum {
42 DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR = -256 43 DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR = -256
43} diagnostics_relay_error_t; 44} diagnostics_relay_error_t;
44 45
46/** Action type for #diagnostics_relay_restart and #diagnostics_relay_shutdown */
45typedef enum { 47typedef enum {
46 DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT = 1 << 1, 48 DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT = 1 << 1,
47 DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS = 1 << 2, 49 DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS = 1 << 2,
48 DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL = 1 << 3 50 DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL = 1 << 3
49} diagnostics_relay_action_t; 51} diagnostics_relay_action_t;
50 52
51#define DIAGNOSTICS_RELAY_REQUEST_TYPE_ALL "All" 53#define DIAGNOSTICS_RELAY_REQUEST_TYPE_ALL "All" /**< Query all available diagnostics */
52#define DIAGNOSTICS_RELAY_REQUEST_TYPE_WIFI "WiFi" 54#define DIAGNOSTICS_RELAY_REQUEST_TYPE_WIFI "WiFi" /**< Query WiFi diagnostics */
53#define DIAGNOSTICS_RELAY_REQUEST_TYPE_GAS_GAUGE "GasGauge" 55#define DIAGNOSTICS_RELAY_REQUEST_TYPE_GAS_GAUGE "GasGauge" /**< Query GasGauge diagnostics */
54#define DIAGNOSTICS_RELAY_REQUEST_TYPE_NAND "NAND" 56#define DIAGNOSTICS_RELAY_REQUEST_TYPE_NAND "NAND" /**< Query NAND diagnostics */
55 57
56typedef struct diagnostics_relay_client_private diagnostics_relay_client_private; 58typedef struct diagnostics_relay_client_private diagnostics_relay_client_private; /**< \private */
57typedef diagnostics_relay_client_private *diagnostics_relay_client_t; /**< The client handle. */ 59typedef diagnostics_relay_client_private *diagnostics_relay_client_t; /**< The client handle. */
58 60
59/** 61/**
@@ -158,14 +160,13 @@ diagnostics_relay_error_t diagnostics_relay_restart(diagnostics_relay_client_t c
158diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t client, diagnostics_relay_action_t flags); 160diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t client, diagnostics_relay_action_t flags);
159 161
160/** 162/**
161 * Shutdown of the device and optionally show a user notification. 163 * Request diagnostics information for a given type.
162 * 164 *
163 * @param client The diagnostics_relay client 165 * @param client The diagnostics_relay client
164 * @param flags A binary flag combination of 166 * @param type The type or domain to query for diagnostics. Some known values
165 * DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT to wait until 167 * are "All", "WiFi", "GasGauge", and "NAND".
166 * diagnostics_relay_client_free() disconnects before execution and 168 * @param diagnostics A pointer to plist_t that will receive the diagnostics information.
167 * DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_FAIL to show a "FAIL" dialog 169 * The consumer has to free the allocated memory with plist_free() when no longer needed.
168 * or DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS to show an "OK" dialog
169 * 170 *
170 * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, 171 * @return DIAGNOSTICS_RELAY_E_SUCCESS on success,
171 * DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL, 172 * DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL,
@@ -174,10 +175,50 @@ diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t
174 */ 175 */
175diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_relay_client_t client, const char* type, plist_t* diagnostics); 176diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_relay_client_t client, const char* type, plist_t* diagnostics);
176 177
178/**
179 * Query one or multiple MobileGestalt keys.
180 *
181 * @param client The diagnostics_relay client
182 * @param keys A PLIST_ARRAY with the keys to query.
183 * @param result A pointer to plist_t that will receive the result. The consumer
184 * has to free the allocated memory with plist_free() when no longer needed.
185 *
186 * @return DIAGNOSTICS_RELAY_E_SUCCESS on success,
187 * DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL,
188 * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the
189 * request
190 */
177diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_relay_client_t client, plist_t keys, plist_t* result); 191diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_relay_client_t client, plist_t keys, plist_t* result);
178 192
193/**
194 * Query an IORegistry entry of a given class.
195 *
196 * @param client The diagnostics_relay client
197 * @param entry_name The IORegistry entry name to query.
198 * @param entry_class The IORegistry class to query.
199 * @param result A pointer to plist_t that will receive the result. The consumer
200 * has to free the allocated memory with plist_free() when no longer needed.
201 *
202 * @return DIAGNOSTICS_RELAY_E_SUCCESS on success,
203 * DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL,
204 * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the
205 * request
206 */
179diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_relay_client_t client, const char* entry_name, const char* entry_class, plist_t* result); 207diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_relay_client_t client, const char* entry_name, const char* entry_class, plist_t* result);
180 208
209/**
210 * Query an IORegistry plane.
211 *
212 * @param client The diagnostics_relay client
213 * @param plane The IORegistry plane name to query.
214 * @param result A pointer to plist_t that will receive the result. The consumer
215 * has to free the allocated memory with plist_free() when no longer needed.
216 *
217 * @return DIAGNOSTICS_RELAY_E_SUCCESS on success,
218 * DIAGNOSTICS_RELAY_E_INVALID_ARG when client is NULL,
219 * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the
220 * request
221 */
181diagnostics_relay_error_t diagnostics_relay_query_ioregistry_plane(diagnostics_relay_client_t client, const char* plane, plist_t* result); 222diagnostics_relay_error_t diagnostics_relay_query_ioregistry_plane(diagnostics_relay_client_t client, const char* plane, plist_t* result);
182 223
183#ifdef __cplusplus 224#ifdef __cplusplus