@mcesystems/apple-kit 1.0.23 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +284 -250
  2. package/dist/index.js +304 -174
  3. package/dist/index.js.map +4 -4
  4. package/dist/index.mjs +303 -173
  5. package/dist/index.mjs.map +4 -4
  6. package/dist/resources/bin/darwin/idevice_id +0 -0
  7. package/dist/resources/bin/darwin/idevicedebug +0 -0
  8. package/dist/resources/bin/darwin/idevicediagnostics +0 -0
  9. package/dist/resources/bin/darwin/ideviceinfo +0 -0
  10. package/dist/resources/bin/darwin/ideviceinstaller +0 -0
  11. package/dist/resources/bin/darwin/idevicename +0 -0
  12. package/dist/resources/bin/darwin/idevicepair +0 -0
  13. package/dist/resources/bin/darwin/idevicescreenshot +0 -0
  14. package/dist/resources/bin/darwin/idevicesyslog +0 -0
  15. package/dist/resources/bin/darwin/iproxy +0 -0
  16. package/dist/resources/bin/darwin/libcrypto.3.dylib +0 -0
  17. package/dist/resources/bin/darwin/libimobiledevice-1.0.6.dylib +0 -0
  18. package/dist/resources/bin/darwin/libimobiledevice-glue-1.0.0.dylib +0 -0
  19. package/dist/resources/bin/darwin/liblzma.5.dylib +0 -0
  20. package/dist/resources/bin/darwin/libplist-2.0.4.dylib +0 -0
  21. package/dist/resources/bin/darwin/libssl.3.dylib +0 -0
  22. package/dist/resources/bin/darwin/libusbmuxd-2.0.7.dylib +0 -0
  23. package/dist/resources/bin/darwin/libzip.5.dylib +0 -0
  24. package/dist/resources/bin/darwin/libzstd.1.dylib +0 -0
  25. package/{resources → dist/resources}/licenses/LGPL-2.1.txt +33 -33
  26. package/dist/types/index.d.ts +0 -2
  27. package/dist/types/index.d.ts.map +1 -1
  28. package/dist/types/logic/actions/device.d.ts.map +1 -1
  29. package/dist/types/logic/actions/proxy.d.ts.map +1 -1
  30. package/dist/types/logic/appleDeviceKit.d.ts +2 -7
  31. package/dist/types/logic/appleDeviceKit.d.ts.map +1 -1
  32. package/package.json +7 -4
  33. package/scripts/README.md +209 -0
  34. package/scripts/build-windows.sh.template +134 -0
  35. package/scripts/export-resources.ts +444 -0
  36. package/dist/types/utils/portManager.d.ts +0 -68
  37. package/dist/types/utils/portManager.d.ts.map +0 -1
  38. package/resources/bin/windows/bz2.dll +0 -0
  39. package/resources/bin/windows/getopt.dll +0 -0
  40. package/resources/bin/windows/iconv-2.dll +0 -0
  41. package/resources/bin/windows/idevice_id.exe +0 -0
  42. package/resources/bin/windows/ideviceactivation.exe +0 -0
  43. package/resources/bin/windows/idevicedebug.exe +0 -0
  44. package/resources/bin/windows/ideviceinfo.exe +0 -0
  45. package/resources/bin/windows/ideviceinstaller.exe +0 -0
  46. package/resources/bin/windows/idevicepair.exe +0 -0
  47. package/resources/bin/windows/imobiledevice.dll +0 -0
  48. package/resources/bin/windows/iproxy.exe +0 -0
  49. package/resources/bin/windows/libcrypto-1_1-x64.dll +0 -0
  50. package/resources/bin/windows/libcurl.dll +0 -0
  51. package/resources/bin/windows/libideviceactivation-1.0.dll +0 -0
  52. package/resources/bin/windows/libimobiledevice-1.0.dll +0 -0
  53. package/resources/bin/windows/libimobiledevice-glue-1.0.dll +0 -0
  54. package/resources/bin/windows/libplist-2.0.dll +0 -0
  55. package/resources/bin/windows/libssl-1_1-x64.dll +0 -0
  56. package/resources/bin/windows/libusb-1.0.dll +0 -0
  57. package/resources/bin/windows/libusb0.dll +0 -0
  58. package/resources/bin/windows/libusbmuxd-2.0.dll +0 -0
  59. package/resources/bin/windows/libxml2.dll +0 -0
  60. package/resources/bin/windows/lzma.dll +0 -0
  61. package/resources/bin/windows/pcre.dll +0 -0
  62. package/resources/bin/windows/pcreposix.dll +0 -0
  63. package/resources/bin/windows/plist.dll +0 -0
  64. package/resources/bin/windows/pthreadVC3.dll +0 -0
  65. package/resources/bin/windows/readline.dll +0 -0
  66. package/resources/bin/windows/usbmuxd.dll +0 -0
  67. package/resources/bin/windows/usbmuxd.exe +0 -0
  68. package/resources/bin/windows/vcruntime140.dll +0 -0
  69. package/resources/bin/windows/zip.dll +0 -0
  70. package/resources/bin/windows/zlib1.dll +0 -0
  71. package/resources/lib/include/libimobiledevice/afc.h +0 -413
  72. package/resources/lib/include/libimobiledevice/bt_packet_logger.h +0 -156
  73. package/resources/lib/include/libimobiledevice/companion_proxy.h +0 -212
  74. package/resources/lib/include/libimobiledevice/debugserver.h +0 -272
  75. package/resources/lib/include/libimobiledevice/diagnostics_relay.h +0 -228
  76. package/resources/lib/include/libimobiledevice/file_relay.h +0 -166
  77. package/resources/lib/include/libimobiledevice/heartbeat.h +0 -137
  78. package/resources/lib/include/libimobiledevice/house_arrest.h +0 -180
  79. package/resources/lib/include/libimobiledevice/installation_proxy.h +0 -505
  80. package/resources/lib/include/libimobiledevice/libimobiledevice.h +0 -444
  81. package/resources/lib/include/libimobiledevice/lockdown.h +0 -577
  82. package/resources/lib/include/libimobiledevice/misagent.h +0 -168
  83. package/resources/lib/include/libimobiledevice/mobile_image_mounter.h +0 -275
  84. package/resources/lib/include/libimobiledevice/mobileactivation.h +0 -192
  85. package/resources/lib/include/libimobiledevice/mobilebackup.h +0 -246
  86. package/resources/lib/include/libimobiledevice/mobilebackup2.h +0 -214
  87. package/resources/lib/include/libimobiledevice/mobilesync.h +0 -359
  88. package/resources/lib/include/libimobiledevice/notification_proxy.h +0 -202
  89. package/resources/lib/include/libimobiledevice/ostrace.h +0 -198
  90. package/resources/lib/include/libimobiledevice/preboard.h +0 -187
  91. package/resources/lib/include/libimobiledevice/property_list_service.h +0 -184
  92. package/resources/lib/include/libimobiledevice/restore.h +0 -179
  93. package/resources/lib/include/libimobiledevice/reverse_proxy.h +0 -213
  94. package/resources/lib/include/libimobiledevice/sbservices.h +0 -175
  95. package/resources/lib/include/libimobiledevice/screenshotr.h +0 -118
  96. package/resources/lib/include/libimobiledevice/service.h +0 -202
  97. package/resources/lib/include/libimobiledevice/syslog_relay.h +0 -184
  98. package/resources/lib/include/libimobiledevice/webinspector.h +0 -137
  99. package/resources/lib/include/plist/Array.h +0 -80
  100. package/resources/lib/include/plist/Boolean.h +0 -48
  101. package/resources/lib/include/plist/Data.h +0 -50
  102. package/resources/lib/include/plist/Date.h +0 -54
  103. package/resources/lib/include/plist/Dictionary.h +0 -73
  104. package/resources/lib/include/plist/Integer.h +0 -54
  105. package/resources/lib/include/plist/Key.h +0 -49
  106. package/resources/lib/include/plist/Node.h +0 -57
  107. package/resources/lib/include/plist/Real.h +0 -48
  108. package/resources/lib/include/plist/String.h +0 -52
  109. package/resources/lib/include/plist/Structure.h +0 -62
  110. package/resources/lib/include/plist/Uid.h +0 -48
  111. package/resources/lib/include/plist/plist++.h +0 -39
  112. package/resources/lib/include/plist/plist.h +0 -1448
  113. package/resources/lib/libimobiledevice-1.0.dll +0 -0
  114. package/resources/lib/libimobiledevice-1.0.dll.a +0 -0
  115. package/resources/lib/libplist-2.0.dll +0 -0
  116. package/resources/lib/libplist-2.0.dll.a +0 -0
