@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,179 +0,0 @@
1
- /**
2
- * @file libimobiledevice/restore.h
3
- * @brief Initiate restore process or reboot device.
4
- * @note This service is only available if the device is in restore mode.
5
- * \internal
6
- *
7
- * Copyright (c) 2010-2014 Martin Szulecki All Rights Reserved.
8
- * Copyright (c) 2010 Joshua Hill. All Rights Reserved.
9
- *
10
- * This library is free software; you can redistribute it and/or
11
- * modify it under the terms of the GNU Lesser General Public
12
- * License as published by the Free Software Foundation; either
13
- * version 2.1 of the License, or (at your option) any later version.
14
- *
15
- * This library is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
- * Lesser General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU Lesser General Public
21
- * License along with this library; if not, write to the Free Software
22
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
- */
24
-
25
- #ifndef IRESTORE_H
26
- #define IRESTORE_H
27
-
28
- #ifdef __cplusplus
29
- extern "C" {
30
- #endif
31
-
32
- #include <libimobiledevice/libimobiledevice.h>
33
-
34
- /** Error Codes */
35
- typedef enum {
36
- RESTORE_E_SUCCESS = 0,
37
- RESTORE_E_INVALID_ARG = -1,
38
- RESTORE_E_PLIST_ERROR = -2,
39
- RESTORE_E_MUX_ERROR = -3,
40
- RESTORE_E_NOT_ENOUGH_DATA = -4,
41
- RESTORE_E_RECEIVE_TIMEOUT = -5,
42
- RESTORE_E_UNKNOWN_ERROR = -256
43
- } restored_error_t;
44
-
45
- typedef struct restored_client_private restored_client_private; /**< \private */
46
- typedef restored_client_private *restored_client_t; /**< The client handle. */
47
-
48
- /* Interface */
49
-
50
- /**
51
- * Creates a new restored client for the device.
52
- *
53
- * @param device The device to create a restored client for
54
- * @param client The pointer to the location of the new restored_client
55
- * @param label The label to use for communication. Usually the program name.
56
- *
57
- * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL
58
- */
59
- LIBIMOBILEDEVICE_API restored_error_t restored_client_new(idevice_t device, restored_client_t *client, const char *label);
60
-
61
- /**
62
- * Closes the restored client session if one is running and frees up the
63
- * restored_client struct.
64
- *
65
- * @param client The restore client
66
- *
67
- * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL
68
- */
69
- LIBIMOBILEDEVICE_API restored_error_t restored_client_free(restored_client_t client);
70
-
71
-
72
- /**
73
- * Query the type of the service daemon. Depending on whether the device is
74
- * queried in normal mode or restore mode, different types will be returned.
75
- *
76
- * @param client The restored client
77
- * @param type The type returned by the service daemon. Pass NULL to ignore.
78
- * @param version The restore protocol version. Pass NULL to ignore.
79
- *
80
- * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL
81
- */
82
- LIBIMOBILEDEVICE_API restored_error_t restored_query_type(restored_client_t client, char **type, uint64_t *version);
83
-
84
- /**
85
- * Queries a value from the device specified by a key.
86
- *
87
- * @param client An initialized restored client.
88
- * @param key The key name to request
89
- * @param value A plist node representing the result value node
90
- *
91
- * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL, RESTORE_E_PLIST_ERROR if value for key can't be found
92
- */
93
- LIBIMOBILEDEVICE_API restored_error_t restored_query_value(restored_client_t client, const char *key, plist_t *value);
94
-
95
- /**
96
- * Retrieves a value from information plist specified by a key.
97
- *
98
- * @param client An initialized restored client.
99
- * @param key The key name to request or NULL to query for all keys
100
- * @param value A plist node representing the result value node
101
- *
102
- * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL, RESTORE_E_PLIST_ERROR if value for key can't be found
103
- */
104
- LIBIMOBILEDEVICE_API restored_error_t restored_get_value(restored_client_t client, const char *key, plist_t *value) ;
105
-
106
- /**
107
- * Sends a plist to restored.
108
- *
109
- * @note This function is low-level and should only be used if you need to send
110
- * a new type of message.
111
- *
112
- * @param client The restored client
113
- * @param plist The plist to send
114
- *
115
- * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client or
116
- * plist is NULL
117
- */
118
- LIBIMOBILEDEVICE_API restored_error_t restored_send(restored_client_t client, plist_t plist);
119
-
120
- /**
121
- * Receives a plist from restored.
122
- *
123
- * @param client The restored client
124
- * @param plist The plist to store the received data
125
- *
126
- * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client or
127
- * plist is NULL
128
- */
129
- LIBIMOBILEDEVICE_API restored_error_t restored_receive(restored_client_t client, plist_t *plist);
130
-
131
- /**
132
- * Sends the Goodbye request to restored signaling the end of communication.
133
- *
134
- * @param client The restore client
135
- *
136
- * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL,
137
- * RESTORE_E_PLIST_ERROR if the device did not acknowledge the request
138
- */
139
- LIBIMOBILEDEVICE_API restored_error_t restored_goodbye(restored_client_t client);
140
-
141
-
142
- /**
143
- * Requests to start a restore and retrieve it's port on success.
144
- *
145
- * @param client The restored client
146
- * @param options PLIST_DICT with options for the restore process or NULL
147
- * @param version the restore protocol version, see restored_query_type()
148
- *
149
- * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG if a parameter
150
- * is NULL, RESTORE_E_START_RESTORE_FAILED if the request fails
151
- */
152
- LIBIMOBILEDEVICE_API restored_error_t restored_start_restore(restored_client_t client, plist_t options, uint64_t version);
153
-
154
- /**
155
- * Requests device to reboot.
156
- *
157
- * @param client The restored client
158
- *
159
- * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG if a parameter
160
- * is NULL
161
- */
162
- LIBIMOBILEDEVICE_API restored_error_t restored_reboot(restored_client_t client);
163
-
164
- /* Helper */
165
-
166
- /**
167
- * Sets the label to send for requests to restored.
168
- *
169
- * @param client The restore client
170
- * @param label The label to set or NULL to disable sending a label
171
- *
172
- */
173
- LIBIMOBILEDEVICE_API void restored_client_set_label(restored_client_t client, const char *label);
174
-
175
- #ifdef __cplusplus
176
- }
177
- #endif
178
-
179
- #endif
@@ -1,213 +0,0 @@
1
- /**
2
- * @file libimobiledevice/reverse_proxy.h
3
- * @brief Provide a reverse proxy to allow the device to communicate through,
4
- * which is used during firmware restore.
5
- * \internal
6
- *
7
- * Copyright (c) 2021 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 IREVERSE_PROXY_H
25
- #define IREVERSE_PROXY_H
26
-
27
- #ifdef __cplusplus
28
- extern "C" {
29
- #endif
30
-
31
- #include <libimobiledevice/libimobiledevice.h>
32
-
33
- #define REVERSE_PROXY_DEFAULT_PORT 1082 /**< default port the reverse proxy is listening on */
34
-
35
- /** Error Codes */
36
- typedef enum {
37
- REVERSE_PROXY_E_SUCCESS = 0,
38
- REVERSE_PROXY_E_INVALID_ARG = -1,
39
- REVERSE_PROXY_E_PLIST_ERROR = -2,
40
- REVERSE_PROXY_E_MUX_ERROR = -3,
41
- REVERSE_PROXY_E_SSL_ERROR = -4,
42
- REVERSE_PROXY_E_NOT_ENOUGH_DATA = -5,
43
- REVERSE_PROXY_E_TIMEOUT = -6,
44
- REVERSE_PROXY_E_UNKNOWN_ERROR = -256
45
- } reverse_proxy_error_t;
46
-
47
- typedef struct reverse_proxy_client_private reverse_proxy_client_private; /**< \private */
48
- typedef reverse_proxy_client_private *reverse_proxy_client_t; /**< The client handle. */
49
-
50
- /** reverse proxy client type */
51
- typedef enum {
52
- RP_TYPE_CTRL = 1, /**< control connection */
53
- RP_TYPE_CONN /**< proxy connection */
54
- } reverse_proxy_client_type_t;
55
-
56
- /** reverse proxy status for reverse_proxy_status_cb_t callback */
57
- typedef enum {
58
- RP_STATUS_READY = 1, /**< proxy is ready */
59
- RP_STATUS_TERMINATE, /**< proxy terminated */
60
- RP_STATUS_CONNECT_REQ, /**< connection request received (only RP_TYPE_CTRL) */
61
- RP_STATUS_SHUTDOWN_REQ, /**< shutdown request received (only RP_TYPE_CTRL) */
62
- RP_STATUS_CONNECTED, /**< connection established (only RP_TYPE_CONN) */
63
- RP_STATUS_DISCONNECTED, /**< connection closed (only RP_TYPE_CONN) */
64
- } reverse_proxy_status_t;
65
-
66
- /** reverse proxy data direction passed to reverse_proxy_data_cb_t callback */
67
- typedef enum {
68
- RP_DATA_DIRECTION_OUT = 1, /**< data going out to remote host */
69
- RP_DATA_DIRECTION_IN /**< data coming in from remote host */
70
- } reverse_proxy_data_direction_t;
71
-
72
- /**
73
- * Log callback function prototype.
74
- *
75
- * @param client The client that called the callback function
76
- * @param log_msg The log message
77
- * @param user_data The user_data pointer that was set when registering the callback
78
- */
79
- typedef void (*reverse_proxy_log_cb_t) (reverse_proxy_client_t client, const char* log_msg, void* user_data);
80
-
81
- /**
82
- * Data callback function prototype.
83
- *
84
- * @param client The client that called the callback function
85
- * @param direction The direction of the data, either RP_DATA_DIRECTION_OUT or RP_DATA_DIRECTION_IN
86
- * @param buffer The data buffer
87
- * @param length The length of the data buffer
88
- * @param user_data The user_data pointer that was set when registering the callback
89
- */
90
- typedef void (*reverse_proxy_data_cb_t) (reverse_proxy_client_t client, reverse_proxy_data_direction_t direction, const char* buffer, uint32_t length, void* user_data);
91
-
92
- /**
93
- * Status callback function prototype.
94
- *
95
- * @param client The client that called the callback function
96
- * @param status The status the client is reporting
97
- * @param status_msg A status message the client reports along with the status
98
- * @param user_data The user_data pointer that was set when registering the callback
99
- */
100
- typedef void (*reverse_proxy_status_cb_t) (reverse_proxy_client_t client, reverse_proxy_status_t status, const char* status_msg, void* user_data);
101
-
102
- /**
103
- * Create a reverse proxy client using com.apple.PurpleReverseProxy.Ctrl and
104
- * com.apple.PurpleReverseProxy.Conn lockdown services. This will open a port
105
- * 1083 on the device that iOS apps could connect to; \b however that is
106
- * only allowed if an app has the com.apple.private.PurpleReverseProxy.allowed
107
- * entitlement, which currently only \c /usr/libexec/fdrhelper holds.
108
- *
109
- * @note This function only creates and initializes the reverse proxy;
110
- * to make it operational, call reverse_proxy_client_start_proxy().
111
- *
112
- * @param device The device to connect to.
113
- * @param client Pointer that will be set to a newly allocated #reverse_proxy_client_t
114
- * upon successful return.
115
- * @param label A label to pass to lockdownd when creating the service
116
- * connections, usually the program name.
117
- *
118
- * @return REVERSE_PROXY_E_SUCCESS on success,
119
- * or a REVERSE_PROXY_E_* error code otherwise.
120
- */
121
- LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_create_with_service(idevice_t device, reverse_proxy_client_t* client, const char* label);
122
-
123
- /**
124
- * Create a reverse proxy client using an open port on the device. This is
125
- * used during firmware restores with the default port REVERSE_PROXY_DEFAULT_PORT (1082).
126
- *
127
- * @note This function only creates and initializes the reverse proxy;
128
- * to make it operational, call reverse_proxy_client_start_proxy().
129
- *
130
- * @param device The device to connect to.
131
- * @param client Pointer that will be set to a newly allocated reverse_proxy_client_t
132
- * upon successful return.
133
- * @param device_port An open port on the device. Unless it's being used for
134
- * a custom implementation, pass REVERSE_PROXY_DEFAULT_PORT here.
135
- *
136
- * @return REVERSE_PROXY_E_SUCCESS on success,
137
- * or a REVERSE_PROXY_E_* error code otherwise.
138
- */
139
- LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_create_with_port(idevice_t device, reverse_proxy_client_t* client, uint16_t device_port);
140
-
141
- /**
142
- * Disconnects a reverse proxy client and frees up the client data.
143
- *
144
- * @param client The reverse proxy client to disconnect and free.
145
- */
146
- LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_free(reverse_proxy_client_t client);
147
-
148
- /**
149
- * Make an initialized reverse proxy client operational, i.e. start the actual proxy.
150
- *
151
- * @param client The reverse proxy client to start.
152
- * @param control_protocol_version The control protocol version to use.
153
- * This is either 1 or 2. Recent devices use 2.
154
- *
155
- * @return REVERSE_PROXY_E_SUCCESS on success,
156
- * or a REVERSE_PROXY_E_* error code otherwise.
157
- */
158
- LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_start_proxy(reverse_proxy_client_t client, int control_protocol_version);
159
-
160
- /**
161
- * Set a status callback function. This allows to report the status of the
162
- * reverse proxy, like Ready, Connect Request, Connected, etc.
163
- *
164
- * @note Set the callback before calling reverse_proxy_client_start_proxy().
165
- *
166
- * @param client The reverse proxy client
167
- * @param callback The status callback function that will be called
168
- * when the status of the reverse proxy changes.
169
- * @param user_data A pointer that will be passed to the callback function.
170
- */
171
- LIBIMOBILEDEVICE_API void reverse_proxy_client_set_status_callback(reverse_proxy_client_t client, reverse_proxy_status_cb_t callback, void* user_data);
172
-
173
- /**
174
- * Set a log callback function. Useful for debugging or verbosity.
175
- *
176
- * @note Set the callback before calling reverse_proxy_client_start_proxy().
177
- *
178
- * @param client The reverse proxy client
179
- * @param callback The log callback function that will be called
180
- * when the reverse proxy logs something.
181
- * @param user_data A pointer that will be passed to the callback function.
182
- */
183
- LIBIMOBILEDEVICE_API void reverse_proxy_client_set_log_callback(reverse_proxy_client_t client, reverse_proxy_log_cb_t callback, void* user_data);
184
-
185
- /**
186
- * Set a data callback function. Useful for debugging or extra verbosity.
187
- *
188
- * @note Set the callback before calling reverse_proxy_client_start_proxy().
189
- *
190
- * @param client The reverse proxy client
191
- * @param callback The status callback function that will be called
192
- * when the status of the reverse proxy changes.
193
- * @param user_data A pointer that will be passed to the callback function.
194
- */
195
-
196
- LIBIMOBILEDEVICE_API void reverse_proxy_client_set_data_callback(reverse_proxy_client_t client, reverse_proxy_data_cb_t callback, void* user_data);
197
-
198
- /**
199
- * Helper function to return the type of a given reverse proxy client, which
200
- * is either RP_TYPE_CTRL or RP_TYPE_CONN. Useful for callback functions.
201
- * @see reverse_proxy_client_type_t
202
- *
203
- * @param client The reverse proxy client
204
- *
205
- * @return The type of the rerverse proxy client
206
- */
207
- LIBIMOBILEDEVICE_API reverse_proxy_client_type_t reverse_proxy_get_type(reverse_proxy_client_t client);
208
-
209
- #ifdef __cplusplus
210
- }
211
- #endif
212
-
213
- #endif
@@ -1,175 +0,0 @@
1
- /**
2
- * @file libimobiledevice/sbservices.h
3
- * @brief Manage SpringBoard icons and retrieve icon images.
4
- * \internal
5
- *
6
- * Copyright (c) 2010-2014 Martin Szulecki All Rights Reserved.
7
- * Copyright (c) 2009-2010 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 ISB_SERVICES_H
25
- #define ISB_SERVICES_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 springboardservices service */
35
- #define SBSERVICES_SERVICE_NAME "com.apple.springboardservices"
36
-
37
- /** Error Codes */
38
- typedef enum {
39
- SBSERVICES_E_SUCCESS = 0,
40
- SBSERVICES_E_INVALID_ARG = -1,
41
- SBSERVICES_E_PLIST_ERROR = -2,
42
- SBSERVICES_E_CONN_FAILED = -3,
43
- SBSERVICES_E_UNKNOWN_ERROR = -256
44
- } sbservices_error_t;
45
-
46
- /** Orientation of the user interface on the device */
47
- typedef enum {
48
- SBSERVICES_INTERFACE_ORIENTATION_UNKNOWN = 0,
49
- SBSERVICES_INTERFACE_ORIENTATION_PORTRAIT = 1,
50
- SBSERVICES_INTERFACE_ORIENTATION_PORTRAIT_UPSIDE_DOWN = 2,
51
- SBSERVICES_INTERFACE_ORIENTATION_LANDSCAPE_RIGHT = 3,
52
- SBSERVICES_INTERFACE_ORIENTATION_LANDSCAPE_LEFT = 4
53
- } sbservices_interface_orientation_t;
54
-
55
- typedef struct sbservices_client_private sbservices_client_private; /**< \private */
56
- typedef sbservices_client_private *sbservices_client_t; /**< The client handle. */
57
-
58
- /* Interface */
59
-
60
- /**
61
- * Connects to the springboardservices service on the specified device.
62
- *
63
- * @param device The device to connect to.
64
- * @param service The service descriptor returned by lockdownd_start_service.
65
- * @param client Pointer that will point to a newly allocated
66
- * sbservices_client_t upon successful return.
67
- *
68
- * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when
69
- * client is NULL, or an SBSERVICES_E_* error code otherwise.
70
- */
71
- LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_descriptor_t service, sbservices_client_t *client);
72
-
73
- /**
74
- * Starts a new sbservices service on the specified device and connects to it.
75
- *
76
- * @param device The device to connect to.
77
- * @param client Pointer that will point to a newly allocated
78
- * sbservices_client_t upon successful return. Must be freed using
79
- * sbservices_client_free() after use.
80
- * @param label The label to use for communication. Usually the program name.
81
- * Pass NULL to disable sending the label in requests to lockdownd.
82
- *
83
- * @return SBSERVICES_E_SUCCESS on success, or an SBSERVICES_E_* error
84
- * code otherwise.
85
- */
86
- LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_client_t* client, const char* label);
87
-
88
- /**
89
- * Disconnects an sbservices client from the device and frees up the
90
- * sbservices client data.
91
- *
92
- * @param client The sbservices client to disconnect and free.
93
- *
94
- * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when
95
- * client is NULL, or an SBSERVICES_E_* error code otherwise.
96
- */
97
- LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_free(sbservices_client_t client);
98
-
99
-
100
- /**
101
- * Gets the icon state of the connected device.
102
- *
103
- * @param client The connected sbservices client to use.
104
- * @param state Pointer that will point to a newly allocated plist containing
105
- * the current icon state. It is up to the caller to free the memory.
106
- * @param format_version A string to be passed as formatVersion along with
107
- * the request, or NULL if no formatVersion should be passed. This is only
108
- * supported since iOS 4.0 so for older firmware versions this must be set
109
- * to NULL.
110
- *
111
- * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when
112
- * client or state is invalid, or an SBSERVICES_E_* error code otherwise.
113
- */
114
- LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version);
115
-
116
- /**
117
- * Sets the icon state of the connected device.
118
- *
119
- * @param client The connected sbservices client to use.
120
- * @param newstate A plist containing the new iconstate.
121
- *
122
- * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when
123
- * client or newstate is NULL, or an SBSERVICES_E_* error code otherwise.
124
- */
125
- LIBIMOBILEDEVICE_API sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate);
126
-
127
- /**
128
- * Get the icon of the specified app as PNG data.
129
- *
130
- * @param client The connected sbservices client to use.
131
- * @param bundleId The bundle identifier of the app to retrieve the icon for.
132
- * @param pngdata Pointer that will point to a newly allocated buffer
133
- * containing the PNG data upon successful return. It is up to the caller
134
- * to free the memory.
135
- * @param pngsize Pointer to a uint64_t that will be set to the size of the
136
- * buffer pngdata points to upon successful return.
137
- *
138
- * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when
139
- * client, bundleId, or pngdata are invalid, or an SBSERVICES_E_* error
140
- * code otherwise.
141
- */
142
- LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize);
143
-
144
- /**
145
- * Gets the interface orientation of the device.
146
- *
147
- * @param client The connected sbservices client to use.
148
- * @param interface_orientation The interface orientation upon successful return.
149
- *
150
- * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when
151
- * client or state is invalid, or an SBSERVICES_E_* error code otherwise.
152
- */
153
- LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t client, sbservices_interface_orientation_t* interface_orientation);
154
-
155
- /**
156
- * Get the home screen wallpaper as PNG data.
157
- *
158
- * @param client The connected sbservices client to use.
159
- * @param pngdata Pointer that will point to a newly allocated buffer
160
- * containing the PNG data upon successful return. It is up to the caller
161
- * to free the memory.
162
- * @param pngsize Pointer to a uint64_t that will be set to the size of the
163
- * buffer pngdata points to upon successful return.
164
- *
165
- * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when
166
- * client or pngdata are invalid, or an SBSERVICES_E_* error
167
- * code otherwise.
168
- */
169
- LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_home_screen_wallpaper_pngdata(sbservices_client_t client, char **pngdata, uint64_t *pngsize);
170
-
171
- #ifdef __cplusplus
172
- }
173
- #endif
174
-
175
- #endif
@@ -1,118 +0,0 @@
1
- /**
2
- * @file libimobiledevice/screenshotr.h
3
- * @brief Retrieve a screenshot from device.
4
- * @note Requires a mounted developer image.
5
- * \internal
6
- *
7
- * Copyright (c) 2010-2019 Nikias Bassen, All Rights Reserved.
8
- * Copyright (c) 2010-2014 Martin Szulecki, All Rights Reserved.
9
- *
10
- * This library is free software; you can redistribute it and/or
11
- * modify it under the terms of the GNU Lesser General Public
12
- * License as published by the Free Software Foundation; either
13
- * version 2.1 of the License, or (at your option) any later version.
14
- *
15
- * This library is distributed in the hope that it will be useful,
16
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
- * Lesser General Public License for more details.
19
- *
20
- * You should have received a copy of the GNU Lesser General Public
21
- * License along with this library; if not, write to the Free Software
22
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23
- */
24
-
25
- #ifndef ISCREENSHOTR_H
26
- #define ISCREENSHOTR_H
27
-
28
- #ifdef __cplusplus
29
- extern "C" {
30
- #endif
31
-
32
- #include <libimobiledevice/libimobiledevice.h>
33
- #include <libimobiledevice/lockdown.h>
34
-
35
- /** Service identifier passed to lockdownd_start_service() to start the screenshotr service */
36
- #define SCREENSHOTR_SERVICE_NAME "com.apple.mobile.screenshotr"
37
-
38
- /** Error Codes */
39
- typedef enum {
40
- SCREENSHOTR_E_SUCCESS = 0,
41
- SCREENSHOTR_E_INVALID_ARG = -1,
42
- SCREENSHOTR_E_PLIST_ERROR = -2,
43
- SCREENSHOTR_E_MUX_ERROR = -3,
44
- SCREENSHOTR_E_SSL_ERROR = -4,
45
- SCREENSHOTR_E_RECEIVE_TIMEOUT = -5,
46
- SCREENSHOTR_E_BAD_VERSION = -6,
47
- SCREENSHOTR_E_UNKNOWN_ERROR = -256
48
- } screenshotr_error_t;
49
-
50
- typedef struct screenshotr_client_private screenshotr_client_private; /**< \private */
51
- typedef screenshotr_client_private *screenshotr_client_t; /**< The client handle. */
52
-
53
-
54
- /**
55
- * Connects to the screenshotr service on the specified device.
56
- *
57
- * @param device The device to connect to.
58
- * @param service The service descriptor returned by lockdownd_start_service.
59
- * @param client Pointer that will be set to a newly allocated
60
- * screenshotr_client_t upon successful return.
61
- *
62
- * @note This service is only available if a developer disk image has been
63
- * mounted.
64
- *
65
- * @return SCREENSHOTR_E_SUCCESS on success, SCREENSHOTR_E_INVALID ARG if one
66
- * or more parameters are invalid, or SCREENSHOTR_E_CONN_FAILED if the
67
- * connection to the device could not be established.
68
- */
69
- LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_descriptor_t service, screenshotr_client_t * client);
70
-
71
- /**
72
- * Starts a new screenshotr service on the specified device and connects to it.
73
- *
74
- * @param device The device to connect to.
75
- * @param client Pointer that will point to a newly allocated
76
- * screenshotr_client_t upon successful return. Must be freed using
77
- * screenshotr_client_free() after use.
78
- * @param label The label to use for communication. Usually the program name.
79
- * Pass NULL to disable sending the label in requests to lockdownd.
80
- *
81
- * @return SCREENSHOTR_E_SUCCESS on success, or an SCREENSHOTR_E_* error
82
- * code otherwise.
83
- */
84
- LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_start_service(idevice_t device, screenshotr_client_t* client, const char* label);
85
-
86
- /**
87
- * Disconnects a screenshotr client from the device and frees up the
88
- * screenshotr client data.
89
- *
90
- * @param client The screenshotr client to disconnect and free.
91
- *
92
- * @return SCREENSHOTR_E_SUCCESS on success, or SCREENSHOTR_E_INVALID_ARG
93
- * if client is NULL.
94
- */
95
- LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_free(screenshotr_client_t client);
96
-
97
-
98
- /**
99
- * Get a screen shot from the connected device.
100
- *
101
- * @param client The connection screenshotr service client.
102
- * @param imgdata Pointer that will point to a newly allocated buffer
103
- * containing TIFF image data upon successful return. It is up to the
104
- * caller to free the memory.
105
- * @param imgsize Pointer to a uint64_t that will be set to the size of the
106
- * buffer imgdata points to upon successful return.
107
- *
108
- * @return SCREENSHOTR_E_SUCCESS on success, SCREENSHOTR_E_INVALID_ARG if
109
- * one or more parameters are invalid, or another error code if an
110
- * error occurred.
111
- */
112
- LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize);
113
-
114
- #ifdef __cplusplus
115
- }
116
- #endif
117
-
118
- #endif