@mcesystems/apple-kit 1.0.24 → 1.0.26

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 (114) hide show
  1. package/README.md +284 -250
  2. package/dist/index.js +156 -22
  3. package/dist/index.js.map +3 -3
  4. package/dist/index.mjs +156 -24
  5. package/dist/index.mjs.map +3 -3
  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/logic/actions/device.d.ts.map +1 -1
  27. package/dist/types/logic/actions/proxy.d.ts.map +1 -1
  28. package/dist/types/logic/appleDeviceKit.d.ts +1 -1
  29. package/dist/types/logic/appleDeviceKit.d.ts.map +1 -1
  30. package/package.json +7 -4
  31. package/scripts/README.md +209 -0
  32. package/scripts/build-windows.sh.template +134 -0
  33. package/scripts/export-resources.ts +444 -0
  34. package/dist/types/utils/portManager.d.ts +0 -68
  35. package/dist/types/utils/portManager.d.ts.map +0 -1
  36. package/resources/bin/windows/bz2.dll +0 -0
  37. package/resources/bin/windows/getopt.dll +0 -0
  38. package/resources/bin/windows/iconv-2.dll +0 -0
  39. package/resources/bin/windows/idevice_id.exe +0 -0
  40. package/resources/bin/windows/ideviceactivation.exe +0 -0
  41. package/resources/bin/windows/idevicedebug.exe +0 -0
  42. package/resources/bin/windows/ideviceinfo.exe +0 -0
  43. package/resources/bin/windows/ideviceinstaller.exe +0 -0
  44. package/resources/bin/windows/idevicepair.exe +0 -0
  45. package/resources/bin/windows/imobiledevice.dll +0 -0
  46. package/resources/bin/windows/iproxy.exe +0 -0
  47. package/resources/bin/windows/libcrypto-1_1-x64.dll +0 -0
  48. package/resources/bin/windows/libcurl.dll +0 -0
  49. package/resources/bin/windows/libideviceactivation-1.0.dll +0 -0
  50. package/resources/bin/windows/libimobiledevice-1.0.dll +0 -0
  51. package/resources/bin/windows/libimobiledevice-glue-1.0.dll +0 -0
  52. package/resources/bin/windows/libplist-2.0.dll +0 -0
  53. package/resources/bin/windows/libssl-1_1-x64.dll +0 -0
  54. package/resources/bin/windows/libusb-1.0.dll +0 -0
  55. package/resources/bin/windows/libusb0.dll +0 -0
  56. package/resources/bin/windows/libusbmuxd-2.0.dll +0 -0
  57. package/resources/bin/windows/libxml2.dll +0 -0
  58. package/resources/bin/windows/lzma.dll +0 -0
  59. package/resources/bin/windows/pcre.dll +0 -0
  60. package/resources/bin/windows/pcreposix.dll +0 -0
  61. package/resources/bin/windows/plist.dll +0 -0
  62. package/resources/bin/windows/pthreadVC3.dll +0 -0
  63. package/resources/bin/windows/readline.dll +0 -0
  64. package/resources/bin/windows/usbmuxd.dll +0 -0
  65. package/resources/bin/windows/usbmuxd.exe +0 -0
  66. package/resources/bin/windows/vcruntime140.dll +0 -0
  67. package/resources/bin/windows/zip.dll +0 -0
  68. package/resources/bin/windows/zlib1.dll +0 -0
  69. package/resources/lib/include/libimobiledevice/afc.h +0 -413
  70. package/resources/lib/include/libimobiledevice/bt_packet_logger.h +0 -156
  71. package/resources/lib/include/libimobiledevice/companion_proxy.h +0 -212
  72. package/resources/lib/include/libimobiledevice/debugserver.h +0 -272
  73. package/resources/lib/include/libimobiledevice/diagnostics_relay.h +0 -228
  74. package/resources/lib/include/libimobiledevice/file_relay.h +0 -166
  75. package/resources/lib/include/libimobiledevice/heartbeat.h +0 -137
  76. package/resources/lib/include/libimobiledevice/house_arrest.h +0 -180
  77. package/resources/lib/include/libimobiledevice/installation_proxy.h +0 -505
  78. package/resources/lib/include/libimobiledevice/libimobiledevice.h +0 -444
  79. package/resources/lib/include/libimobiledevice/lockdown.h +0 -577
  80. package/resources/lib/include/libimobiledevice/misagent.h +0 -168
  81. package/resources/lib/include/libimobiledevice/mobile_image_mounter.h +0 -275
  82. package/resources/lib/include/libimobiledevice/mobileactivation.h +0 -192
  83. package/resources/lib/include/libimobiledevice/mobilebackup.h +0 -246
  84. package/resources/lib/include/libimobiledevice/mobilebackup2.h +0 -214
  85. package/resources/lib/include/libimobiledevice/mobilesync.h +0 -359
  86. package/resources/lib/include/libimobiledevice/notification_proxy.h +0 -202
  87. package/resources/lib/include/libimobiledevice/ostrace.h +0 -198
  88. package/resources/lib/include/libimobiledevice/preboard.h +0 -187
  89. package/resources/lib/include/libimobiledevice/property_list_service.h +0 -184
  90. package/resources/lib/include/libimobiledevice/restore.h +0 -179
  91. package/resources/lib/include/libimobiledevice/reverse_proxy.h +0 -213
  92. package/resources/lib/include/libimobiledevice/sbservices.h +0 -175
  93. package/resources/lib/include/libimobiledevice/screenshotr.h +0 -118
  94. package/resources/lib/include/libimobiledevice/service.h +0 -202
  95. package/resources/lib/include/libimobiledevice/syslog_relay.h +0 -184
  96. package/resources/lib/include/libimobiledevice/webinspector.h +0 -137
  97. package/resources/lib/include/plist/Array.h +0 -80
  98. package/resources/lib/include/plist/Boolean.h +0 -48
  99. package/resources/lib/include/plist/Data.h +0 -50
  100. package/resources/lib/include/plist/Date.h +0 -54
  101. package/resources/lib/include/plist/Dictionary.h +0 -73
  102. package/resources/lib/include/plist/Integer.h +0 -54
  103. package/resources/lib/include/plist/Key.h +0 -49
  104. package/resources/lib/include/plist/Node.h +0 -57
  105. package/resources/lib/include/plist/Real.h +0 -48
  106. package/resources/lib/include/plist/String.h +0 -52
  107. package/resources/lib/include/plist/Structure.h +0 -62
  108. package/resources/lib/include/plist/Uid.h +0 -48
  109. package/resources/lib/include/plist/plist++.h +0 -39
  110. package/resources/lib/include/plist/plist.h +0 -1448
  111. package/resources/lib/libimobiledevice-1.0.dll +0 -0
  112. package/resources/lib/libimobiledevice-1.0.dll.a +0 -0
  113. package/resources/lib/libplist-2.0.dll +0 -0
  114. package/resources/lib/libplist-2.0.dll.a +0 -0