@@ -1,444 +0,0 @@
1
- /**
2
- * @file libimobiledevice/libimobiledevice.h
3
- * @brief Device/Connection handling and communication
4
- * \internal
5
- *
6
- * Copyright (c) 2010-2019 Nikias Bassen All Rights Reserved.
7
- * Copyright (c) 2010-2014 Martin Szulecki All Rights Reserved.
8
- * Copyright (c) 2014 Christophe Fergeau All Rights Reserved.
9
- * Copyright (c) 2008 Jonathan Beck All Rights Reserved.
10
- *
11
- * This library is free software; you can redistribute it and/or
12
- * modify it under the terms of the GNU Lesser General Public
13
- * License as published by the Free Software Foundation; either
14
- * version 2.1 of the License, or (at your option) any later version.
15
- *
16
- * This library is distributed in the hope that it will be useful,
17
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
- * Lesser General Public License for more details.
20
- *
21
- * You should have received a copy of the GNU Lesser General Public
22
- * License along with this library; if not, write to the Free Software
23
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24
- */
25
-
26
- #ifndef IMOBILEDEVICE_H
27
- #define IMOBILEDEVICE_H
28
-
29
- #ifdef __cplusplus
30
- extern "C" {
31
- #endif
32
-
33
- #include <stdint.h>
34
- #include <plist/plist.h>
35
-
36
- #if defined(_MSC_VER)
37
- #include <basetsd.h>
38
- typedef SSIZE_T ssize_t;
39
- #endif
40
-
41
- #ifndef LIBIMOBILEDEVICE_API
42
- #ifdef LIBIMOBILEDEVICE_STATIC
43
- #define LIBIMOBILEDEVICE_API
44
- #elif defined(_WIN32)
45
- #define LIBIMOBILEDEVICE_API __declspec(dllimport)
46
- #else
47
- #define LIBIMOBILEDEVICE_API
48
- #endif
49
- #endif
50
-
51
- /** Error Codes */
52
- typedef enum {
53
- IDEVICE_E_SUCCESS = 0,
54
- IDEVICE_E_INVALID_ARG = -1,
55
- IDEVICE_E_UNKNOWN_ERROR = -2,
56
- IDEVICE_E_NO_DEVICE = -3,
57
- IDEVICE_E_NOT_ENOUGH_DATA = -4,
58
- IDEVICE_E_CONNREFUSED = -5,
59
- IDEVICE_E_SSL_ERROR = -6,
60
- IDEVICE_E_TIMEOUT = -7
61
- } idevice_error_t;
62
-
63
- typedef struct idevice_private idevice_private; /**< \private */
64
- typedef idevice_private *idevice_t; /**< The device handle. */
65
-
66
- typedef struct idevice_connection_private idevice_connection_private; /**< \private */
67
- typedef idevice_connection_private *idevice_connection_t; /**< The connection handle. */
68
-
69
- /** Options for idevice_new_with_options() */
70
- enum idevice_options {
71
- IDEVICE_LOOKUP_USBMUX = 1 << 1, /**< include USBMUX devices during lookup */
72
- IDEVICE_LOOKUP_NETWORK = 1 << 2, /**< include network devices during lookup */
73
- IDEVICE_LOOKUP_PREFER_NETWORK = 1 << 3 /**< prefer network connection if device is available via USBMUX *and* network */
74
- };
75
-
76
- /** Type of connection a device is available on */
77
- enum idevice_connection_type {
78
- CONNECTION_USBMUXD = 1, /**< device is available via USBMUX */
79
- CONNECTION_NETWORK /**< device is available via network */
80
- };
81
-
82
- /** Device information returned by #idevice_get_device_list_extended API */
83
- struct idevice_info {
84
- char *udid; /**< UDID of the device */
85
- enum idevice_connection_type conn_type; /**< Type of connection the device is available on */
86
- void* conn_data; /**< Connection data, depending on the connection type */
87
- };
88
- typedef struct idevice_info* idevice_info_t;
89
-
90
- /* discovery (events/asynchronous) */
91
- /** The event type for device add or removal */
92
- enum idevice_event_type {
93
- IDEVICE_DEVICE_ADD = 1, /**< device was added */
94
- IDEVICE_DEVICE_REMOVE, /**< device was removed */
95
- IDEVICE_DEVICE_PAIRED /**< device completed pairing process */
96
- };
97
-
98
- /* event data structure */
99
- /** Provides information about the occurred event. */
100
- typedef struct {
101
- enum idevice_event_type event; /**< The event type. */
102
- const char *udid; /**< The device unique id. */
103
- enum idevice_connection_type conn_type; /**< The connection type. */
104
- } idevice_event_t;
105
-
106
- /* event callback function prototype */
107
- /** Callback to notifiy if a device was added or removed. */
108
- typedef void (*idevice_event_cb_t) (const idevice_event_t *event, void *user_data);
109
-
110
- /** Event subscription context type */
111
- typedef struct idevice_subscription_context* idevice_subscription_context_t;
112
-
113
- /* functions */
114
-
115
- /**
116
- * Set the level of debugging.
117
- *
118
- * @param level Set to 0 for no debug output or 1 to enable debug output.
119
- */
120
- LIBIMOBILEDEVICE_API void idevice_set_debug_level(int level);
121
-
122
- /**
123
- * Subscribe a callback function that will be called when device add/remove
124
- * events occur.
125
- *
126
- * @param context A pointer to a idevice_subscription_context_t that will be
127
- * set upon creation of the subscription. The returned context must be
128
- * passed to idevice_events_unsubscribe() to unsubscribe the callback.
129
- * @param callback Callback function to call.
130
- * @param user_data Application-specific data passed as parameter
131
- * to the registered callback function.
132
- *
133
- * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred.
134
- */
135
- LIBIMOBILEDEVICE_API idevice_error_t idevice_events_subscribe(idevice_subscription_context_t *context, idevice_event_cb_t callback, void *user_data);
136
-
137
- /**
138
- * Unsubscribe the event callback function that has been registered with
139
- * idevice_events_subscribe().
140
- *
141
- * @param context A valid context as returned from idevice_events_subscribe().
142
- *
143
- * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred.
144
- */
145
- LIBIMOBILEDEVICE_API idevice_error_t idevice_events_unsubscribe(idevice_subscription_context_t context);
146
-
147
- /**
148
- * (DEPRECATED) Register a callback function that will be called when device add/remove
149
- * events occur.
150
- *
151
- * @deprecated Use idevice_events_subscribe() instead.
152
- *
153
- * @param callback Callback function to call.
154
- * @param user_data Application-specific data passed as parameter
155
- * to the registered callback function.
156
- *
157
- * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred.
158
- */
159
- LIBIMOBILEDEVICE_API idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data);
160
-
161
- /**
162
- * (DEPRECATED) Release the event callback function that has been registered with
163
- * idevice_event_subscribe().
164
- *
165
- * @deprecated Use idevice_events_unsubscribe() instead.
166
- *
167
- * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred.
168
- */
169
- LIBIMOBILEDEVICE_API idevice_error_t idevice_event_unsubscribe(void);
170
-
171
- /* discovery (synchronous) */
172
-
173
- /**
174
- * Get a list of UDIDs of currently available devices (USBMUX devices only).
175
- *
176
- * @param devices List of UDIDs of devices that are currently available.
177
- * This list is terminated by a NULL pointer.
178
- * @param count Number of devices found.
179
- *
180
- * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred.
181
- *
182
- * @note This function only returns the UDIDs of USBMUX devices. To also include
183
- * network devices in the list, use idevice_get_device_list_extended().
184
- * @see idevice_get_device_list_extended
185
- */
186
- LIBIMOBILEDEVICE_API idevice_error_t idevice_get_device_list(char ***devices, int *count);
187
-
188
- /**
189
- * Free a list of device UDIDs.
190
- *
191
- * @param devices List of UDIDs to free.
192
- *
193
- * @return Always returnes IDEVICE_E_SUCCESS.
194
- */
195
- LIBIMOBILEDEVICE_API idevice_error_t idevice_device_list_free(char **devices);
196
-
197
- /**
198
- * Get a list of currently available devices
199
- *
200
- * @param devices List of idevice_info_t records with device information.
201
- * This list is terminated by a NULL pointer.
202
- * @param count Number of devices included in the list.
203
- *
204
- * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred.
205
- */
206
- LIBIMOBILEDEVICE_API idevice_error_t idevice_get_device_list_extended(idevice_info_t **devices, int *count);
207
-
208
- /**
209
- * Free an extended device list retrieved through idevice_get_device_list_extended().
210
- *
211
- * @param devices Device list to free.
212
- *
213
- * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred.
214
- */
215
- LIBIMOBILEDEVICE_API idevice_error_t idevice_device_list_extended_free(idevice_info_t *devices);
216
-
217
- /* device structure creation and destruction */
218
-
219
- /**
220
- * Creates an idevice_t structure for the device specified by UDID,
221
- * if the device is available (USBMUX devices only).
222
- *
223
- * @note The resulting idevice_t structure has to be freed with
224
- * idevice_free() if it is no longer used.
225
- * If you need to connect to a device available via network, use
226
- * idevice_new_with_options() and include IDEVICE_LOOKUP_NETWORK in options.
227
- *
228
- * @see idevice_new_with_options
229
- *
230
- * @param device Upon calling this function, a pointer to a location of type
231
- * idevice_t. On successful return, this location will be populated.
232
- * @param udid The UDID to match.
233
- *
234
- * @return IDEVICE_E_SUCCESS if ok, otherwise an error code.
235
- */
236
- LIBIMOBILEDEVICE_API idevice_error_t idevice_new(idevice_t *device, const char *udid);
237
-
238
- /**
239
- * Creates an idevice_t structure for the device specified by UDID,
240
- * if the device is available, with the given lookup options.
241
- *
242
- * @note The resulting idevice_t structure has to be freed with
243
- * idevice_free() if it is no longer used.
244
- *
245
- * @param device Upon calling this function, a pointer to a location of type
246
- * idevice_t. On successful return, this location will be populated.
247
- * @param udid The UDID to match.
248
- * @param options Specifies what connection types should be considered
249
- * when looking up devices. Accepts bitwise or'ed values of idevice_options.
250
- * If 0 (no option) is specified it will default to IDEVICE_LOOKUP_USBMUX.
251
- * To lookup both USB and network-connected devices, pass
252
- * IDEVICE_LOOKUP_USBMUX | IDEVICE_LOOKUP_NETWORK. If a device is available
253
- * both via USBMUX *and* network, it will select the USB connection.
254
- * This behavior can be changed by adding IDEVICE_LOOKUP_PREFER_NETWORK
255
- * to the options in which case it will select the network connection.
256
- *
257
- * @return IDEVICE_E_SUCCESS if ok, otherwise an error code.
258
- */
259
- LIBIMOBILEDEVICE_API idevice_error_t idevice_new_with_options(idevice_t *device, const char *udid, enum idevice_options options);
260
-
261
- /**
262
- * Cleans up an idevice structure, then frees the structure itself.
263
- *
264
- * @param device idevice_t to free.
265
- */
266
- LIBIMOBILEDEVICE_API idevice_error_t idevice_free(idevice_t device);
267
-
268
- /* connection/disconnection */
269
-
270
- /**
271
- * Set up a connection to the given device.
272
- *
273
- * @param device The device to connect to.
274
- * @param port The destination port to connect to.
275
- * @param connection Pointer to an idevice_connection_t that will be filled
276
- * with the necessary data of the connection.
277
- *
278
- * @return IDEVICE_E_SUCCESS if ok, otherwise an error code.
279
- */
280
- LIBIMOBILEDEVICE_API idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connection_t *connection);
281
-
282
- /**
283
- * Disconnect from the device and clean up the connection structure.
284
- *
285
- * @param connection The connection to close.
286
- *
287
- * @return IDEVICE_E_SUCCESS if ok, otherwise an error code.
288
- */
289
- LIBIMOBILEDEVICE_API idevice_error_t idevice_disconnect(idevice_connection_t connection);
290
-
291
- /* communication */
292
-
293
- /**
294
- * Send data to a device via the given connection.
295
- *
296
- * @param connection The connection to send data over.
297
- * @param data Buffer with data to send.
298
- * @param len Size of the buffer to send.
299
- * @param sent_bytes Pointer to an uint32_t that will be filled
300
- * with the number of bytes actually sent.
301
- *
302
- * @return IDEVICE_E_SUCCESS if ok, otherwise an error code.
303
- */
304
- LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_send(idevice_connection_t connection, const char *data, uint32_t len, uint32_t *sent_bytes);
305
-
306
- /**
307
- * Receive data from a device via the given connection.
308
- * This function will return after the given timeout even if no data has been
309
- * received.
310
- *
311
- * @param connection The connection to receive data from.
312
- * @param data Buffer that will be filled with the received data.
313
- * This buffer has to be large enough to hold len bytes.
314
- * @param len Buffer size or number of bytes to receive.
315
- * @param recv_bytes Number of bytes actually received.
316
- * @param timeout Timeout in milliseconds after which this function should
317
- * return even if no data has been received.
318
- *
319
- * @return IDEVICE_E_SUCCESS if ok, otherwise an error code.
320
- */
321
- LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_receive_timeout(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout);
322
-
323
- /**
324
- * Receive data from a device via the given connection.
325
- * This function is like idevice_connection_receive_timeout, but with a
326
- * predefined reasonable timeout.
327
- *
328
- * @param connection The connection to receive data from.
329
- * @param data Buffer that will be filled with the received data.
330
- * This buffer has to be large enough to hold len bytes.
331
- * @param len Buffer size or number of bytes to receive.
332
- * @param recv_bytes Number of bytes actually received.
333
- *
334
- * @return IDEVICE_E_SUCCESS if ok, otherwise an error code.
335
- */
336
- LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_receive(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes);
337
-
338
- /**
339
- * Enables SSL for the given connection.
340
- *
341
- * @param connection The connection to enable SSL for.
342
- *
343
- * @return IDEVICE_E_SUCCESS on success, IDEVICE_E_INVALID_ARG when connection
344
- * is NULL or connection->ssl_data is non-NULL, or IDEVICE_E_SSL_ERROR when
345
- * SSL initialization, setup, or handshake fails.
346
- */
347
- LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection);
348
-
349
- /**
350
- * Disable SSL for the given connection.
351
- *
352
- * @param connection The connection to disable SSL for.
353
- *
354
- * @return IDEVICE_E_SUCCESS on success, IDEVICE_E_INVALID_ARG when connection
355
- * is NULL. This function also returns IDEVICE_E_SUCCESS when SSL is not
356
- * enabled and does no further error checking on cleanup.
357
- */
358
- LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_disable_ssl(idevice_connection_t connection);
359
-
360
- /**
361
- * Disable bypass SSL for the given connection without sending out terminate messages.
362
- *
363
- * @param connection The connection to disable SSL for.
364
- * @param sslBypass if true ssl connection will not be terminated but just cleaned up, allowing
365
- * plain text data going on underlying connection
366
- *
367
- * @return IDEVICE_E_SUCCESS on success, IDEVICE_E_INVALID_ARG when connection
368
- * is NULL. This function also returns IDEVICE_E_SUCCESS when SSL is not
369
- * enabled and does no further error checking on cleanup.
370
- */
371
- LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_disable_bypass_ssl(idevice_connection_t connection, uint8_t sslBypass);
372
-
373
-
374
- /**
375
- * Get the underlying file descriptor for a connection
376
- *
377
- * @param connection The connection to get fd of
378
- * @param fd Pointer to an int where the fd is stored
379
- *
380
- * @return IDEVICE_E_SUCCESS if ok, otherwise an error code.
381
- */
382
- LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_get_fd(idevice_connection_t connection, int *fd);
383
-
384
- /* misc */
385
-
386
- /**
387
- * Gets the handle or (USBMUX device id) of the device.
388
- *
389
- * @param device The device to get the USBMUX device id for.
390
- * @param handle Pointer to a uint32_t that will be set to the USBMUX handle value.
391
- *
392
- * @return IDEVICE_E_SUCCESS on success, otherwise an error code.
393
- */
394
- LIBIMOBILEDEVICE_API idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle);
395
-
396
- /**
397
- * Gets the Unique Device ID for the device.
398
- *
399
- * @param device The device to get the Unique Device ID for.
400
- * @param udid Pointer that will be set to an allocated buffer with the device UDID. The consumer is responsible for releasing the allocated memory.
401
- *
402
- * @return IDEVICE_E_SUCCESS on success, otherwise an error code.
403
- */
404
- LIBIMOBILEDEVICE_API idevice_error_t idevice_get_udid(idevice_t device, char **udid);
405
-
406
- /**
407
- * Returns the device ProductVersion in numerical form, where "X.Y.Z"
408
- * will be returned as (X << 16) | (Y << 8) | Z .
409
- * Use IDEVICE_DEVICE_VERSION macro for easy version comparison.
410
- * @see IDEVICE_DEVICE_VERSION
411
- *
412
- * @param client Initialized device client
413
- *
414
- * @return A numerical representation of the X.Y.Z ProductVersion string
415
- * or 0 if the version cannot be retrieved.
416
- */
417
- LIBIMOBILEDEVICE_API unsigned int idevice_get_device_version(idevice_t device);
418
-
419
- /**
420
- * Gets a readable error string for a given idevice error code.
421
- *
422
- * @param err An idevice error code
423
- *
424
- * @return A readable error string
425
- */
426
- LIBIMOBILEDEVICE_API const char* idevice_strerror(idevice_error_t err);
427
-
428
- /**
429
- * Returns a static string of the libimobiledevice version.
430
- *
431
- * @return The libimobiledevice version as static ascii string
432
- */
433
- LIBIMOBILEDEVICE_API const char* libimobiledevice_version();
434
-
435
- /* macros */
436
- /** Helper macro to get a numerical representation of a product version tuple */
437
- #define IDEVICE_DEVICE_VERSION(maj, min, patch) ((((maj) & 0xFF) << 16) | (((min) & 0xFF) << 8) | ((patch) & 0xFF))
438
-
439
- #ifdef __cplusplus
440
- }
441
- #endif
442
-
443
- #endif
444
-