@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,202 +0,0 @@
1
- /**
2
- * @file libimobiledevice/service.h
3
- * @brief Generic basic service implementation to inherit.
4
- * \internal
5
- *
6
- * Copyright (c) 2013-2014 Martin Szulecki 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 ISERVICE_H
24
- #define ISERVICE_H
25
-
26
- #ifdef __cplusplus
27
- extern "C" {
28
- #endif
29
-
30
- #include <libimobiledevice/libimobiledevice.h>
31
- #include <libimobiledevice/lockdown.h>
32
-
33
- /** Error Codes */
34
- typedef enum {
35
- SERVICE_E_SUCCESS = 0,
36
- SERVICE_E_INVALID_ARG = -1,
37
- SERVICE_E_MUX_ERROR = -3,
38
- SERVICE_E_SSL_ERROR = -4,
39
- SERVICE_E_START_SERVICE_ERROR = -5,
40
- SERVICE_E_NOT_ENOUGH_DATA = -6,
41
- SERVICE_E_TIMEOUT = -7,
42
- SERVICE_E_UNKNOWN_ERROR = -256
43
- } service_error_t;
44
-
45
- typedef struct service_client_private service_client_private; /**< \private */
46
- typedef service_client_private* service_client_t; /**< The client handle. */
47
-
48
- /** service constructor cast */
49
- #define SERVICE_CONSTRUCTOR(x) (int32_t (*)(idevice_t, lockdownd_service_descriptor_t, void**))(x)
50
-
51
- /* Interface */
52
-
53
- /**
54
- * Creates a new service for the specified service descriptor.
55
- *
56
- * @param device The device to connect to.
57
- * @param service The service descriptor returned by lockdownd_start_service.
58
- * @param client Pointer that will be set to a newly allocated
59
- * service_client_t upon successful return.
60
- *
61
- * @return SERVICE_E_SUCCESS on success,
62
- * SERVICE_E_INVALID_ARG when one of the arguments is invalid,
63
- * or SERVICE_E_MUX_ERROR when connecting to the device failed.
64
- */
65
- LIBIMOBILEDEVICE_API service_error_t service_client_new(idevice_t device, lockdownd_service_descriptor_t service, service_client_t *client);
66
-
67
- /**
68
- * Starts a new service on the specified device with given name and
69
- * connects to it.
70
- *
71
- * @param device The device to connect to.
72
- * @param service_name The name of the service to start.
73
- * @param client Pointer that will point to a newly allocated service_client_t
74
- * upon successful return. Must be freed using service_client_free() after
75
- * 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
- * @param constructor_func Constructor function for the service client to create (e.g. afc_client_new())
79
- * @param error_code Pointer to an int32_t that will receive the service start error code.
80
- *
81
- * @return SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code
82
- * otherwise.
83
- */
84
- LIBIMOBILEDEVICE_API service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, int32_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), int32_t *error_code);
85
-
86
- /**
87
- * Frees a service instance.
88
- *
89
- * @param client The service instance to free.
90
- *
91
- * @return SERVICE_E_SUCCESS on success,
92
- * SERVICE_E_INVALID_ARG when client is invalid, or a
93
- * SERVICE_E_UNKNOWN_ERROR when another error occurred.
94
- */
95
- LIBIMOBILEDEVICE_API service_error_t service_client_free(service_client_t client);
96
-
97
-
98
- /**
99
- * Sends data using the given service client.
100
- *
101
- * @param client The service client to use for sending.
102
- * @param data Data to send
103
- * @param size Size of the data to send
104
- * @param sent Number of bytes sent (can be NULL to ignore)
105
- *
106
- * @return SERVICE_E_SUCCESS on success,
107
- * SERVICE_E_INVALID_ARG when one or more parameters are
108
- * invalid, or SERVICE_E_UNKNOWN_ERROR when an unspecified
109
- * error occurs.
110
- */
111
- LIBIMOBILEDEVICE_API service_error_t service_send(service_client_t client, const char *data, uint32_t size, uint32_t *sent);
112
-
113
- /**
114
- * Receives data using the given service client with specified timeout.
115
- *
116
- * @param client The service client to use for receiving
117
- * @param data Buffer that will be filled with the data received
118
- * @param size Number of bytes to receive
119
- * @param received Number of bytes received (can be NULL to ignore)
120
- * @param timeout Maximum time in milliseconds to wait for data.
121
- *
122
- * @return SERVICE_E_SUCCESS on success,
123
- * SERVICE_E_INVALID_ARG when one or more parameters are
124
- * invalid, SERVICE_E_MUX_ERROR when a communication error
125
- * occurs, or SERVICE_E_UNKNOWN_ERROR when an unspecified
126
- * error occurs.
127
- */
128
- LIBIMOBILEDEVICE_API service_error_t service_receive_with_timeout(service_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout);
129
-
130
- /**
131
- * Receives data using the given service client.
132
- *
133
- * @param client The service client to use for receiving
134
- * @param data Buffer that will be filled with the data received
135
- * @param size Number of bytes to receive
136
- * @param received Number of bytes received (can be NULL to ignore)
137
- *
138
- * @return SERVICE_E_SUCCESS on success,
139
- * SERVICE_E_INVALID_ARG when one or more parameters are
140
- * invalid, SERVICE_E_NOT_ENOUGH_DATA when not enough data
141
- * received, SERVICE_E_TIMEOUT when the connection times out,
142
- * SERVICE_E_MUX_ERROR when a communication error
143
- * occurs, or SERVICE_E_UNKNOWN_ERROR when an unspecified
144
- * error occurs.
145
- */
146
- LIBIMOBILEDEVICE_API service_error_t service_receive(service_client_t client, char *data, uint32_t size, uint32_t *received);
147
-
148
-
149
- /**
150
- * Enable SSL for the given service client.
151
- *
152
- * @param client The connected service client for that SSL should be enabled.
153
- *
154
- * @return SERVICE_E_SUCCESS on success,
155
- * SERVICE_E_INVALID_ARG if client or client->connection is
156
- * NULL, SERVICE_E_NOT_ENOUGH_DATA when not enough data
157
- * received, SERVICE_E_TIMEOUT when the connection times out,
158
- * SERVICE_E_SSL_ERROR when SSL could not be enabled,
159
- * or SERVICE_E_UNKNOWN_ERROR otherwise.
160
- */
161
- LIBIMOBILEDEVICE_API service_error_t service_enable_ssl(service_client_t client);
162
-
163
- /**
164
- * Disable SSL for the given service client.
165
- *
166
- * @param client The connected service client for which SSL should be disabled.
167
- *
168
- * @return SERVICE_E_SUCCESS on success,
169
- * SERVICE_E_INVALID_ARG if client or client->connection is
170
- * NULL, or SERVICE_E_UNKNOWN_ERROR otherwise.
171
- */
172
- LIBIMOBILEDEVICE_API service_error_t service_disable_ssl(service_client_t client);
173
-
174
- /**
175
- * Disable SSL for the given service client, optionally without sending SSL terminate messages.
176
- *
177
- * @param client The connected service client for which SSL should be disabled.
178
- * @param sslBypass A boolean value indicating wether to disable SSL with a proper
179
- * SSL shutdown (0), or bypass the shutdown (1).
180
- *
181
- * @return SERVICE_E_SUCCESS on success,
182
- * SERVICE_E_INVALID_ARG if client or client->connection is
183
- * NULL, or SERVICE_E_UNKNOWN_ERROR otherwise.
184
- */
185
- LIBIMOBILEDEVICE_API service_error_t service_disable_bypass_ssl(service_client_t client, uint8_t sslBypass);
186
-
187
- /**
188
- * Return a handle to the parent #idevice_connection_t of the given service client.
189
- *
190
- * @param client The service client
191
- * @param connection Pointer to be assigned to the #idevice_connection_t.
192
- *
193
- * @return SERVICE_E_SUCCESS on success,
194
- * SERVICE_E_INVALID_ARG if one or more of the arguments are invalid.
195
- */
196
- LIBIMOBILEDEVICE_API service_error_t service_get_connection(service_client_t client, idevice_connection_t *connection);
197
-
198
- #ifdef __cplusplus
199
- }
200
- #endif
201
-
202
- #endif
@@ -1,184 +0,0 @@
1
- /**
2
- * @file libimobiledevice/syslog_relay.h
3
- * @brief Capture the syslog output from a device.
4
- * \internal
5
- *
6
- * Copyright (c) 2019-2020 Nikias Bassen, All Rights Reserved.
7
- * Copyright (c) 2013-2014 Martin Szulecki, 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 ISYSLOG_RELAY_H
25
- #define ISYSLOG_RELAY_H
26
-
27
- #ifdef __cplusplus
28
- extern "C" {
29
- #endif
30
-
31
- #include <libimobiledevice/libimobiledevice.h>
32
- #include <libimobiledevice/lockdown.h>
33
-
34
- /** Service identifier passed to lockdownd_start_service() to start the syslog relay service */
35
- #define SYSLOG_RELAY_SERVICE_NAME "com.apple.syslog_relay"
36
-
37
- /** Error Codes */
38
- typedef enum {
39
- SYSLOG_RELAY_E_SUCCESS = 0,
40
- SYSLOG_RELAY_E_INVALID_ARG = -1,
41
- SYSLOG_RELAY_E_MUX_ERROR = -2,
42
- SYSLOG_RELAY_E_SSL_ERROR = -3,
43
- SYSLOG_RELAY_E_NOT_ENOUGH_DATA = -4,
44
- SYSLOG_RELAY_E_TIMEOUT = -5,
45
- SYSLOG_RELAY_E_UNKNOWN_ERROR = -256
46
- } syslog_relay_error_t;
47
-
48
- typedef struct syslog_relay_client_private syslog_relay_client_private; /**< \private */
49
- typedef syslog_relay_client_private *syslog_relay_client_t; /**< The client handle. */
50
-
51
- /** Receives each character received from the device. */
52
- typedef void (*syslog_relay_receive_cb_t)(char c, void *user_data);
53
-
54
- /* Interface */
55
-
56
- /**
57
- * Connects to the syslog_relay service on the specified device.
58
- *
59
- * @param device The device to connect to.
60
- * @param service The service descriptor returned by lockdownd_start_service.
61
- * @param client Pointer that will point to a newly allocated
62
- * syslog_relay_client_t upon successful return. Must be freed using
63
- * syslog_relay_client_free() after use.
64
- *
65
- * @return SYSLOG_RELAY_E_SUCCESS on success, SYSLOG_RELAY_E_INVALID_ARG when
66
- * client is NULL, or an SYSLOG_RELAY_E_* error code otherwise.
67
- */
68
- LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, syslog_relay_client_t * client);
69
-
70
- /**
71
- * Starts a new syslog_relay service on the specified device and connects to it.
72
- *
73
- * @param device The device to connect to.
74
- * @param client Pointer that will point to a newly allocated
75
- * syslog_relay_client_t upon successful return. Must be freed using
76
- * syslog_relay_client_free() after use.
77
- * @param label The label to use for communication. Usually the program name.
78
- * Pass NULL to disable sending the label in requests to lockdownd.
79
- *
80
- * @return SYSLOG_RELAY_E_SUCCESS on success, or an SYSLOG_RELAY_E_* error
81
- * code otherwise.
82
- */
83
- LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_start_service(idevice_t device, syslog_relay_client_t * client, const char* label);
84
-
85
- /**
86
- * Disconnects a syslog_relay client from the device and frees up the
87
- * syslog_relay client data.
88
- *
89
- * @param client The syslog_relay client to disconnect and free.
90
- *
91
- * @return SYSLOG_RELAY_E_SUCCESS on success, SYSLOG_RELAY_E_INVALID_ARG when
92
- * client is NULL, or an SYSLOG_RELAY_E_* error code otherwise.
93
- */
94
- LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client);
95
-
96
-
97
- /**
98
- * Starts capturing the syslog of the device using a callback.
99
- *
100
- * Use syslog_relay_stop_capture() to stop receiving the syslog.
101
- *
102
- * @param client The syslog_relay client to use
103
- * @param callback Callback to receive each character from the syslog.
104
- * @param user_data Custom pointer passed to the callback function.
105
- *
106
- * @return SYSLOG_RELAY_E_SUCCESS on success,
107
- * SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are
108
- * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified
109
- * error occurs or a syslog capture has already been started.
110
- */
111
- LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data);
112
-
113
- /**
114
- * Starts capturing the *raw* syslog of the device using a callback.
115
- * This function is like syslog_relay_start_capture with the difference that
116
- * it will neither check nor process the received data before passing it to
117
- * the callback function.
118
- *
119
- * Use syslog_relay_stop_capture() to stop receiving the syslog.
120
- *
121
- * @note Use syslog_relay_start_capture for a safer implementation.
122
- *
123
- * @param client The syslog_relay client to use
124
- * @param callback Callback to receive each character from the syslog.
125
- * @param user_data Custom pointer passed to the callback function.
126
- *
127
- * @return SYSLOG_RELAY_E_SUCCESS on success,
128
- * SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are
129
- * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified
130
- * error occurs or a syslog capture has already been started.
131
- */
132
- LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_start_capture_raw(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data);
133
-
134
- /**
135
- * Stops capturing the syslog of the device.
136
- *
137
- * Use syslog_relay_start_capture() to start receiving the syslog.
138
- *
139
- * @param client The syslog_relay client to use
140
- *
141
- * @return SYSLOG_RELAY_E_SUCCESS on success,
142
- * SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are
143
- * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified
144
- * error occurs or a syslog capture has already been started.
145
- */
146
- LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client);
147
-
148
- /* Receiving */
149
-
150
- /**
151
- * Receives data using the given syslog_relay client with specified timeout.
152
- *
153
- * @param client The syslog_relay client to use for receiving
154
- * @param data Buffer that will be filled with the data received
155
- * @param size Number of bytes to receive
156
- * @param received Number of bytes received (can be NULL to ignore)
157
- * @param timeout Maximum time in milliseconds to wait for data.
158
- *
159
- * @return SYSLOG_RELAY_E_SUCCESS on success,
160
- * SYSLOG_RELAY_E_INVALID_ARG when one or more parameters are
161
- * invalid, SYSLOG_RELAY_E_MUX_ERROR when a communication error
162
- * occurs, or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified
163
- * error occurs.
164
- */
165
- LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_receive_with_timeout(syslog_relay_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout);
166
-
167
- /**
168
- * Receives data from the service.
169
- *
170
- * @param client The syslog_relay client
171
- * @param data Buffer that will be filled with the data received
172
- * @param size Number of bytes to receive
173
- * @param received Number of bytes received (can be NULL to ignore)
174
- *
175
- * @return SYSLOG_RELAY_E_SUCCESS on success,
176
- * SYSLOG_RELAY_E_INVALID_ARG when client or plist is NULL
177
- */
178
- LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_receive(syslog_relay_client_t client, char *data, uint32_t size, uint32_t *received);
179
-
180
- #ifdef __cplusplus
181
- }
182
- #endif
183
-
184
- #endif
@@ -1,137 +0,0 @@
1
- /**
2
- * @file libimobiledevice/webinspector.h
3
- * @brief WebKit Remote Debugging.
4
- * \internal
5
- *
6
- * Copyright (c) 2013-2014 Martin Szulecki All Rights Reserved.
7
- * Copyright (c) 2013 Yury Melnichek 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 IWEBINSPECTOR_H
25
- #define IWEBINSPECTOR_H
26
-
27
- #ifdef __cplusplus
28
- extern "C" {
29
- #endif
30
-
31
- #include <libimobiledevice/libimobiledevice.h>
32
- #include <libimobiledevice/lockdown.h>
33
-
34
- /** Service identifier passed to lockdownd_start_service() to start the webinspector service */
35
- #define WEBINSPECTOR_SERVICE_NAME "com.apple.webinspector"
36
-
37
- /** Error Codes */
38
- typedef enum {
39
- WEBINSPECTOR_E_SUCCESS = 0,
40
- WEBINSPECTOR_E_INVALID_ARG = -1,
41
- WEBINSPECTOR_E_PLIST_ERROR = -2,
42
- WEBINSPECTOR_E_MUX_ERROR = -3,
43
- WEBINSPECTOR_E_SSL_ERROR = -4,
44
- WEBINSPECTOR_E_RECEIVE_TIMEOUT = -5,
45
- WEBINSPECTOR_E_NOT_ENOUGH_DATA = -6,
46
- WEBINSPECTOR_E_UNKNOWN_ERROR = -256
47
- } webinspector_error_t;
48
-
49
- typedef struct webinspector_client_private webinspector_client_private; /**< \private */
50
- typedef webinspector_client_private *webinspector_client_t; /**< The client handle. */
51
-
52
-
53
- /**
54
- * Connects to the webinspector service on the specified device.
55
- *
56
- * @param device The device to connect to.
57
- * @param service The service descriptor returned by lockdownd_start_service.
58
- * @param client Pointer that will point to a newly allocated
59
- * webinspector_client_t upon successful return. Must be freed using
60
- * webinspector_client_free() after use.
61
- *
62
- * @return WEBINSPECTOR_E_SUCCESS on success, WEBINSPECTOR_E_INVALID_ARG when
63
- * client is NULL, or an WEBINSPECTOR_E_* error code otherwise.
64
- */
65
- LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service_descriptor_t service, webinspector_client_t * client);
66
-
67
- /**
68
- * Starts a new webinspector service on the specified device and connects to it.
69
- *
70
- * @param device The device to connect to.
71
- * @param client Pointer that will point to a newly allocated
72
- * webinspector_client_t upon successful return. Must be freed using
73
- * webinspector_client_free() after use.
74
- * @param label The label to use for communication. Usually the program name.
75
- * Pass NULL to disable sending the label in requests to lockdownd.
76
- *
77
- * @return WEBINSPECTOR_E_SUCCESS on success, or an WEBINSPECTOR_E_* error
78
- * code otherwise.
79
- */
80
- LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client, const char* label);
81
-
82
- /**
83
- * Disconnects a webinspector client from the device and frees up the
84
- * webinspector client data.
85
- *
86
- * @param client The webinspector client to disconnect and free.
87
- *
88
- * @return WEBINSPECTOR_E_SUCCESS on success, WEBINSPECTOR_E_INVALID_ARG when
89
- * client is NULL, or an WEBINSPECTOR_E_* error code otherwise.
90
- */
91
- LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_free(webinspector_client_t client);
92
-
93
-
94
- /**
95
- * Sends a plist to the service.
96
- *
97
- * @param client The webinspector client
98
- * @param plist The plist to send
99
- *
100
- * @return DIAGNOSTICS_RELAY_E_SUCCESS on success,
101
- * DIAGNOSTICS_RELAY_E_INVALID_ARG when client or plist is NULL
102
- */
103
- LIBIMOBILEDEVICE_API webinspector_error_t webinspector_send(webinspector_client_t client, plist_t plist);
104
-
105
- /**
106
- * Receives a plist from the service.
107
- *
108
- * @param client The webinspector client
109
- * @param plist The plist to store the received data
110
- *
111
- * @return DIAGNOSTICS_RELAY_E_SUCCESS on success,
112
- * DIAGNOSTICS_RELAY_E_INVALID_ARG when client or plist is NULL
113
- */
114
- LIBIMOBILEDEVICE_API webinspector_error_t webinspector_receive(webinspector_client_t client, plist_t * plist);
115
-
116
- /**
117
- * Receives a plist using the given webinspector client.
118
- *
119
- * @param client The webinspector client to use for receiving
120
- * @param plist pointer to a plist_t that will point to the received plist
121
- * upon successful return
122
- * @param timeout_ms Maximum time in milliseconds to wait for data.
123
- *
124
- * @return WEBINSPECTOR_E_SUCCESS on success,
125
- * WEBINSPECTOR_E_INVALID_ARG when client or *plist is NULL,
126
- * WEBINSPECTOR_E_PLIST_ERROR when the received data cannot be
127
- * converted to a plist, WEBINSPECTOR_E_MUX_ERROR when a
128
- * communication error occurs, or WEBINSPECTOR_E_UNKNOWN_ERROR
129
- * when an unspecified error occurs.
130
- */
131
- LIBIMOBILEDEVICE_API webinspector_error_t webinspector_receive_with_timeout(webinspector_client_t client, plist_t * plist, uint32_t timeout_ms);
132
-
133
- #ifdef __cplusplus
134
- }
135
- #endif
136
-
137
- #endif
@@ -1,80 +0,0 @@
1
- /*
2
- * Array.h
3
- * Array node type for C++ binding
4
- *
5
- * Copyright (c) 2009 Jonathan Beck All Rights Reserved.
6
- *
7
- * This library is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU Lesser General Public
9
- * License as published by the Free Software Foundation; either
10
- * version 2.1 of the License, or (at your option) any later version.
11
- *
12
- * This library is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- * Lesser General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU Lesser General Public
18
- * License along with this library; if not, write to the Free Software
19
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
- */
21
-
22
- #ifndef PLIST_ARRAY_H
23
- #define PLIST_ARRAY_H
24
-
25
- #include <plist/Structure.h>
26
- #include <vector>
27
-
28
- namespace PList
29
- {
30
-
31
- class Array : public Structure
32
- {
33
- public :
34
- Array(Node* parent = NULL);
35
- Array(plist_t node, Node* parent = NULL);
36
- Array(const Array& a);
37
- Array& operator=(const Array& a);
38
- virtual ~Array();
39
-
40
- Node* Clone() const;
41
-
42
- typedef std::vector<Node*>::iterator iterator;
43
- typedef std::vector<Node*>::const_iterator const_iterator;
44
-
45
- Node* operator[](unsigned int index);
46
- Node* Back();
47
- Node* back();
48
- Node* Front();
49
- Node* front();
50
- iterator Begin();
51
- iterator begin();
52
- iterator End();
53
- iterator end();
54
- const_iterator Begin() const;
55
- const_iterator begin() const;
56
- const_iterator End() const;
57
- const_iterator end() const;
58
- size_t size() const;
59
- void Append(const Node& node);
60
- void Append(const Node* node);
61
- void Insert(const Node& node, unsigned int pos);
62
- void Insert(const Node* node, unsigned int pos);
63
- void Remove(Node* node);
64
- void Remove(unsigned int pos);
65
- unsigned int GetNodeIndex(const Node& node) const;
66
- unsigned int GetNodeIndex(const Node* node) const;
67
- template <typename T> T* at(unsigned int index) {
68
- return (T*)(_array.at(index));
69
- }
70
- template <typename T> T* At(unsigned int index) {
71
- return (T*)(_array.at(index));
72
- }
73
-
74
- private :
75
- std::vector<Node*> _array;
76
- };
77
-
78
- };
79
-
80
- #endif // PLIST_ARRAY_H
@@ -1,48 +0,0 @@
1
- /*
2
- * Boolean.h
3
- * Boolean node type for C++ binding
4
- *
5
- * Copyright (c) 2009 Jonathan Beck All Rights Reserved.
6
- *
7
- * This library is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU Lesser General Public
9
- * License as published by the Free Software Foundation; either
10
- * version 2.1 of the License, or (at your option) any later version.
11
- *
12
- * This library is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
- * Lesser General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU Lesser General Public
18
- * License along with this library; if not, write to the Free Software
19
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
- */
21
-
22
- #ifndef PLIST_BOOLEAN_H
23
- #define PLIST_BOOLEAN_H
24
-
25
- #include <plist/Node.h>
26
-
27
- namespace PList
28
- {
29
-
30
- class Boolean : public Node
31
- {
32
- public :
33
- Boolean(Node* parent = NULL);
34
- Boolean(plist_t node, Node* parent = NULL);
35
- Boolean(const Boolean& b);
36
- Boolean& operator=(const Boolean& b);
37
- Boolean(bool b);
38
- virtual ~Boolean();
39
-
40
- Node* Clone() const;
41
-
42
- void SetValue(bool b);
43
- bool GetValue() const;
44
- };
45
-
46
- };
47
-
48
- #endif // PLIST_BOOLEAN_H