@@ -1,198 +0,0 @@
1
- /**
2
- * @file libimobiledevice/ostrace.h
3
- * @brief System log and tracing capabilities.
4
- * \internal
5
- *
6
- * Copyright (c) 2020-2025 Nikias Bassen, All Rights Reserved.
7
- *
8
- * This library is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU Lesser General Public
10
- * License as published by the Free Software Foundation; either
11
- * version 2.1 of the License, or (at your option) any later version.
12
- *
13
- * This library is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
- * Lesser General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU Lesser General Public
19
- * License along with this library; if not, write to the Free Software
20
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
- */
22
-
23
- #ifndef OSTRACE_H
24
- #define OSTRACE_H
25
-
26
- #ifdef __cplusplus
27
- extern "C" {
28
- #endif
29
-
30
- #include <libimobiledevice/libimobiledevice.h>
31
- #include <libimobiledevice/lockdown.h>
32
-
33
- /** Service identifier passed to lockdownd_start_service() to start the os trace relay service */
34
- #define OSTRACE_SERVICE_NAME "com.apple.os_trace_relay"
35
-
36
- /** Error Codes */
37
- typedef enum {
38
- OSTRACE_E_SUCCESS = 0,
39
- OSTRACE_E_INVALID_ARG = -1,
40
- OSTRACE_E_MUX_ERROR = -2,
41
- OSTRACE_E_SSL_ERROR = -3,
42
- OSTRACE_E_NOT_ENOUGH_DATA = -4,
43
- OSTRACE_E_TIMEOUT = -5,
44
- OSTRACE_E_PLIST_ERROR = -6,
45
- OSTRACE_E_REQUEST_FAILED = -7,
46
- OSTRACE_E_UNKNOWN_ERROR = -256
47
- } ostrace_error_t;
48
-
49
- typedef struct ostrace_client_private ostrace_client_private; /**< \private */
50
- typedef ostrace_client_private *ostrace_client_t; /**< The client handle. */
51
-
52
- #pragma pack(push,1)
53
- struct ostrace_packet_header_t {
54
- uint8_t marker;
55
- uint32_t type;
56
- uint32_t header_size; // 0x81
57
- uint32_t pid;
58
- uint64_t procid; // == pid
59
- unsigned char procuuid[16]; // procuuid
60
- uint16_t procpath_len; // path to process
61
- uint64_t aid; // activity id, usually 0
62
- uint64_t paid; // (parent?) activity id, usually 0
63
- uint64_t time_sec; // tv.tv_sec 64 bit
64
- uint32_t time_usec; // tv.usec 32 bit
65
- uint8_t unk06;
66
- uint8_t level; // Notice=0, Info=0x01, Debug=0x02, Error=0x10, Fault=0x11
67
- uint8_t unk07;
68
- uint8_t unk08;
69
- uint8_t unk09;
70
- uint8_t unk10;
71
- uint8_t unk11;
72
- uint8_t unk12;
73
- uint64_t timestamp; // ?
74
- uint32_t thread_id;
75
- uint32_t unk13; // 0
76
- unsigned char imageuuid[16]; // framework/dylib uuid
77
- uint16_t imagepath_len; // framework/dylib
78
- uint32_t message_len; // actual log message
79
- uint32_t offset; // offset for like timestamp or sth
80
- uint16_t subsystem_len; // "subsystem"
81
- uint16_t unk14;
82
- uint16_t category_len; // "category"
83
- uint16_t unk15;
84
- uint32_t unk16; // 0
85
- };
86
- #pragma pack(pop)
87
-
88
- /** Receives unparsed ostrace data from the ostrace service */
89
- typedef void (*ostrace_activity_cb_t)(const void* buf, size_t len, void *user_data);
90
-
91
- /** Receives archive data from the ostrace service */
92
- typedef int (*ostrace_archive_write_cb_t)(const void* buf, size_t len, void *user_data);
93
-
94
- /* Interface */
95
-
96
- /**
97
- * Connects to the os_trace_relay service on the specified device.
98
- *
99
- * @param device The device to connect to.
100
- * @param service The service descriptor returned by lockdownd_start_service.
101
- * @param client Pointer that will point to a newly allocated
102
- * ostrace_client_t upon successful return. Must be freed using
103
- * ostrace_client_free() after use.
104
- *
105
- * @return OSTRACE_E_SUCCESS on success, OSTRACE_E_INVALID_ARG when
106
- * client is NULL, or an OSTRACE_E_* error code otherwise.
107
- */
108
- LIBIMOBILEDEVICE_API ostrace_error_t ostrace_client_new(idevice_t device, lockdownd_service_descriptor_t service, ostrace_client_t * client);
109
-
110
- /**
111
- * Starts a new os_trace_relay service on the specified device and connects to it.
112
- *
113
- * @param device The device to connect to.
114
- * @param client Pointer that will point to a newly allocated
115
- * ostrace_client_t upon successful return. Must be freed using
116
- * ostrace_client_free() after use.
117
- * @param label The label to use for communication. Usually the program name.
118
- * Pass NULL to disable sending the label in requests to lockdownd.
119
- *
120
- * @return OSTRACE_E_SUCCESS on success, or an OSTRACE_E_* error code otherwise.
121
- */
122
- LIBIMOBILEDEVICE_API ostrace_error_t ostrace_client_start_service(idevice_t device, ostrace_client_t * client, const char* label);
123
-
124
- /**
125
- * Disconnects a ostrace client from the device and frees up the
126
- * ostrace client data.
127
- *
128
- * @param client The ostrace client to disconnect and free.
129
- *
130
- * @return OSTRACE_E_SUCCESS on success, OSTRACE_E_INVALID_ARG when
131
- * client is NULL, or an OSTRACE_E_* error code otherwise.
132
- */
133
- LIBIMOBILEDEVICE_API ostrace_error_t ostrace_client_free(ostrace_client_t client);
134
-
135
- /**
136
- * Starts capturing OS trace activity data of the device using a callback.
137
- *
138
- * Use ostrace_stop_activity() to stop receiving the ostrace.
139
- *
140
- * @param client The ostrace client to use
141
- * @param options Options dictionary to pass to StartActivity request.
142
- * Valid options are MessageFilter (PLIST_INT, default 65535),
143
- * Pid (PLIST_INT, default -1), and StreamFlags (PLIST_INT, default 60)
144
- * @param callback Callback to receive data from ostrace.
145
- * @param user_data Custom pointer passed to the callback function.
146
- * @param user_data_free_func Function pointer that will be called when the
147
- * activity is stopped to release user_data. Can be NULL for none.
148
- *
149
- * @return OSTRACE_E_SUCCESS on success,
150
- * OSTRACE_E_INVALID_ARG when one or more parameters are
151
- * invalid or OSTRACE_E_UNKNOWN_ERROR when an unspecified
152
- * error occurs or an ostrace activity has already been started.
153
- */
154
- LIBIMOBILEDEVICE_API ostrace_error_t ostrace_start_activity(ostrace_client_t client, plist_t options, ostrace_activity_cb_t callback, void* user_data);
155
-
156
- /**
157
- * Stops the ostrace activity.
158
- *
159
- * Use ostrace_start_activity() to start receiving OS trace data.
160
- *
161
- * @param client The ostrace client to use
162
- *
163
- * @return OSTRACE_E_SUCCESS on success,
164
- * OSTRACE_E_INVALID_ARG when one or more parameters are
165
- * invalid or OSTRACE_E_UNKNOWN_ERROR when an unspecified
166
- * error occurs or an ostrace activity has already been started.
167
- */
168
- LIBIMOBILEDEVICE_API ostrace_error_t ostrace_stop_activity(ostrace_client_t client);
169
-
170
- /**
171
- * Returns a dictionary with all currently running processes on the device.
172
- *
173
- * @param client The ostrace client to use
174
- * @param list Pointer that will receive an allocated PLIST_DICT structure with the process data
175
- *
176
- * @return OSTRACE_E_SUCCESS on success, or an OSTRACE_E_* error code otherwise
177
- */
178
- LIBIMOBILEDEVICE_API ostrace_error_t ostrace_get_pid_list(ostrace_client_t client, plist_t* list);
179
-
180
- /**
181
- * Creates a syslog archive.
182
- *
183
- * @note The device will close the connection once the transfer is complete. The client
184
- * is not usable after that anymore and must be disposed with ostrace_client_free.
185
- *
186
- * @param client The ostrace client to use
187
- * @param options A dictionary with options for the request.
188
- * Valid parameters are StartTime (PLIST_UINT), SizeLimit (PLIST_UINT), and AgeLimit (PLIST_UINT).
189
- *
190
- * @return OSTRACE_E_SUCCESS on success, or an OSTRACE_E_* error code otherwise
191
- */
192
- LIBIMOBILEDEVICE_API ostrace_error_t ostrace_create_archive(ostrace_client_t client, plist_t options, ostrace_archive_write_cb_t callback, void* user_data);
193
-
194
- #ifdef __cplusplus
195
- }
196
- #endif
197
-
198
- #endif
@@ -1,187 +0,0 @@
1
- /**
2
- * @file libimobiledevice/preboard.h
3
- * @brief Service to 'preboard' a device, which allows to ask for passcode during firmware updates.
4
- * \internal
5
- *
6
- * Copyright (c) 2019 Nikias Bassen, All Rights Reserved.
7
- *
8
- * This library is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU Lesser General Public
10
- * License as published by the Free Software Foundation; either
11
- * version 2.1 of the License, or (at your option) any later version.
12
- *
13
- * This library is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
- * Lesser General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU Lesser General Public
19
- * License along with this library; if not, write to the Free Software
20
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
- */
22
-
23
- #ifndef IPREBOARD_H
24
- #define IPREBOARD_H
25
-
26
- #ifdef __cplusplus
27
- extern "C" {
28
- #endif
29
-
30
- #include <libimobiledevice/libimobiledevice.h>
31
- #include <libimobiledevice/lockdown.h>
32
-
33
- /** Service identifier passed to lockdownd_start_service() to start the preboard service */
34
- #define PREBOARD_SERVICE_NAME "com.apple.preboardservice_v2"
35
-
36
- /** Error Codes */
37
- typedef enum {
38
- PREBOARD_E_SUCCESS = 0,
39
- PREBOARD_E_INVALID_ARG = -1,
40
- PREBOARD_E_PLIST_ERROR = -2,
41
- PREBOARD_E_MUX_ERROR = -3,
42
- PREBOARD_E_SSL_ERROR = -4,
43
- PREBOARD_E_NOT_ENOUGH_DATA = -5,
44
- PREBOARD_E_TIMEOUT = -6,
45
- PREBOARD_E_OP_IN_PROGRESS = -10,
46
- PREBOARD_E_UNKNOWN_ERROR = -256
47
- } preboard_error_t;
48
-
49
- typedef struct preboard_client_private preboard_client_private; /**< \private */
50
- typedef preboard_client_private *preboard_client_t; /**< The client handle. */
51
-
52
- /** Reports the status response of the given command */
53
- typedef void (*preboard_status_cb_t) (plist_t message, void *user_data);
54
-
55
- /**
56
- * Connects to the preboard service on the specified device.
57
- *
58
- * @param device The device to connect to.
59
- * @param service The service descriptor returned by lockdownd_start_service.
60
- * @param client Pointer that will point to a newly allocated
61
- * preboard_client_t upon successful return. Must be freed using
62
- * preboard_client_free() after use.
63
- *
64
- * @return PREBOARD_E_SUCCESS on success, PREBOARD_E_INVALID_ARG when
65
- * client is NULL, or an PREBOARD_E_* error code otherwise.
66
- */
67
- LIBIMOBILEDEVICE_API preboard_error_t preboard_client_new(idevice_t device, lockdownd_service_descriptor_t service, preboard_client_t * client);
68
-
69
- /**
70
- * Starts a new preboard service on the specified device and connects to it.
71
- *
72
- * @param device The device to connect to.
73
- * @param client Pointer that will point to a newly allocated
74
- * preboard_client_t upon successful return. Must be freed using
75
- * preboard_client_free() after use.
76
- * @param label The label to use for communication. Usually the program name.
77
- * Pass NULL to disable sending the label in requests to lockdownd.
78
- *
79
- * @return PREBOARD_E_SUCCESS on success, or a PREBOARD_E_* error
80
- * code otherwise.
81
- */
82
- LIBIMOBILEDEVICE_API preboard_error_t preboard_client_start_service(idevice_t device, preboard_client_t * client, const char* label);
83
-
84
- /**
85
- * Disconnects a preboard client from the device and frees up the
86
- * preboard client data.
87
- *
88
- * @param client The preboard client to disconnect and free.
89
- *
90
- * @return PREBOARD_E_SUCCESS on success, PREBOARD_E_INVALID_ARG when
91
- * client is NULL, or a PREBOARD_E_* error code otherwise.
92
- */
93
- LIBIMOBILEDEVICE_API preboard_error_t preboard_client_free(preboard_client_t client);
94
-
95
- /**
96
- * Sends a plist to the service.
97
- *
98
- * @param client The preboard client
99
- * @param plist The plist to send
100
- *
101
- * @return PREBOARD_E_SUCCESS on success,
102
- * PREBOARD_E_INVALID_ARG when client or plist is NULL,
103
- * or a PREBOARD_E_* error code on error
104
- */
105
- LIBIMOBILEDEVICE_API preboard_error_t preboard_send(preboard_client_t client, plist_t plist);
106
-
107
- /**
108
- * Receives a plist from the service.
109
- *
110
- * @param client The preboard client
111
- * @param plist Pointer to a plist_t what will be set to the received plist
112
- *
113
- * @return PREBOARD_E_SUCCESS on success,
114
- * PREBOARD_E_INVALID_ARG when client or plist is NULL,
115
- * PREBOARD_E_TIMEOUT when no data was received after 5 seconds,
116
- * or a PREBOARD_E_* error code on error
117
- */
118
- LIBIMOBILEDEVICE_API preboard_error_t preboard_receive(preboard_client_t client, plist_t * plist);
119
-
120
- /**
121
- * Receives a plist from the service with the specified timeout.
122
- *
123
- * @param client The preboard client
124
- * @param plist Pointer to a plist_t what will be set to the received plist
125
- * @param timeout_ms Timeout in milliseconds
126
- *
127
- * @return PREBOARD_E_SUCCESS on success,
128
- * PREBOARD_E_INVALID_ARG when client or plist is NULL,
129
- * PREBOARD_E_TIMEOUT when no data was received after the given timeout,
130
- * or a PREBOARD_E_* error code on error.
131
- */
132
- LIBIMOBILEDEVICE_API preboard_error_t preboard_receive_with_timeout(preboard_client_t client, plist_t * plist, uint32_t timeout_ms);
133
-
134
- /**
135
- * Tells the preboard service to create a stashbag. This will make the device
136
- * show a passcode entry so it can generate and store a token that is later
137
- * used during restore.
138
- *
139
- * @param client The preboard client
140
- * @param manifest An optional manifest
141
- * @param status_cb Callback function that will receive status and error messages.
142
- * Can be NULL if you want to handle receiving messages in your own code.
143
- * @param user_data User data for callback function or NULL.
144
- *
145
- * The callback or following preboard_receive* invocations will usually
146
- * receive a dictionary with:
147
- * { ShowDialog: true }
148
- * If the user does not enter a passcode, after 2 minutes a timeout is reached
149
- * and the device sends a dictionary with:
150
- * { Timeout: true }
151
- * followed by { HideDialog: true }
152
- * If the user aborts the passcode entry, the device sends a dictionary:
153
- * { Error: 1, ErrorString: \<error string\> }
154
- * followed by { HideDialog: true }
155
- *
156
- * @return PREBOARD_E_SUCCESS if the command was successfully submitted,
157
- * PREBOARD_E_INVALID_ARG when client is invalid,
158
- * or a PREBOARD_E_* error code on error.
159
- */
160
- LIBIMOBILEDEVICE_API preboard_error_t preboard_create_stashbag(preboard_client_t client, plist_t manifest, preboard_status_cb_t status_cb, void *user_data);
161
-
162
- /**
163
- * Instructs the preboard service to commit a previously created stashbag.
164
- *
165
- * @param client The preboard client to use for receiving
166
- * @param manifest An optional manifest
167
- * @param status_cb Callback function that will receive status and error messages
168
- * Can be NULL if you want to handle receiving messages in your own code.
169
- * @param user_data User data for callback function or NULL.
170
- *
171
- * The callback or following preboard_receive* invocations will usually
172
- * receive a dictionary with:
173
- * { StashbagCommitComplete: true }
174
- * or in case of an error:
175
- * { StashbagCommitComplete: 0, Error: 1, \<optional\> ErrorString: \<error string\> }
176
- *
177
- * @return PREBOARD_E_SUCCESS if the command was successfully submitted,
178
- * PREBOARD_E_INVALID_ARG when client is invalid,
179
- * or a PREBOARD_E_* error code on error.
180
- */
181
- LIBIMOBILEDEVICE_API preboard_error_t preboard_commit_stashbag(preboard_client_t client, plist_t manifest, preboard_status_cb_t status_cb, void *user_data);
182
-
183
- #ifdef __cplusplus
184
- }
185
- #endif
186
-
187
- #endif
@@ -1,184 +0,0 @@
1
- /**
2
- * @file libimobiledevice/property_list_service.h
3
- * @brief Definitions for the PropertyList service
4
- * \internal
5
- *
6
- * Copyright (c) 2010-2014 Martin Szulecki All Rights Reserved.
7
- * Copyright (c) 2010-2014 Nikias Bassen, All Rights Reserved.
8
- *
9
- * This library is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU Lesser General Public
11
- * License as published by the Free Software Foundation; either
12
- * version 2.1 of the License, or (at your option) any later version.
13
- *
14
- * This library is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
- * Lesser General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU Lesser General Public
20
- * License along with this library; if not, write to the Free Software
21
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22
- */
23
-
24
- #ifndef IPROPERTY_LIST_SERVICE_H
25
- #define IPROPERTY_LIST_SERVICE_H
26
-
27
- #ifdef __cplusplus
28
- extern "C" {
29
- #endif
30
-
31
- #include <libimobiledevice/lockdown.h>
32
- #include <libimobiledevice/service.h>
33
-
34
- /** Error Codes */
35
- typedef enum {
36
- PROPERTY_LIST_SERVICE_E_SUCCESS = 0,
37
- PROPERTY_LIST_SERVICE_E_INVALID_ARG = -1,
38
- PROPERTY_LIST_SERVICE_E_PLIST_ERROR = -2,
39
- PROPERTY_LIST_SERVICE_E_MUX_ERROR = -3,
40
- PROPERTY_LIST_SERVICE_E_SSL_ERROR = -4,
41
- PROPERTY_LIST_SERVICE_E_RECEIVE_TIMEOUT = -5,
42
- PROPERTY_LIST_SERVICE_E_NOT_ENOUGH_DATA = -6,
43
- PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR = -256
44
- } property_list_service_error_t;
45
-
46
- typedef struct property_list_service_client_private property_list_service_private; /**< \private */
47
- typedef property_list_service_private* property_list_service_client_t; /**< The client handle. */
48
-
49
- /* Interface */
50
-
51
- /**
52
- * Creates a new property list service for the specified port.
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 be set to a newly allocated
57
- * property_list_service_client_t upon successful return.
58
- *
59
- * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,
60
- * PROPERTY_LIST_SERVICE_E_INVALID_ARG when one of the arguments is invalid,
61
- * or PROPERTY_LIST_SERVICE_E_MUX_ERROR when connecting to the device failed.
62
- */
63
- LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_client_new(idevice_t device, lockdownd_service_descriptor_t service, property_list_service_client_t *client);
64
-
65
- /**
66
- * Frees a PropertyList service.
67
- *
68
- * @param client The property list service to free.
69
- *
70
- * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,
71
- * PROPERTY_LIST_SERVICE_E_INVALID_ARG when client is invalid, or a
72
- * PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when another error occurred.
73
- */
74
- LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_client_free(property_list_service_client_t client);
75
-
76
- /**
77
- * Sends an XML plist.
78
- *
79
- * @param client The property list service client to use for sending.
80
- * @param plist plist to send
81
- *
82
- * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,
83
- * PROPERTY_LIST_SERVICE_E_INVALID_ARG when client or plist is NULL,
84
- * PROPERTY_LIST_SERVICE_E_PLIST_ERROR when dict is not a valid plist,
85
- * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when an unspecified error occurs.
86
- */
87
- LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_send_xml_plist(property_list_service_client_t client, plist_t plist);
88
-
89
- /**
90
- * Sends a binary plist.
91
- *
92
- * @param client The property list service client to use for sending.
93
- * @param plist plist to send
94
- *
95
- * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,
96
- * PROPERTY_LIST_SERVICE_E_INVALID_ARG when client or plist is NULL,
97
- * PROPERTY_LIST_SERVICE_E_PLIST_ERROR when dict is not a valid plist,
98
- * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when an unspecified error occurs.
99
- */
100
- LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_send_binary_plist(property_list_service_client_t client, plist_t plist);
101
-
102
- /**
103
- * Receives a plist using the given property list service client with specified
104
- * timeout.
105
- * Binary or XML plists are automatically handled.
106
- *
107
- * @param client The property list service client to use for receiving
108
- * @param plist pointer to a plist_t that will point to the received plist
109
- * upon successful return
110
- * @param timeout Maximum time in milliseconds to wait for data.
111
- *
112
- * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,
113
- * PROPERTY_LIST_SERVICE_E_INVALID_ARG when connection or *plist is NULL,
114
- * PROPERTY_LIST_SERVICE_E_PLIST_ERROR when the received data cannot be
115
- * converted to a plist, PROPERTY_LIST_SERVICE_E_MUX_ERROR when a
116
- * communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when
117
- * an unspecified error occurs.
118
- */
119
- LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_receive_plist_with_timeout(property_list_service_client_t client, plist_t *plist, unsigned int timeout);
120
-
121
- /**
122
- * Receives a plist using the given property list service client.
123
- * Binary or XML plists are automatically handled.
124
- *
125
- * This function is like property_list_service_receive_plist_with_timeout
126
- * using a timeout of 10 seconds.
127
- * @see property_list_service_receive_plist_with_timeout
128
- *
129
- * @param client The property list service client to use for receiving
130
- * @param plist pointer to a plist_t that will point to the received plist
131
- * upon successful return
132
- *
133
- * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,
134
- * PROPERTY_LIST_SERVICE_E_INVALID_ARG when client or *plist is NULL,
135
- * PROPERTY_LIST_SERVICE_E_NOT_ENOUGH_DATA when not enough data
136
- * received, PROPERTY_LIST_SERVICE_E_RECEIVE_TIMEOUT when the connection times out,
137
- * PROPERTY_LIST_SERVICE_E_PLIST_ERROR when the received data cannot be
138
- * converted to a plist, PROPERTY_LIST_SERVICE_E_MUX_ERROR when a
139
- * communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when
140
- * an unspecified error occurs.
141
- */
142
- LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_receive_plist(property_list_service_client_t client, plist_t *plist);
143
-
144
- /**
145
- * Enable SSL for the given property list service client.
146
- *
147
- * @param client The connected property list service client for which SSL
148
- * should be enabled.
149
- *
150
- * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,
151
- * PROPERTY_LIST_SERVICE_E_INVALID_ARG if one or more of the arguments are invalid,
152
- * PROPERTY_LIST_SERVICE_E_SSL_ERROR when SSL could not be enabled,
153
- * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise.
154
- */
155
- LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_enable_ssl(property_list_service_client_t client);
156
-
157
- /**
158
- * Disable SSL for the given property list service client.
159
- *
160
- * @param client The connected property list service client for which SSL
161
- * should be disabled.
162
- *
163
- * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,
164
- * PROPERTY_LIST_SERVICE_E_INVALID_ARG if one or more of the arguments are invalid,
165
- * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise.
166
- */
167
- LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_disable_ssl(property_list_service_client_t client);
168
-
169
- /**
170
- * Return a handle to the parent #service_client_t of the given property list service client.
171
- *
172
- * @param client The property list service client
173
- * @param service_client Pointer to be assigned to the parent #service_client_t
174
- *
175
- * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,
176
- * PROPERTY_LIST_SERVICE_E_INVALID_ARG if one or more of the arguments are invalid.
177
- */
178
- LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_get_service_client(property_list_service_client_t client, service_client_t *service_client);
179
-
180
- #ifdef __cplusplus
181
- }
182
- #endif
183
-
184
- #endif