diff options
author | 2024-01-31 02:57:11 +0100 | |
---|---|---|
committer | 2024-01-31 02:57:11 +0100 | |
commit | 63bbac545efc400373a7f472fdd78174149119c3 (patch) | |
tree | f95c8d58b7b0fbf33bd188c5becc0401ee7e64ef | |
parent | f723a44513eb5ba5797da24bc2b63d9f09600a6e (diff) | |
download | libimobiledevice-63bbac545efc400373a7f472fdd78174149119c3.tar.gz libimobiledevice-63bbac545efc400373a7f472fdd78174149119c3.tar.bz2 |
Move LIBIMOBILEDEVICE_API to public headers
85 files changed, 680 insertions, 642 deletions
diff --git a/common/debug.c b/common/debug.c index 3492eaa..cf1bc2f 100644 --- a/common/debug.c +++ b/common/debug.c | |||
@@ -31,9 +31,9 @@ | |||
31 | #include <stdlib.h> | 31 | #include <stdlib.h> |
32 | #include <time.h> | 32 | #include <time.h> |
33 | 33 | ||
34 | #include "src/idevice.h" | ||
34 | #include "debug.h" | 35 | #include "debug.h" |
35 | #include "libimobiledevice/libimobiledevice.h" | 36 | #include "libimobiledevice/libimobiledevice.h" |
36 | #include "src/idevice.h" | ||
37 | 37 | ||
38 | #ifndef STRIP_DEBUG_CODE | 38 | #ifndef STRIP_DEBUG_CODE |
39 | #include "asprintf.h" | 39 | #include "asprintf.h" |
diff --git a/configure.ac b/configure.ac index 4f3f901..0cebe0c 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -283,12 +283,12 @@ else | |||
283 | fi | 283 | fi |
284 | 284 | ||
285 | AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fsigned-char -fvisibility=hidden") | 285 | AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fsigned-char -fvisibility=hidden") |
286 | AC_SUBST(GLOBAL_CFLAGS) | ||
287 | 286 | ||
288 | case "$GLOBAL_CFLAGS" in | 287 | if test "x$enable_static" = "xyes" -a "x$enable_shared" = "xno"; then |
289 | *-fvisibility=hidden*) | 288 | GLOBAL_CFLAGS+=" -DLIBIMOBILEDEVICE_STATIC" |
290 | AC_DEFINE([HAVE_FVISIBILITY], [1], [Define if compiled with -fvisibility=hidden]) | 289 | fi |
291 | esac | 290 | |
291 | AC_SUBST(GLOBAL_CFLAGS) | ||
292 | 292 | ||
293 | # check for large file support | 293 | # check for large file support |
294 | AC_SYS_LARGEFILE | 294 | AC_SYS_LARGEFILE |
diff --git a/doxygen.cfg.in b/doxygen.cfg.in index b099b42..4cbbb2d 100644 --- a/doxygen.cfg.in +++ b/doxygen.cfg.in | |||
@@ -874,7 +874,7 @@ EXCLUDE_PATTERNS = | |||
874 | # Note that the wildcards are matched against the file with absolute path, so to | 874 | # Note that the wildcards are matched against the file with absolute path, so to |
875 | # exclude all test directories use the pattern */test/* | 875 | # exclude all test directories use the pattern */test/* |
876 | 876 | ||
877 | EXCLUDE_SYMBOLS = | 877 | EXCLUDE_SYMBOLS = LIBIMOBILEDEVICE_API |
878 | 878 | ||
879 | # The EXAMPLE_PATH tag can be used to specify one or more files or directories | 879 | # The EXAMPLE_PATH tag can be used to specify one or more files or directories |
880 | # that contain example code fragments that are included (see the \include | 880 | # that contain example code fragments that are included (see the \include |
@@ -2023,7 +2023,7 @@ ENABLE_PREPROCESSING = YES | |||
2023 | # The default value is: NO. | 2023 | # The default value is: NO. |
2024 | # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. | 2024 | # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
2025 | 2025 | ||
2026 | MACRO_EXPANSION = NO | 2026 | MACRO_EXPANSION = YES |
2027 | 2027 | ||
2028 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then | 2028 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then |
2029 | # the macro expansion is limited to the macros specified with the PREDEFINED and | 2029 | # the macro expansion is limited to the macros specified with the PREDEFINED and |
@@ -2031,7 +2031,7 @@ MACRO_EXPANSION = NO | |||
2031 | # The default value is: NO. | 2031 | # The default value is: NO. |
2032 | # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. | 2032 | # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
2033 | 2033 | ||
2034 | EXPAND_ONLY_PREDEF = NO | 2034 | EXPAND_ONLY_PREDEF = YES |
2035 | 2035 | ||
2036 | # If the SEARCH_INCLUDES tag is set to YES, the include files in the | 2036 | # If the SEARCH_INCLUDES tag is set to YES, the include files in the |
2037 | # INCLUDE_PATH will be searched if a #include is found. | 2037 | # INCLUDE_PATH will be searched if a #include is found. |
@@ -2072,7 +2072,7 @@ PREDEFINED = | |||
2072 | # definition found in the source code. | 2072 | # definition found in the source code. |
2073 | # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. | 2073 | # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. |
2074 | 2074 | ||
2075 | EXPAND_AS_DEFINED = | 2075 | EXPAND_AS_DEFINED = LIBIMOBILEDEVICE_API |
2076 | 2076 | ||
2077 | # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will | 2077 | # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will |
2078 | # remove all references to function-like macros that are alone on a line, have | 2078 | # remove all references to function-like macros that are alone on a line, have |
diff --git a/include/libimobiledevice/afc.h b/include/libimobiledevice/afc.h index a2d70d3..0086eb6 100644 --- a/include/libimobiledevice/afc.h +++ b/include/libimobiledevice/afc.h | |||
@@ -107,7 +107,7 @@ typedef afc_client_private *afc_client_t; /**< The client handle. */ | |||
107 | * invalid, AFC_E_MUX_ERROR if the connection cannot be established, | 107 | * invalid, AFC_E_MUX_ERROR if the connection cannot be established, |
108 | * or AFC_E_NO_MEM if there is a memory allocation problem. | 108 | * or AFC_E_NO_MEM if there is a memory allocation problem. |
109 | */ | 109 | */ |
110 | afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t service, afc_client_t *client); | 110 | LIBIMOBILEDEVICE_API afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t service, afc_client_t *client); |
111 | 111 | ||
112 | /** | 112 | /** |
113 | * Starts a new AFC service on the specified device and connects to it. | 113 | * Starts a new AFC service on the specified device and connects to it. |
@@ -120,7 +120,7 @@ afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t serv | |||
120 | * | 120 | * |
121 | * @return AFC_E_SUCCESS on success, or an AFC_E_* error code otherwise. | 121 | * @return AFC_E_SUCCESS on success, or an AFC_E_* error code otherwise. |
122 | */ | 122 | */ |
123 | afc_error_t afc_client_start_service(idevice_t device, afc_client_t* client, const char* label); | 123 | LIBIMOBILEDEVICE_API afc_error_t afc_client_start_service(idevice_t device, afc_client_t* client, const char* label); |
124 | 124 | ||
125 | /** | 125 | /** |
126 | * Frees up an AFC client. If the connection was created by the client itself, | 126 | * Frees up an AFC client. If the connection was created by the client itself, |
@@ -128,7 +128,7 @@ afc_error_t afc_client_start_service(idevice_t device, afc_client_t* client, con | |||
128 | * | 128 | * |
129 | * @param client The client to free. | 129 | * @param client The client to free. |
130 | */ | 130 | */ |
131 | afc_error_t afc_client_free(afc_client_t client); | 131 | LIBIMOBILEDEVICE_API afc_error_t afc_client_free(afc_client_t client); |
132 | 132 | ||
133 | /** | 133 | /** |
134 | * Get device information for a connected client. The device information | 134 | * Get device information for a connected client. The device information |
@@ -142,7 +142,7 @@ afc_error_t afc_client_free(afc_client_t client); | |||
142 | * | 142 | * |
143 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 143 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
144 | */ | 144 | */ |
145 | afc_error_t afc_get_device_info(afc_client_t client, char ***device_information); | 145 | LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info(afc_client_t client, char ***device_information); |
146 | 146 | ||
147 | /** | 147 | /** |
148 | * Gets a directory listing of the directory requested. | 148 | * Gets a directory listing of the directory requested. |
@@ -155,7 +155,7 @@ afc_error_t afc_get_device_info(afc_client_t client, char ***device_information) | |||
155 | * | 155 | * |
156 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 156 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
157 | */ | 157 | */ |
158 | afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***directory_information); | 158 | LIBIMOBILEDEVICE_API afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***directory_information); |
159 | 159 | ||
160 | /** | 160 | /** |
161 | * Gets information about a specific file. | 161 | * Gets information about a specific file. |
@@ -168,7 +168,7 @@ afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***di | |||
168 | * | 168 | * |
169 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 169 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
170 | */ | 170 | */ |
171 | afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***file_information); | 171 | LIBIMOBILEDEVICE_API afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***file_information); |
172 | 172 | ||
173 | /** | 173 | /** |
174 | * Opens a file on the device. | 174 | * Opens a file on the device. |
@@ -180,7 +180,7 @@ afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***fil | |||
180 | * | 180 | * |
181 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 181 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
182 | */ | 182 | */ |
183 | afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mode_t file_mode, uint64_t *handle); | 183 | LIBIMOBILEDEVICE_API afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mode_t file_mode, uint64_t *handle); |
184 | 184 | ||
185 | /** | 185 | /** |
186 | * Closes a file on the device. | 186 | * Closes a file on the device. |
@@ -188,7 +188,7 @@ afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mo | |||
188 | * @param client The client to close the file with. | 188 | * @param client The client to close the file with. |
189 | * @param handle File handle of a previously opened file. | 189 | * @param handle File handle of a previously opened file. |
190 | */ | 190 | */ |
191 | afc_error_t afc_file_close(afc_client_t client, uint64_t handle); | 191 | LIBIMOBILEDEVICE_API afc_error_t afc_file_close(afc_client_t client, uint64_t handle); |
192 | 192 | ||
193 | /** | 193 | /** |
194 | * Locks or unlocks a file on the device. | 194 | * Locks or unlocks a file on the device. |
@@ -202,7 +202,7 @@ afc_error_t afc_file_close(afc_client_t client, uint64_t handle); | |||
202 | * AFC_LOCK_SH (shared lock), AFC_LOCK_EX (exclusive lock), or | 202 | * AFC_LOCK_SH (shared lock), AFC_LOCK_EX (exclusive lock), or |
203 | * AFC_LOCK_UN (unlock). | 203 | * AFC_LOCK_UN (unlock). |
204 | */ | 204 | */ |
205 | afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t operation); | 205 | LIBIMOBILEDEVICE_API afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t operation); |
206 | 206 | ||
207 | /** | 207 | /** |
208 | * Attempts to the read the given number of bytes from the given file. | 208 | * Attempts to the read the given number of bytes from the given file. |
@@ -215,7 +215,7 @@ afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t op | |||
215 | * | 215 | * |
216 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 216 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
217 | */ | 217 | */ |
218 | afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint32_t length, uint32_t *bytes_read); | 218 | LIBIMOBILEDEVICE_API afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint32_t length, uint32_t *bytes_read); |
219 | 219 | ||
220 | /** | 220 | /** |
221 | * Writes a given number of bytes to a file. | 221 | * Writes a given number of bytes to a file. |
@@ -228,7 +228,7 @@ afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint | |||
228 | * | 228 | * |
229 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 229 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
230 | */ | 230 | */ |
231 | afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *data, uint32_t length, uint32_t *bytes_written); | 231 | LIBIMOBILEDEVICE_API afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *data, uint32_t length, uint32_t *bytes_written); |
232 | 232 | ||
233 | /** | 233 | /** |
234 | * Seeks to a given position of a pre-opened file on the device. | 234 | * Seeks to a given position of a pre-opened file on the device. |
@@ -240,7 +240,7 @@ afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *dat | |||
240 | * | 240 | * |
241 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 241 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
242 | */ | 242 | */ |
243 | afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, int whence); | 243 | LIBIMOBILEDEVICE_API afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, int whence); |
244 | 244 | ||
245 | /** | 245 | /** |
246 | * Returns current position in a pre-opened file on the device. | 246 | * Returns current position in a pre-opened file on the device. |
@@ -251,7 +251,7 @@ afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, | |||
251 | * | 251 | * |
252 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 252 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
253 | */ | 253 | */ |
254 | afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *position); | 254 | LIBIMOBILEDEVICE_API afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *position); |
255 | 255 | ||
256 | /** | 256 | /** |
257 | * Sets the size of a file on the device. | 257 | * Sets the size of a file on the device. |
@@ -265,7 +265,7 @@ afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *positi | |||
265 | * @note This function is more akin to ftruncate than truncate, and truncate | 265 | * @note This function is more akin to ftruncate than truncate, and truncate |
266 | * calls would have to open the file before calling this, sadly. | 266 | * calls would have to open the file before calling this, sadly. |
267 | */ | 267 | */ |
268 | afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t newsize); | 268 | LIBIMOBILEDEVICE_API afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t newsize); |
269 | 269 | ||
270 | /** | 270 | /** |
271 | * Deletes a file or directory. | 271 | * Deletes a file or directory. |
@@ -275,7 +275,7 @@ afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t new | |||
275 | * | 275 | * |
276 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 276 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
277 | */ | 277 | */ |
278 | afc_error_t afc_remove_path(afc_client_t client, const char *path); | 278 | LIBIMOBILEDEVICE_API afc_error_t afc_remove_path(afc_client_t client, const char *path); |
279 | 279 | ||
280 | /** | 280 | /** |
281 | * Renames a file or directory on the device. | 281 | * Renames a file or directory on the device. |
@@ -286,7 +286,7 @@ afc_error_t afc_remove_path(afc_client_t client, const char *path); | |||
286 | * | 286 | * |
287 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 287 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
288 | */ | 288 | */ |
289 | afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *to); | 289 | LIBIMOBILEDEVICE_API afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *to); |
290 | 290 | ||
291 | /** | 291 | /** |
292 | * Creates a directory on the device. | 292 | * Creates a directory on the device. |
@@ -297,7 +297,7 @@ afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *t | |||
297 | * | 297 | * |
298 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 298 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
299 | */ | 299 | */ |
300 | afc_error_t afc_make_directory(afc_client_t client, const char *path); | 300 | LIBIMOBILEDEVICE_API afc_error_t afc_make_directory(afc_client_t client, const char *path); |
301 | 301 | ||
302 | /** | 302 | /** |
303 | * Sets the size of a file on the device without prior opening it. | 303 | * Sets the size of a file on the device without prior opening it. |
@@ -308,7 +308,7 @@ afc_error_t afc_make_directory(afc_client_t client, const char *path); | |||
308 | * | 308 | * |
309 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 309 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
310 | */ | 310 | */ |
311 | afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize); | 311 | LIBIMOBILEDEVICE_API afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize); |
312 | 312 | ||
313 | /** | 313 | /** |
314 | * Creates a hard link or symbolic link on the device. | 314 | * Creates a hard link or symbolic link on the device. |
@@ -320,7 +320,7 @@ afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize | |||
320 | * | 320 | * |
321 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 321 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
322 | */ | 322 | */ |
323 | afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const char *target, const char *linkname); | 323 | LIBIMOBILEDEVICE_API afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const char *target, const char *linkname); |
324 | 324 | ||
325 | /** | 325 | /** |
326 | * Sets the modification time of a file on the device. | 326 | * Sets the modification time of a file on the device. |
@@ -331,7 +331,7 @@ afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const c | |||
331 | * | 331 | * |
332 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 332 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
333 | */ | 333 | */ |
334 | afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mtime); | 334 | LIBIMOBILEDEVICE_API afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mtime); |
335 | 335 | ||
336 | /** | 336 | /** |
337 | * Deletes a file or directory including possible contents. | 337 | * Deletes a file or directory including possible contents. |
@@ -343,7 +343,7 @@ afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mt | |||
343 | * | 343 | * |
344 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 344 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
345 | */ | 345 | */ |
346 | afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path); | 346 | LIBIMOBILEDEVICE_API afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path); |
347 | 347 | ||
348 | /* Helper functions */ | 348 | /* Helper functions */ |
349 | 349 | ||
@@ -358,7 +358,7 @@ afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path); | |||
358 | * | 358 | * |
359 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 359 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
360 | */ | 360 | */ |
361 | afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char **value); | 361 | LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char **value); |
362 | 362 | ||
363 | /** | 363 | /** |
364 | * Frees up a char dictionary as returned by some AFC functions. | 364 | * Frees up a char dictionary as returned by some AFC functions. |
@@ -367,7 +367,7 @@ afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char * | |||
367 | * | 367 | * |
368 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. | 368 | * @return AFC_E_SUCCESS on success or an AFC_E_* error value. |
369 | */ | 369 | */ |
370 | afc_error_t afc_dictionary_free(char **dictionary); | 370 | LIBIMOBILEDEVICE_API afc_error_t afc_dictionary_free(char **dictionary); |
371 | 371 | ||
372 | #ifdef __cplusplus | 372 | #ifdef __cplusplus |
373 | } | 373 | } |
diff --git a/include/libimobiledevice/bt_packet_logger.h b/include/libimobiledevice/bt_packet_logger.h index 230040a..590e5c1 100644 --- a/include/libimobiledevice/bt_packet_logger.h +++ b/include/libimobiledevice/bt_packet_logger.h | |||
@@ -70,7 +70,7 @@ typedef void (*bt_packet_logger_receive_cb_t)(uint8_t * data, uint16_t len, void | |||
70 | * @return BT_PACKET_LOGGER_E_SUCCESS on success, BT_PACKET_LOGGER_E_INVALID_ARG when | 70 | * @return BT_PACKET_LOGGER_E_SUCCESS on success, BT_PACKET_LOGGER_E_INVALID_ARG when |
71 | * client is NULL, or an BT_PACKET_LOGGER_E_* error code otherwise. | 71 | * client is NULL, or an BT_PACKET_LOGGER_E_* error code otherwise. |
72 | */ | 72 | */ |
73 | bt_packet_logger_error_t bt_packet_logger_client_new(idevice_t device, lockdownd_service_descriptor_t service, bt_packet_logger_client_t * client); | 73 | LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_client_new(idevice_t device, lockdownd_service_descriptor_t service, bt_packet_logger_client_t * client); |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * Starts a new bt_packet_logger service on the specified device and connects to it. | 76 | * Starts a new bt_packet_logger service on the specified device and connects to it. |
@@ -85,7 +85,7 @@ bt_packet_logger_error_t bt_packet_logger_client_new(idevice_t device, lockdownd | |||
85 | * @return BT_PACKET_LOGGER_E_SUCCESS on success, or an BT_PACKET_LOGGER_E_* error | 85 | * @return BT_PACKET_LOGGER_E_SUCCESS on success, or an BT_PACKET_LOGGER_E_* error |
86 | * code otherwise. | 86 | * code otherwise. |
87 | */ | 87 | */ |
88 | bt_packet_logger_error_t bt_packet_logger_client_start_service(idevice_t device, bt_packet_logger_client_t * client, const char* label); | 88 | LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_client_start_service(idevice_t device, bt_packet_logger_client_t * client, const char* label); |
89 | 89 | ||
90 | /** | 90 | /** |
91 | * Disconnects a bt_packet_logger client from the device and frees up the | 91 | * Disconnects a bt_packet_logger client from the device and frees up the |
@@ -96,7 +96,7 @@ bt_packet_logger_error_t bt_packet_logger_client_start_service(idevice_t device, | |||
96 | * @return BT_PACKET_LOGGER_E_SUCCESS on success, BT_PACKET_LOGGER_E_INVALID_ARG when | 96 | * @return BT_PACKET_LOGGER_E_SUCCESS on success, BT_PACKET_LOGGER_E_INVALID_ARG when |
97 | * client is NULL, or an BT_PACKET_LOGGER_E_* error code otherwise. | 97 | * client is NULL, or an BT_PACKET_LOGGER_E_* error code otherwise. |
98 | */ | 98 | */ |
99 | bt_packet_logger_error_t bt_packet_logger_client_free(bt_packet_logger_client_t client); | 99 | LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_client_free(bt_packet_logger_client_t client); |
100 | 100 | ||
101 | 101 | ||
102 | /** | 102 | /** |
@@ -113,7 +113,7 @@ bt_packet_logger_error_t bt_packet_logger_client_free(bt_packet_logger_client_t | |||
113 | * invalid or BT_PACKET_LOGGER_E_UNKNOWN_ERROR when an unspecified | 113 | * invalid or BT_PACKET_LOGGER_E_UNKNOWN_ERROR when an unspecified |
114 | * error occurs or an hci capture has already been started. | 114 | * error occurs or an hci capture has already been started. |
115 | */ | 115 | */ |
116 | bt_packet_logger_error_t bt_packet_logger_start_capture(bt_packet_logger_client_t client, bt_packet_logger_receive_cb_t callback, void* user_data); | 116 | LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_start_capture(bt_packet_logger_client_t client, bt_packet_logger_receive_cb_t callback, void* user_data); |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * Stops capturing the hci interface from the device. | 119 | * Stops capturing the hci interface from the device. |
@@ -127,7 +127,7 @@ bt_packet_logger_error_t bt_packet_logger_start_capture(bt_packet_logger_client_ | |||
127 | * invalid or BT_PACKET_LOGGER_E_UNKNOWN_ERROR when an unspecified | 127 | * invalid or BT_PACKET_LOGGER_E_UNKNOWN_ERROR when an unspecified |
128 | * error occurs or an hci capture has already been started. | 128 | * error occurs or an hci capture has already been started. |
129 | */ | 129 | */ |
130 | bt_packet_logger_error_t bt_packet_logger_stop_capture(bt_packet_logger_client_t client); | 130 | LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_stop_capture(bt_packet_logger_client_t client); |
131 | 131 | ||
132 | /* Receiving */ | 132 | /* Receiving */ |
133 | 133 | ||
@@ -146,7 +146,7 @@ bt_packet_logger_error_t bt_packet_logger_stop_capture(bt_packet_logger_client_t | |||
146 | * occurs, or BT_PACKET_LOGGER_E_UNKNOWN_ERROR when an unspecified | 146 | * occurs, or BT_PACKET_LOGGER_E_UNKNOWN_ERROR when an unspecified |
147 | * error occurs. | 147 | * error occurs. |
148 | */ | 148 | */ |
149 | bt_packet_logger_error_t bt_packet_logger_receive_with_timeout(bt_packet_logger_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout); | 149 | LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_receive_with_timeout(bt_packet_logger_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout); |
150 | 150 | ||
151 | 151 | ||
152 | #ifdef __cplusplus | 152 | #ifdef __cplusplus |
diff --git a/include/libimobiledevice/companion_proxy.h b/include/libimobiledevice/companion_proxy.h index d786766..544322a 100644 --- a/include/libimobiledevice/companion_proxy.h +++ b/include/libimobiledevice/companion_proxy.h | |||
@@ -67,7 +67,7 @@ typedef void (*companion_proxy_device_event_cb_t) (plist_t event, void* userdata | |||
67 | * @return COMPANION_PROXY_E_SUCCESS on success, COMPANION_PROXY_E_INVALID_ARG when | 67 | * @return COMPANION_PROXY_E_SUCCESS on success, COMPANION_PROXY_E_INVALID_ARG when |
68 | * the arguments are invalid, or an COMPANION_PROXY_E_* error code otherwise. | 68 | * the arguments are invalid, or an COMPANION_PROXY_E_* error code otherwise. |
69 | */ | 69 | */ |
70 | companion_proxy_error_t companion_proxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, companion_proxy_client_t* client); | 70 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, companion_proxy_client_t* client); |
71 | 71 | ||
72 | /** | 72 | /** |
73 | * Starts a new companion_proxy service on the specified device and connects to it. | 73 | * Starts a new companion_proxy service on the specified device and connects to it. |
@@ -82,7 +82,7 @@ companion_proxy_error_t companion_proxy_client_new(idevice_t device, lockdownd_s | |||
82 | * @return COMPANION_PROXY_E_SUCCESS on success, or an COMPANION_PROXY_E_* error | 82 | * @return COMPANION_PROXY_E_SUCCESS on success, or an COMPANION_PROXY_E_* error |
83 | * code otherwise. | 83 | * code otherwise. |
84 | */ | 84 | */ |
85 | companion_proxy_error_t companion_proxy_client_start_service(idevice_t device, companion_proxy_client_t* client, const char* label); | 85 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_client_start_service(idevice_t device, companion_proxy_client_t* client, const char* label); |
86 | 86 | ||
87 | /** | 87 | /** |
88 | * Disconnects a companion_proxy client from the device and frees up the | 88 | * Disconnects a companion_proxy client from the device and frees up the |
@@ -93,7 +93,7 @@ companion_proxy_error_t companion_proxy_client_start_service(idevice_t device, c | |||
93 | * @return COMPANION_PROXY_E_SUCCESS on success, COMPANION_PROXY_E_INVALID_ARG when | 93 | * @return COMPANION_PROXY_E_SUCCESS on success, COMPANION_PROXY_E_INVALID_ARG when |
94 | * client is NULL, or an COMPANION_PROXY_E_* error code otherwise. | 94 | * client is NULL, or an COMPANION_PROXY_E_* error code otherwise. |
95 | */ | 95 | */ |
96 | companion_proxy_error_t companion_proxy_client_free(companion_proxy_client_t client); | 96 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_client_free(companion_proxy_client_t client); |
97 | 97 | ||
98 | /** | 98 | /** |
99 | * Sends a plist to the service. | 99 | * Sends a plist to the service. |
@@ -104,7 +104,7 @@ companion_proxy_error_t companion_proxy_client_free(companion_proxy_client_t cli | |||
104 | * @return COMPANION_PROXY_E_SUCCESS on success, | 104 | * @return COMPANION_PROXY_E_SUCCESS on success, |
105 | * COMPANION_PROXY_E_INVALID_ARG when client or plist is NULL | 105 | * COMPANION_PROXY_E_INVALID_ARG when client or plist is NULL |
106 | */ | 106 | */ |
107 | companion_proxy_error_t companion_proxy_send(companion_proxy_client_t client, plist_t plist); | 107 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_send(companion_proxy_client_t client, plist_t plist); |
108 | 108 | ||
109 | /** | 109 | /** |
110 | * Receives a plist from the service. | 110 | * Receives a plist from the service. |
@@ -115,7 +115,7 @@ companion_proxy_error_t companion_proxy_send(companion_proxy_client_t client, pl | |||
115 | * @return COMPANION_PROXY_E_SUCCESS on success, | 115 | * @return COMPANION_PROXY_E_SUCCESS on success, |
116 | * COMPANION_PROXY_E_INVALID_ARG when client or plist is NULL | 116 | * COMPANION_PROXY_E_INVALID_ARG when client or plist is NULL |
117 | */ | 117 | */ |
118 | companion_proxy_error_t companion_proxy_receive(companion_proxy_client_t client, plist_t * plist); | 118 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_receive(companion_proxy_client_t client, plist_t * plist); |
119 | 119 | ||
120 | /** | 120 | /** |
121 | * Retrieves a list of paired devices. | 121 | * Retrieves a list of paired devices. |
@@ -129,7 +129,7 @@ companion_proxy_error_t companion_proxy_receive(companion_proxy_client_t client, | |||
129 | * COMPANION_PROXY_E_NO_DEVICES if no devices are paired, | 129 | * COMPANION_PROXY_E_NO_DEVICES if no devices are paired, |
130 | * or a COMPANION_PROXY_E_* error code otherwise. | 130 | * or a COMPANION_PROXY_E_* error code otherwise. |
131 | */ | 131 | */ |
132 | companion_proxy_error_t companion_proxy_get_device_registry(companion_proxy_client_t client, plist_t* paired_devices); | 132 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_get_device_registry(companion_proxy_client_t client, plist_t* paired_devices); |
133 | 133 | ||
134 | /** | 134 | /** |
135 | * Starts listening for paired devices. | 135 | * Starts listening for paired devices. |
@@ -145,7 +145,7 @@ companion_proxy_error_t companion_proxy_get_device_registry(companion_proxy_clie | |||
145 | * @return COMPANION_PROXY_E_SUCCESS on success, | 145 | * @return COMPANION_PROXY_E_SUCCESS on success, |
146 | * or a COMPANION_PROXY_E_* error code otherwise. | 146 | * or a COMPANION_PROXY_E_* error code otherwise. |
147 | */ | 147 | */ |
148 | companion_proxy_error_t companion_proxy_start_listening_for_devices(companion_proxy_client_t client, companion_proxy_device_event_cb_t callback, void* userdata); | 148 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_start_listening_for_devices(companion_proxy_client_t client, companion_proxy_device_event_cb_t callback, void* userdata); |
149 | 149 | ||
150 | /** | 150 | /** |
151 | * Stops listening for paired devices | 151 | * Stops listening for paired devices |
@@ -155,7 +155,7 @@ companion_proxy_error_t companion_proxy_start_listening_for_devices(companion_pr | |||
155 | * @return COMPANION_PROXY_E_SUCCESS on success, | 155 | * @return COMPANION_PROXY_E_SUCCESS on success, |
156 | * or a COMPANION_PROXY_E_* error code otherwise. | 156 | * or a COMPANION_PROXY_E_* error code otherwise. |
157 | */ | 157 | */ |
158 | companion_proxy_error_t companion_proxy_stop_listening_for_devices(companion_proxy_client_t client); | 158 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_stop_listening_for_devices(companion_proxy_client_t client); |
159 | 159 | ||
160 | /** | 160 | /** |
161 | * Returns a value for the given key. | 161 | * Returns a value for the given key. |
@@ -173,7 +173,7 @@ companion_proxy_error_t companion_proxy_stop_listening_for_devices(companion_pro | |||
173 | * COMPANION_PROXY_E_UNSUPPORTED_KEY if the companion device doesn't support the given key, | 173 | * COMPANION_PROXY_E_UNSUPPORTED_KEY if the companion device doesn't support the given key, |
174 | * or a COMPANION_PROXY_E_* error code otherwise. | 174 | * or a COMPANION_PROXY_E_* error code otherwise. |
175 | */ | 175 | */ |
176 | companion_proxy_error_t companion_proxy_get_value_from_registry(companion_proxy_client_t client, const char* companion_udid, const char* key, plist_t* value); | 176 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_get_value_from_registry(companion_proxy_client_t client, const char* companion_udid, const char* key, plist_t* value); |
177 | 177 | ||
178 | /** | 178 | /** |
179 | * Start forwarding a service port on the companion device to a port on the idevice. | 179 | * Start forwarding a service port on the companion device to a port on the idevice. |
@@ -190,7 +190,7 @@ companion_proxy_error_t companion_proxy_get_value_from_registry(companion_proxy_ | |||
190 | * @return COMPANION_PROXY_E_SUCCESS on success, | 190 | * @return COMPANION_PROXY_E_SUCCESS on success, |
191 | * or a COMPANION_PROXY_E_* error code otherwise. | 191 | * or a COMPANION_PROXY_E_* error code otherwise. |
192 | */ | 192 | */ |
193 | companion_proxy_error_t companion_proxy_start_forwarding_service_port(companion_proxy_client_t client, uint16_t remote_port, const char* service_name, uint16_t* forward_port, plist_t options); | 193 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_start_forwarding_service_port(companion_proxy_client_t client, uint16_t remote_port, const char* service_name, uint16_t* forward_port, plist_t options); |
194 | 194 | ||
195 | /** | 195 | /** |
196 | * Stop forwarding a service port between companion device and idevice. | 196 | * Stop forwarding a service port between companion device and idevice. |
@@ -203,7 +203,7 @@ companion_proxy_error_t companion_proxy_start_forwarding_service_port(companion_ | |||
203 | * @return COMPANION_PROXY_E_SUCCESS on success, | 203 | * @return COMPANION_PROXY_E_SUCCESS on success, |
204 | * or a COMPANION_PROXY_E_* error code otherwise. | 204 | * or a COMPANION_PROXY_E_* error code otherwise. |
205 | */ | 205 | */ |
206 | companion_proxy_error_t companion_proxy_stop_forwarding_service_port(companion_proxy_client_t client, uint16_t remote_port); | 206 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_stop_forwarding_service_port(companion_proxy_client_t client, uint16_t remote_port); |
207 | 207 | ||
208 | #ifdef __cplusplus | 208 | #ifdef __cplusplus |
209 | } | 209 | } |
diff --git a/include/libimobiledevice/debugserver.h b/include/libimobiledevice/debugserver.h index eaa7c48..809b97f 100644 --- a/include/libimobiledevice/debugserver.h +++ b/include/libimobiledevice/debugserver.h | |||
@@ -66,7 +66,7 @@ typedef debugserver_command_private *debugserver_command_t; /**< The command han | |||
66 | * @return DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when | 66 | * @return DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when |
67 | * client is NULL, or an DEBUGSERVER_E_* error code otherwise. | 67 | * client is NULL, or an DEBUGSERVER_E_* error code otherwise. |
68 | */ | 68 | */ |
69 | debugserver_error_t debugserver_client_new(idevice_t device, lockdownd_service_descriptor_t service, debugserver_client_t * client); | 69 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_new(idevice_t device, lockdownd_service_descriptor_t service, debugserver_client_t * client); |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * Starts a new debugserver service on the specified device and connects to it. | 72 | * Starts a new debugserver service on the specified device and connects to it. |
@@ -81,7 +81,7 @@ debugserver_error_t debugserver_client_new(idevice_t device, lockdownd_service_d | |||
81 | * @return DEBUGSERVER_E_SUCCESS on success, or an DEBUGSERVER_E_* error | 81 | * @return DEBUGSERVER_E_SUCCESS on success, or an DEBUGSERVER_E_* error |
82 | * code otherwise. | 82 | * code otherwise. |
83 | */ | 83 | */ |
84 | debugserver_error_t debugserver_client_start_service(idevice_t device, debugserver_client_t * client, const char* label); | 84 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_start_service(idevice_t device, debugserver_client_t * client, const char* label); |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * Disconnects a debugserver client from the device and frees up the | 87 | * Disconnects a debugserver client from the device and frees up the |
@@ -92,7 +92,7 @@ debugserver_error_t debugserver_client_start_service(idevice_t device, debugserv | |||
92 | * @return DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when | 92 | * @return DEBUGSERVER_E_SUCCESS on success, DEBUGSERVER_E_INVALID_ARG when |
93 | * client is NULL, or an DEBUGSERVER_E_* error code otherwise. | 93 | * client is NULL, or an DEBUGSERVER_E_* error code otherwise. |
94 | */ | 94 | */ |
95 | debugserver_error_t debugserver_client_free(debugserver_client_t client); | 95 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_free(debugserver_client_t client); |
96 | 96 | ||
97 | /** | 97 | /** |
98 | * Sends raw data using the given debugserver service client. | 98 | * Sends raw data using the given debugserver service client. |
@@ -107,7 +107,7 @@ debugserver_error_t debugserver_client_free(debugserver_client_t client); | |||
107 | * invalid, or DEBUGSERVER_E_UNKNOWN_ERROR when an unspecified | 107 | * invalid, or DEBUGSERVER_E_UNKNOWN_ERROR when an unspecified |
108 | * error occurs. | 108 | * error occurs. |
109 | */ | 109 | */ |
110 | debugserver_error_t debugserver_client_send(debugserver_client_t client, const char* data, uint32_t size, uint32_t *sent); | 110 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_send(debugserver_client_t client, const char* data, uint32_t size, uint32_t *sent); |
111 | 111 | ||
112 | /** | 112 | /** |
113 | * Receives raw data using the given debugserver client with specified timeout. | 113 | * Receives raw data using the given debugserver client with specified timeout. |
@@ -125,7 +125,7 @@ debugserver_error_t debugserver_client_send(debugserver_client_t client, const c | |||
125 | * or DEBUGSERVER_E_UNKNOWN_ERROR when an unspecified | 125 | * or DEBUGSERVER_E_UNKNOWN_ERROR when an unspecified |
126 | * error occurs. | 126 | * error occurs. |
127 | */ | 127 | */ |
128 | debugserver_error_t debugserver_client_receive_with_timeout(debugserver_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout); | 128 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive_with_timeout(debugserver_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout); |
129 | 129 | ||
130 | /** | 130 | /** |
131 | * Receives raw data from the debugserver service. | 131 | * Receives raw data from the debugserver service. |
@@ -139,7 +139,7 @@ debugserver_error_t debugserver_client_receive_with_timeout(debugserver_client_t | |||
139 | * @return DEBUGSERVER_E_SUCCESS on success, | 139 | * @return DEBUGSERVER_E_SUCCESS on success, |
140 | * DEBUGSERVER_E_INVALID_ARG when client or plist is NULL | 140 | * DEBUGSERVER_E_INVALID_ARG when client or plist is NULL |
141 | */ | 141 | */ |
142 | debugserver_error_t debugserver_client_receive(debugserver_client_t client, char *data, uint32_t size, uint32_t *received); | 142 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive(debugserver_client_t client, char *data, uint32_t size, uint32_t *received); |
143 | 143 | ||
144 | /** | 144 | /** |
145 | * Sends a command to the debugserver service. | 145 | * Sends a command to the debugserver service. |
@@ -152,7 +152,7 @@ debugserver_error_t debugserver_client_receive(debugserver_client_t client, char | |||
152 | * @return DEBUGSERVER_E_SUCCESS on success, | 152 | * @return DEBUGSERVER_E_SUCCESS on success, |
153 | * DEBUGSERVER_E_INVALID_ARG when client or command is NULL | 153 | * DEBUGSERVER_E_INVALID_ARG when client or command is NULL |
154 | */ | 154 | */ |
155 | debugserver_error_t debugserver_client_send_command(debugserver_client_t client, debugserver_command_t command, char** response, size_t* response_size); | 155 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_send_command(debugserver_client_t client, debugserver_command_t command, char** response, size_t* response_size); |
156 | 156 | ||
157 | /** | 157 | /** |
158 | * Receives and parses response of debugserver service. | 158 | * Receives and parses response of debugserver service. |
@@ -164,7 +164,7 @@ debugserver_error_t debugserver_client_send_command(debugserver_client_t client, | |||
164 | * @return DEBUGSERVER_E_SUCCESS on success, | 164 | * @return DEBUGSERVER_E_SUCCESS on success, |
165 | * DEBUGSERVER_E_INVALID_ARG when client is NULL | 165 | * DEBUGSERVER_E_INVALID_ARG when client is NULL |
166 | */ | 166 | */ |
167 | debugserver_error_t debugserver_client_receive_response(debugserver_client_t client, char** response, size_t* response_size); | 167 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive_response(debugserver_client_t client, char** response, size_t* response_size); |
168 | 168 | ||
169 | /** | 169 | /** |
170 | * Controls status of ACK mode when sending commands or receiving responses. | 170 | * Controls status of ACK mode when sending commands or receiving responses. |
@@ -178,7 +178,7 @@ debugserver_error_t debugserver_client_receive_response(debugserver_client_t cli | |||
178 | * @return DEBUGSERVER_E_SUCCESS on success, or an DEBUGSERVER_E_* error | 178 | * @return DEBUGSERVER_E_SUCCESS on success, or an DEBUGSERVER_E_* error |
179 | * code otherwise. | 179 | * code otherwise. |
180 | */ | 180 | */ |
181 | debugserver_error_t debugserver_client_set_ack_mode(debugserver_client_t client, int enabled); | 181 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_ack_mode(debugserver_client_t client, int enabled); |
182 | 182 | ||
183 | /** | 183 | /** |
184 | * Sets behavior when awaiting a response from the server. | 184 | * Sets behavior when awaiting a response from the server. |
@@ -197,7 +197,7 @@ debugserver_error_t debugserver_client_set_ack_mode(debugserver_client_t client, | |||
197 | * @return DEBUGSERVER_E_SUCCESS on success, or an DEBUGSERVER_E_* error | 197 | * @return DEBUGSERVER_E_SUCCESS on success, or an DEBUGSERVER_E_* error |
198 | * code otherwise. | 198 | * code otherwise. |
199 | */ | 199 | */ |
200 | debugserver_error_t debugserver_client_set_receive_params(debugserver_client_t client, int (*cancel_receive)(), int receive_loop_timeout); | 200 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_receive_params(debugserver_client_t client, int (*cancel_receive)(), int receive_loop_timeout); |
201 | 201 | ||
202 | /** | 202 | /** |
203 | * Sets the argv which launches an app. | 203 | * Sets the argv which launches an app. |
@@ -210,7 +210,7 @@ debugserver_error_t debugserver_client_set_receive_params(debugserver_client_t c | |||
210 | * @return DEBUGSERVER_E_SUCCESS on success, | 210 | * @return DEBUGSERVER_E_SUCCESS on success, |
211 | * DEBUGSERVER_E_INVALID_ARG when client is NULL | 211 | * DEBUGSERVER_E_INVALID_ARG when client is NULL |
212 | */ | 212 | */ |
213 | debugserver_error_t debugserver_client_set_argv(debugserver_client_t client, int argc, char* argv[], char** response); | 213 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_argv(debugserver_client_t client, int argc, char* argv[], char** response); |
214 | 214 | ||
215 | /** | 215 | /** |
216 | * Adds or sets an environment variable. | 216 | * Adds or sets an environment variable. |
@@ -222,7 +222,7 @@ debugserver_error_t debugserver_client_set_argv(debugserver_client_t client, int | |||
222 | * @return DEBUGSERVER_E_SUCCESS on success, | 222 | * @return DEBUGSERVER_E_SUCCESS on success, |
223 | * DEBUGSERVER_E_INVALID_ARG when client is NULL | 223 | * DEBUGSERVER_E_INVALID_ARG when client is NULL |
224 | */ | 224 | */ |
225 | debugserver_error_t debugserver_client_set_environment_hex_encoded(debugserver_client_t client, const char* env, char** response); | 225 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_environment_hex_encoded(debugserver_client_t client, const char* env, char** response); |
226 | 226 | ||
227 | /** | 227 | /** |
228 | * Creates and initializes a new command object. | 228 | * Creates and initializes a new command object. |
@@ -235,7 +235,7 @@ debugserver_error_t debugserver_client_set_environment_hex_encoded(debugserver_c | |||
235 | * @return DEBUGSERVER_E_SUCCESS on success, | 235 | * @return DEBUGSERVER_E_SUCCESS on success, |
236 | * DEBUGSERVER_E_INVALID_ARG when name or command is NULL | 236 | * DEBUGSERVER_E_INVALID_ARG when name or command is NULL |
237 | */ | 237 | */ |
238 | debugserver_error_t debugserver_command_new(const char* name, int argc, char* argv[], debugserver_command_t* command); | 238 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_command_new(const char* name, int argc, char* argv[], debugserver_command_t* command); |
239 | 239 | ||
240 | /** | 240 | /** |
241 | * Frees memory of command object. | 241 | * Frees memory of command object. |
@@ -245,7 +245,7 @@ debugserver_error_t debugserver_command_new(const char* name, int argc, char* ar | |||
245 | * @return DEBUGSERVER_E_SUCCESS on success, | 245 | * @return DEBUGSERVER_E_SUCCESS on success, |
246 | * DEBUGSERVER_E_INVALID_ARG when command is NULL | 246 | * DEBUGSERVER_E_INVALID_ARG when command is NULL |
247 | */ | 247 | */ |
248 | debugserver_error_t debugserver_command_free(debugserver_command_t command); | 248 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_command_free(debugserver_command_t command); |
249 | 249 | ||
250 | /** | 250 | /** |
251 | * Encodes a string into hex notation. | 251 | * Encodes a string into hex notation. |
@@ -254,7 +254,7 @@ debugserver_error_t debugserver_command_free(debugserver_command_t command); | |||
254 | * @param encoded_buffer The buffer receives a hex encoded string | 254 | * @param encoded_buffer The buffer receives a hex encoded string |
255 | * @param encoded_length Length of the hex encoded string | 255 | * @param encoded_length Length of the hex encoded string |
256 | */ | 256 | */ |
257 | void debugserver_encode_string(const char* buffer, char** encoded_buffer, uint32_t* encoded_length); | 257 | LIBIMOBILEDEVICE_API void debugserver_encode_string(const char* buffer, char** encoded_buffer, uint32_t* encoded_length); |
258 | 258 | ||
259 | /** | 259 | /** |
260 | * Decodes a hex encoded string. | 260 | * Decodes a hex encoded string. |
@@ -263,7 +263,7 @@ void debugserver_encode_string(const char* buffer, char** encoded_buffer, uint32 | |||
263 | * @param encoded_length Length of the encoded buffer | 263 | * @param encoded_length Length of the encoded buffer |
264 | * @param buffer Decoded string to be freed by the caller | 264 | * @param buffer Decoded string to be freed by the caller |
265 | */ | 265 | */ |
266 | void debugserver_decode_string(const char *encoded_buffer, size_t encoded_length, char** buffer); | 266 | LIBIMOBILEDEVICE_API void debugserver_decode_string(const char *encoded_buffer, size_t encoded_length, char** buffer); |
267 | 267 | ||
268 | #ifdef __cplusplus | 268 | #ifdef __cplusplus |
269 | } | 269 | } |
diff --git a/include/libimobiledevice/diagnostics_relay.h b/include/libimobiledevice/diagnostics_relay.h index f80a86b..6ab47a9 100644 --- a/include/libimobiledevice/diagnostics_relay.h +++ b/include/libimobiledevice/diagnostics_relay.h | |||
@@ -70,7 +70,7 @@ typedef diagnostics_relay_client_private *diagnostics_relay_client_t; /**< The c | |||
70 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when one of the parameters is invalid, | 70 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when one of the parameters is invalid, |
71 | * or DIAGNOSTICS_RELAY_E_MUX_ERROR when the connection failed. | 71 | * or DIAGNOSTICS_RELAY_E_MUX_ERROR when the connection failed. |
72 | */ | 72 | */ |
73 | diagnostics_relay_error_t diagnostics_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, diagnostics_relay_client_t *client); | 73 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, diagnostics_relay_client_t *client); |
74 | 74 | ||
75 | /** | 75 | /** |
76 | * Starts a new diagnostics_relay service on the specified device and connects to it. | 76 | * Starts a new diagnostics_relay service on the specified device and connects to it. |
@@ -85,7 +85,7 @@ diagnostics_relay_error_t diagnostics_relay_client_new(idevice_t device, lockdow | |||
85 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, or an DIAGNOSTICS_RELAY_E_* error | 85 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, or an DIAGNOSTICS_RELAY_E_* error |
86 | * code otherwise. | 86 | * code otherwise. |
87 | */ | 87 | */ |
88 | diagnostics_relay_error_t diagnostics_relay_client_start_service(idevice_t device, diagnostics_relay_client_t* client, const char* label); | 88 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_client_start_service(idevice_t device, diagnostics_relay_client_t* client, const char* label); |
89 | 89 | ||
90 | /** | 90 | /** |
91 | * Disconnects a diagnostics_relay client from the device and frees up the | 91 | * Disconnects a diagnostics_relay client from the device and frees up the |
@@ -98,7 +98,7 @@ diagnostics_relay_error_t diagnostics_relay_client_start_service(idevice_t devic | |||
98 | * is invalid, or DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR when the was an | 98 | * is invalid, or DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR when the was an |
99 | * error freeing the parent property_list_service client. | 99 | * error freeing the parent property_list_service client. |
100 | */ | 100 | */ |
101 | diagnostics_relay_error_t diagnostics_relay_client_free(diagnostics_relay_client_t client); | 101 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_client_free(diagnostics_relay_client_t client); |
102 | 102 | ||
103 | 103 | ||
104 | /** | 104 | /** |
@@ -111,7 +111,7 @@ diagnostics_relay_error_t diagnostics_relay_client_free(diagnostics_relay_client | |||
111 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the | 111 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the |
112 | * request | 112 | * request |
113 | */ | 113 | */ |
114 | diagnostics_relay_error_t diagnostics_relay_goodbye(diagnostics_relay_client_t client); | 114 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_goodbye(diagnostics_relay_client_t client); |
115 | 115 | ||
116 | /** | 116 | /** |
117 | * Puts the device into deep sleep mode and disconnects from host. | 117 | * Puts the device into deep sleep mode and disconnects from host. |
@@ -123,7 +123,7 @@ diagnostics_relay_error_t diagnostics_relay_goodbye(diagnostics_relay_client_t c | |||
123 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the | 123 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the |
124 | * request | 124 | * request |
125 | */ | 125 | */ |
126 | diagnostics_relay_error_t diagnostics_relay_sleep(diagnostics_relay_client_t client); | 126 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_sleep(diagnostics_relay_client_t client); |
127 | 127 | ||
128 | /** | 128 | /** |
129 | * Restart the device and optionally show a user notification. | 129 | * Restart the device and optionally show a user notification. |
@@ -140,7 +140,7 @@ diagnostics_relay_error_t diagnostics_relay_sleep(diagnostics_relay_client_t cli | |||
140 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the | 140 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the |
141 | * request | 141 | * request |
142 | */ | 142 | */ |
143 | diagnostics_relay_error_t diagnostics_relay_restart(diagnostics_relay_client_t client, diagnostics_relay_action_t flags); | 143 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_restart(diagnostics_relay_client_t client, diagnostics_relay_action_t flags); |
144 | 144 | ||
145 | /** | 145 | /** |
146 | * Shutdown of the device and optionally show a user notification. | 146 | * Shutdown of the device and optionally show a user notification. |
@@ -157,7 +157,7 @@ diagnostics_relay_error_t diagnostics_relay_restart(diagnostics_relay_client_t c | |||
157 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the | 157 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the |
158 | * request | 158 | * request |
159 | */ | 159 | */ |
160 | diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t client, diagnostics_relay_action_t flags); | 160 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t client, diagnostics_relay_action_t flags); |
161 | 161 | ||
162 | /** | 162 | /** |
163 | * Request diagnostics information for a given type. | 163 | * Request diagnostics information for a given type. |
@@ -173,7 +173,7 @@ diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t | |||
173 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the | 173 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the |
174 | * request | 174 | * request |
175 | */ | 175 | */ |
176 | diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_relay_client_t client, const char* type, plist_t* diagnostics); | 176 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_relay_client_t client, const char* type, plist_t* diagnostics); |
177 | 177 | ||
178 | /** | 178 | /** |
179 | * Query one or multiple MobileGestalt keys. | 179 | * Query one or multiple MobileGestalt keys. |
@@ -188,7 +188,7 @@ diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_rela | |||
188 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the | 188 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the |
189 | * request | 189 | * request |
190 | */ | 190 | */ |
191 | diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_relay_client_t client, plist_t keys, plist_t* result); | 191 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_relay_client_t client, plist_t keys, plist_t* result); |
192 | 192 | ||
193 | /** | 193 | /** |
194 | * Query an IORegistry entry of a given class. | 194 | * Query an IORegistry entry of a given class. |
@@ -204,7 +204,7 @@ diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_rela | |||
204 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the | 204 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the |
205 | * request | 205 | * request |
206 | */ | 206 | */ |
207 | diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_relay_client_t client, const char* entry_name, const char* entry_class, plist_t* result); | 207 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_relay_client_t client, const char* entry_name, const char* entry_class, plist_t* result); |
208 | 208 | ||
209 | /** | 209 | /** |
210 | * Query an IORegistry plane. | 210 | * Query an IORegistry plane. |
@@ -219,7 +219,7 @@ diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_r | |||
219 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the | 219 | * DIAGNOSTICS_RELAY_E_PLIST_ERROR if the device did not acknowledge the |
220 | * request | 220 | * request |
221 | */ | 221 | */ |
222 | diagnostics_relay_error_t diagnostics_relay_query_ioregistry_plane(diagnostics_relay_client_t client, const char* plane, plist_t* result); | 222 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_query_ioregistry_plane(diagnostics_relay_client_t client, const char* plane, plist_t* result); |
223 | 223 | ||
224 | #ifdef __cplusplus | 224 | #ifdef __cplusplus |
225 | } | 225 | } |
diff --git a/include/libimobiledevice/file_relay.h b/include/libimobiledevice/file_relay.h index 6b30e65..00773b8 100644 --- a/include/libimobiledevice/file_relay.h +++ b/include/libimobiledevice/file_relay.h | |||
@@ -62,7 +62,7 @@ typedef file_relay_client_private *file_relay_client_t; /**< The client handle. | |||
62 | * FILE_RELAY_E_INVALID_ARG when one of the parameters is invalid, | 62 | * FILE_RELAY_E_INVALID_ARG when one of the parameters is invalid, |
63 | * or FILE_RELAY_E_MUX_ERROR when the connection failed. | 63 | * or FILE_RELAY_E_MUX_ERROR when the connection failed. |
64 | */ | 64 | */ |
65 | file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, file_relay_client_t *client); | 65 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, file_relay_client_t *client); |
66 | 66 | ||
67 | /** | 67 | /** |
68 | * Starts a new file_relay service on the specified device and connects to it. | 68 | * Starts a new file_relay service on the specified device and connects to it. |
@@ -77,7 +77,7 @@ file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_des | |||
77 | * @return FILE_RELAY_E_SUCCESS on success, or an FILE_RELAY_E_* error | 77 | * @return FILE_RELAY_E_SUCCESS on success, or an FILE_RELAY_E_* error |
78 | * code otherwise. | 78 | * code otherwise. |
79 | */ | 79 | */ |
80 | file_relay_error_t file_relay_client_start_service(idevice_t device, file_relay_client_t* client, const char* label); | 80 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_client_start_service(idevice_t device, file_relay_client_t* client, const char* label); |
81 | 81 | ||
82 | /** | 82 | /** |
83 | * Disconnects a file_relay client from the device and frees up the file_relay | 83 | * Disconnects a file_relay client from the device and frees up the file_relay |
@@ -90,7 +90,7 @@ file_relay_error_t file_relay_client_start_service(idevice_t device, file_relay_ | |||
90 | * is invalid, or FILE_RELAY_E_UNKNOWN_ERROR when the was an error | 90 | * is invalid, or FILE_RELAY_E_UNKNOWN_ERROR when the was an error |
91 | * freeing the parent property_list_service client. | 91 | * freeing the parent property_list_service client. |
92 | */ | 92 | */ |
93 | file_relay_error_t file_relay_client_free(file_relay_client_t client); | 93 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_client_free(file_relay_client_t client); |
94 | 94 | ||
95 | 95 | ||
96 | /** | 96 | /** |
@@ -123,7 +123,7 @@ file_relay_error_t file_relay_client_free(file_relay_client_t client); | |||
123 | * sources are invalid, FILE_RELAY_E_STAGING_EMPTY if no data is available | 123 | * sources are invalid, FILE_RELAY_E_STAGING_EMPTY if no data is available |
124 | * for the given sources, or FILE_RELAY_E_UNKNOWN_ERROR otherwise. | 124 | * for the given sources, or FILE_RELAY_E_UNKNOWN_ERROR otherwise. |
125 | */ | 125 | */ |
126 | file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, idevice_connection_t *connection); | 126 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, idevice_connection_t *connection); |
127 | 127 | ||
128 | /** | 128 | /** |
129 | * Request data for the given sources. Calls file_relay_request_sources_timeout() with | 129 | * Request data for the given sources. Calls file_relay_request_sources_timeout() with |
@@ -157,7 +157,7 @@ file_relay_error_t file_relay_request_sources(file_relay_client_t client, const | |||
157 | * sources are invalid, FILE_RELAY_E_STAGING_EMPTY if no data is available | 157 | * sources are invalid, FILE_RELAY_E_STAGING_EMPTY if no data is available |
158 | * for the given sources, or FILE_RELAY_E_UNKNOWN_ERROR otherwise. | 158 | * for the given sources, or FILE_RELAY_E_UNKNOWN_ERROR otherwise. |
159 | */ | 159 | */ |
160 | file_relay_error_t file_relay_request_sources_timeout(file_relay_client_t client, const char **sources, idevice_connection_t *connection, unsigned int timeout); | 160 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_request_sources_timeout(file_relay_client_t client, const char **sources, idevice_connection_t *connection, unsigned int timeout); |
161 | 161 | ||
162 | #ifdef __cplusplus | 162 | #ifdef __cplusplus |
163 | } | 163 | } |
diff --git a/include/libimobiledevice/heartbeat.h b/include/libimobiledevice/heartbeat.h index 42b318d..4074b8b 100644 --- a/include/libimobiledevice/heartbeat.h +++ b/include/libimobiledevice/heartbeat.h | |||
@@ -60,7 +60,7 @@ typedef heartbeat_client_private *heartbeat_client_t; /**< The client handle. */ | |||
60 | * @return HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when | 60 | * @return HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when |
61 | * client is NULL, or an HEARTBEAT_E_* error code otherwise. | 61 | * client is NULL, or an HEARTBEAT_E_* error code otherwise. |
62 | */ | 62 | */ |
63 | heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descriptor_t service, heartbeat_client_t * client); | 63 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descriptor_t service, heartbeat_client_t * client); |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * Starts a new heartbeat service on the specified device and connects to it. | 66 | * Starts a new heartbeat service on the specified device and connects to it. |
@@ -75,7 +75,7 @@ heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descr | |||
75 | * @return HEARTBEAT_E_SUCCESS on success, or an HEARTBEAT_E_* error | 75 | * @return HEARTBEAT_E_SUCCESS on success, or an HEARTBEAT_E_* error |
76 | * code otherwise. | 76 | * code otherwise. |
77 | */ | 77 | */ |
78 | heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client, const char* label); | 78 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client, const char* label); |
79 | 79 | ||
80 | /** | 80 | /** |
81 | * Disconnects a heartbeat client from the device and frees up the | 81 | * Disconnects a heartbeat client from the device and frees up the |
@@ -86,7 +86,7 @@ heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_cli | |||
86 | * @return HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when | 86 | * @return HEARTBEAT_E_SUCCESS on success, HEARTBEAT_E_INVALID_ARG when |
87 | * client is NULL, or an HEARTBEAT_E_* error code otherwise. | 87 | * client is NULL, or an HEARTBEAT_E_* error code otherwise. |
88 | */ | 88 | */ |
89 | heartbeat_error_t heartbeat_client_free(heartbeat_client_t client); | 89 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_client_free(heartbeat_client_t client); |
90 | 90 | ||
91 | 91 | ||
92 | /** | 92 | /** |
@@ -98,7 +98,7 @@ heartbeat_error_t heartbeat_client_free(heartbeat_client_t client); | |||
98 | * @return HEARTBEAT_E_SUCCESS on success, | 98 | * @return HEARTBEAT_E_SUCCESS on success, |
99 | * HEARTBEAT_E_INVALID_ARG when client or plist is NULL | 99 | * HEARTBEAT_E_INVALID_ARG when client or plist is NULL |
100 | */ | 100 | */ |
101 | heartbeat_error_t heartbeat_send(heartbeat_client_t client, plist_t plist); | 101 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_send(heartbeat_client_t client, plist_t plist); |
102 | 102 | ||
103 | /** | 103 | /** |
104 | * Receives a plist from the service. | 104 | * Receives a plist from the service. |
@@ -109,7 +109,7 @@ heartbeat_error_t heartbeat_send(heartbeat_client_t client, plist_t plist); | |||
109 | * @return HEARTBEAT_E_SUCCESS on success, | 109 | * @return HEARTBEAT_E_SUCCESS on success, |
110 | * HEARTBEAT_E_INVALID_ARG when client or plist is NULL | 110 | * HEARTBEAT_E_INVALID_ARG when client or plist is NULL |
111 | */ | 111 | */ |
112 | heartbeat_error_t heartbeat_receive(heartbeat_client_t client, plist_t * plist); | 112 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_receive(heartbeat_client_t client, plist_t * plist); |
113 | 113 | ||
114 | /** | 114 | /** |
115 | * Receives a plist using the given heartbeat client. | 115 | * Receives a plist using the given heartbeat client. |
@@ -128,7 +128,7 @@ heartbeat_error_t heartbeat_receive(heartbeat_client_t client, plist_t * plist); | |||
128 | * communication error occurs, or HEARTBEAT_E_UNKNOWN_ERROR | 128 | * communication error occurs, or HEARTBEAT_E_UNKNOWN_ERROR |
129 | * when an unspecified error occurs. | 129 | * when an unspecified error occurs. |
130 | */ | 130 | */ |
131 | heartbeat_error_t heartbeat_receive_with_timeout(heartbeat_client_t client, plist_t * plist, uint32_t timeout_ms); | 131 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_receive_with_timeout(heartbeat_client_t client, plist_t * plist, uint32_t timeout_ms); |
132 | 132 | ||
133 | #ifdef __cplusplus | 133 | #ifdef __cplusplus |
134 | } | 134 | } |
diff --git a/include/libimobiledevice/house_arrest.h b/include/libimobiledevice/house_arrest.h index 3785847..f9ba68a 100644 --- a/include/libimobiledevice/house_arrest.h +++ b/include/libimobiledevice/house_arrest.h | |||
@@ -61,7 +61,7 @@ typedef house_arrest_client_private *house_arrest_client_t; /**< The client hand | |||
61 | * @return HOUSE_ARREST_E_SUCCESS on success, HOUSE_ARREST_E_INVALID_ARG when | 61 | * @return HOUSE_ARREST_E_SUCCESS on success, HOUSE_ARREST_E_INVALID_ARG when |
62 | * client is NULL, or an HOUSE_ARREST_E_* error code otherwise. | 62 | * client is NULL, or an HOUSE_ARREST_E_* error code otherwise. |
63 | */ | 63 | */ |
64 | house_arrest_error_t house_arrest_client_new(idevice_t device, lockdownd_service_descriptor_t service, house_arrest_client_t *client); | 64 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_client_new(idevice_t device, lockdownd_service_descriptor_t service, house_arrest_client_t *client); |
65 | 65 | ||
66 | /** | 66 | /** |
67 | * Starts a new house_arrest service on the specified device and connects to it. | 67 | * Starts a new house_arrest service on the specified device and connects to it. |
@@ -76,7 +76,7 @@ house_arrest_error_t house_arrest_client_new(idevice_t device, lockdownd_service | |||
76 | * @return HOUSE_ARREST_E_SUCCESS on success, or an HOUSE_ARREST_E_* error | 76 | * @return HOUSE_ARREST_E_SUCCESS on success, or an HOUSE_ARREST_E_* error |
77 | * code otherwise. | 77 | * code otherwise. |
78 | */ | 78 | */ |
79 | house_arrest_error_t house_arrest_client_start_service(idevice_t device, house_arrest_client_t* client, const char* label); | 79 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_client_start_service(idevice_t device, house_arrest_client_t* client, const char* label); |
80 | 80 | ||
81 | /** | 81 | /** |
82 | * Disconnects an house_arrest client from the device and frees up the | 82 | * Disconnects an house_arrest client from the device and frees up the |
@@ -92,7 +92,7 @@ house_arrest_error_t house_arrest_client_start_service(idevice_t device, house_a | |||
92 | * @return HOUSE_ARREST_E_SUCCESS on success, HOUSE_ARREST_E_INVALID_ARG when | 92 | * @return HOUSE_ARREST_E_SUCCESS on success, HOUSE_ARREST_E_INVALID_ARG when |
93 | * client is NULL, or an HOUSE_ARREST_E_* error code otherwise. | 93 | * client is NULL, or an HOUSE_ARREST_E_* error code otherwise. |
94 | */ | 94 | */ |
95 | house_arrest_error_t house_arrest_client_free(house_arrest_client_t client); | 95 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_client_free(house_arrest_client_t client); |
96 | 96 | ||
97 | 97 | ||
98 | /** | 98 | /** |
@@ -112,7 +112,7 @@ house_arrest_error_t house_arrest_client_free(house_arrest_client_t client); | |||
112 | * HOUSE_ARREST_E_INVALID_MODE if the client is not in the correct mode, | 112 | * HOUSE_ARREST_E_INVALID_MODE if the client is not in the correct mode, |
113 | * or HOUSE_ARREST_E_CONN_FAILED if a connection error occurred. | 113 | * or HOUSE_ARREST_E_CONN_FAILED if a connection error occurred. |
114 | */ | 114 | */ |
115 | house_arrest_error_t house_arrest_send_request(house_arrest_client_t client, plist_t dict); | 115 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_send_request(house_arrest_client_t client, plist_t dict); |
116 | 116 | ||
117 | /** | 117 | /** |
118 | * Send a command to the connected house_arrest service. | 118 | * Send a command to the connected house_arrest service. |
@@ -133,7 +133,7 @@ house_arrest_error_t house_arrest_send_request(house_arrest_client_t client, pli | |||
133 | * HOUSE_ARREST_E_INVALID_MODE if the client is not in the correct mode, | 133 | * HOUSE_ARREST_E_INVALID_MODE if the client is not in the correct mode, |
134 | * or HOUSE_ARREST_E_CONN_FAILED if a connection error occurred. | 134 | * or HOUSE_ARREST_E_CONN_FAILED if a connection error occurred. |
135 | */ | 135 | */ |
136 | house_arrest_error_t house_arrest_send_command(house_arrest_client_t client, const char *command, const char *appid); | 136 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_send_command(house_arrest_client_t client, const char *command, const char *appid); |
137 | 137 | ||
138 | /** | 138 | /** |
139 | * Retrieves the result of a previously sent house_arrest_request_* request. | 139 | * Retrieves the result of a previously sent house_arrest_request_* request. |
@@ -149,7 +149,7 @@ house_arrest_error_t house_arrest_send_command(house_arrest_client_t client, con | |||
149 | * HOUSE_ARREST_E_INVALID_MODE if the client is not in the correct mode, | 149 | * HOUSE_ARREST_E_INVALID_MODE if the client is not in the correct mode, |
150 | * or HOUSE_ARREST_E_CONN_FAILED if a connection error occurred. | 150 | * or HOUSE_ARREST_E_CONN_FAILED if a connection error occurred. |
151 | */ | 151 | */ |
152 | house_arrest_error_t house_arrest_get_result(house_arrest_client_t client, plist_t *dict); | 152 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_get_result(house_arrest_client_t client, plist_t *dict); |
153 | 153 | ||
154 | 154 | ||
155 | /** | 155 | /** |
@@ -171,7 +171,7 @@ house_arrest_error_t house_arrest_get_result(house_arrest_client_t client, plist | |||
171 | * an afc client, or an AFC_E_* error code returned by | 171 | * an afc client, or an AFC_E_* error code returned by |
172 | * afc_client_new_with_service_client(). | 172 | * afc_client_new_with_service_client(). |
173 | */ | 173 | */ |
174 | afc_error_t afc_client_new_from_house_arrest_client(house_arrest_client_t client, afc_client_t *afc_client); | 174 | LIBIMOBILEDEVICE_API afc_error_t afc_client_new_from_house_arrest_client(house_arrest_client_t client, afc_client_t *afc_client); |
175 | 175 | ||
176 | #ifdef __cplusplus | 176 | #ifdef __cplusplus |
177 | } | 177 | } |
diff --git a/include/libimobiledevice/installation_proxy.h b/include/libimobiledevice/installation_proxy.h index 87132b9..44331aa 100644 --- a/include/libimobiledevice/installation_proxy.h +++ b/include/libimobiledevice/installation_proxy.h | |||
@@ -127,7 +127,7 @@ typedef void (*instproxy_status_cb_t) (plist_t command, plist_t status, void *us | |||
127 | * @return INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error value | 127 | * @return INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error value |
128 | * when an error occurred. | 128 | * when an error occurred. |
129 | */ | 129 | */ |
130 | instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client); | 130 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client); |
131 | 131 | ||
132 | /** | 132 | /** |
133 | * Starts a new installation_proxy service on the specified device and connects to it. | 133 | * Starts a new installation_proxy service on the specified device and connects to it. |
@@ -142,7 +142,7 @@ instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descr | |||
142 | * @return INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error | 142 | * @return INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error |
143 | * code otherwise. | 143 | * code otherwise. |
144 | */ | 144 | */ |
145 | instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label); | 145 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label); |
146 | 146 | ||
147 | /** | 147 | /** |
148 | * Disconnects an installation_proxy client from the device and frees up the | 148 | * Disconnects an installation_proxy client from the device and frees up the |
@@ -153,7 +153,7 @@ instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_cli | |||
153 | * @return INSTPROXY_E_SUCCESS on success | 153 | * @return INSTPROXY_E_SUCCESS on success |
154 | * or INSTPROXY_E_INVALID_ARG if client is NULL. | 154 | * or INSTPROXY_E_INVALID_ARG if client is NULL. |
155 | */ | 155 | */ |
156 | instproxy_error_t instproxy_client_free(instproxy_client_t client); | 156 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_free(instproxy_client_t client); |
157 | 157 | ||
158 | /** | 158 | /** |
159 | * List installed applications. This function runs synchronously. | 159 | * List installed applications. This function runs synchronously. |
@@ -171,7 +171,7 @@ instproxy_error_t instproxy_client_free(instproxy_client_t client); | |||
171 | * @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if | 171 | * @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if |
172 | * an error occurred. | 172 | * an error occurred. |
173 | */ | 173 | */ |
174 | instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result); | 174 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result); |
175 | 175 | ||
176 | /** | 176 | /** |
177 | * List pages of installed applications in a callback. | 177 | * List pages of installed applications in a callback. |
@@ -190,7 +190,7 @@ instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_opt | |||
190 | * @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if | 190 | * @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if |
191 | * an error occurred. | 191 | * an error occurred. |
192 | */ | 192 | */ |
193 | instproxy_error_t instproxy_browse_with_callback(instproxy_client_t client, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); | 193 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_browse_with_callback(instproxy_client_t client, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); |
194 | 194 | ||
195 | /** | 195 | /** |
196 | * Lookup information about specific applications from the device. | 196 | * Lookup information about specific applications from the device. |
@@ -206,7 +206,7 @@ instproxy_error_t instproxy_browse_with_callback(instproxy_client_t client, plis | |||
206 | * @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if | 206 | * @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if |
207 | * an error occurred. | 207 | * an error occurred. |
208 | */ | 208 | */ |
209 | instproxy_error_t instproxy_lookup(instproxy_client_t client, const char** appids, plist_t client_options, plist_t *result); | 209 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup(instproxy_client_t client, const char** appids, plist_t client_options, plist_t *result); |
210 | 210 | ||
211 | /** | 211 | /** |
212 | * Install an application on the device. | 212 | * Install an application on the device. |
@@ -232,7 +232,7 @@ instproxy_error_t instproxy_lookup(instproxy_client_t client, const char** appid | |||
232 | * created successfully; any error occurring during the command has to be | 232 | * created successfully; any error occurring during the command has to be |
233 | * handled inside the specified callback function. | 233 | * handled inside the specified callback function. |
234 | */ | 234 | */ |
235 | instproxy_error_t instproxy_install(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); | 235 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_install(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); |
236 | 236 | ||
237 | /** | 237 | /** |
238 | * Upgrade an application on the device. This function is nearly the same as | 238 | * Upgrade an application on the device. This function is nearly the same as |
@@ -260,7 +260,7 @@ instproxy_error_t instproxy_install(instproxy_client_t client, const char *pkg_p | |||
260 | * created successfully; any error occurring during the command has to be | 260 | * created successfully; any error occurring during the command has to be |
261 | * handled inside the specified callback function. | 261 | * handled inside the specified callback function. |
262 | */ | 262 | */ |
263 | instproxy_error_t instproxy_upgrade(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); | 263 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_upgrade(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); |
264 | 264 | ||
265 | /** | 265 | /** |
266 | * Uninstall an application from the device. | 266 | * Uninstall an application from the device. |
@@ -281,7 +281,7 @@ instproxy_error_t instproxy_upgrade(instproxy_client_t client, const char *pkg_p | |||
281 | * created successfully; any error occurring during the command has to be | 281 | * created successfully; any error occurring during the command has to be |
282 | * handled inside the specified callback function. | 282 | * handled inside the specified callback function. |
283 | */ | 283 | */ |
284 | instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); | 284 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); |
285 | 285 | ||
286 | /** | 286 | /** |
287 | * List archived applications. This function runs synchronously. | 287 | * List archived applications. This function runs synchronously. |
@@ -297,7 +297,7 @@ instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *app | |||
297 | * @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if | 297 | * @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if |
298 | * an error occurred. | 298 | * an error occurred. |
299 | */ | 299 | */ |
300 | instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result); | 300 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result); |
301 | 301 | ||
302 | /** | 302 | /** |
303 | * Archive an application on the device. | 303 | * Archive an application on the device. |
@@ -323,7 +323,7 @@ instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t c | |||
323 | * created successfully; any error occurring during the command has to be | 323 | * created successfully; any error occurring during the command has to be |
324 | * handled inside the specified callback function. | 324 | * handled inside the specified callback function. |
325 | */ | 325 | */ |
326 | instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); | 326 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); |
327 | 327 | ||
328 | /** | 328 | /** |
329 | * Restore a previously archived application on the device. | 329 | * Restore a previously archived application on the device. |
@@ -347,7 +347,7 @@ instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid | |||
347 | * created successfully; any error occurring during the command has to be | 347 | * created successfully; any error occurring during the command has to be |
348 | * handled inside the specified callback function. | 348 | * handled inside the specified callback function. |
349 | */ | 349 | */ |
350 | instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); | 350 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); |
351 | 351 | ||
352 | /** | 352 | /** |
353 | * Removes a previously archived application from the device. | 353 | * Removes a previously archived application from the device. |
@@ -370,7 +370,7 @@ instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid | |||
370 | * created successfully; any error occurring during the command has to be | 370 | * created successfully; any error occurring during the command has to be |
371 | * handled inside the specified callback function. | 371 | * handled inside the specified callback function. |
372 | */ | 372 | */ |
373 | instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); | 373 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data); |
374 | 374 | ||
375 | /** | 375 | /** |
376 | * Checks a device for certain capabilities. | 376 | * Checks a device for certain capabilities. |
@@ -386,7 +386,7 @@ instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char | |||
386 | * @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if | 386 | * @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if |
387 | * an error occurred. | 387 | * an error occurred. |
388 | */ | 388 | */ |
389 | instproxy_error_t instproxy_check_capabilities_match(instproxy_client_t client, const char** capabilities, plist_t client_options, plist_t *result); | 389 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_check_capabilities_match(instproxy_client_t client, const char** capabilities, plist_t client_options, plist_t *result); |
390 | 390 | ||
391 | /* Helper */ | 391 | /* Helper */ |
392 | 392 | ||
@@ -396,7 +396,7 @@ instproxy_error_t instproxy_check_capabilities_match(instproxy_client_t client, | |||
396 | * @param command The dictionary describing the command. | 396 | * @param command The dictionary describing the command. |
397 | * @param name Pointer to store the name of the command. | 397 | * @param name Pointer to store the name of the command. |
398 | */ | 398 | */ |
399 | void instproxy_command_get_name(plist_t command, char** name); | 399 | LIBIMOBILEDEVICE_API void instproxy_command_get_name(plist_t command, char** name); |
400 | 400 | ||
401 | /** | 401 | /** |
402 | * Gets the name of a status. | 402 | * Gets the name of a status. |
@@ -404,7 +404,7 @@ void instproxy_command_get_name(plist_t command, char** name); | |||
404 | * @param status The dictionary status response to use. | 404 | * @param status The dictionary status response to use. |
405 | * @param name Pointer to store the name of the status. | 405 | * @param name Pointer to store the name of the status. |
406 | */ | 406 | */ |
407 | void instproxy_status_get_name(plist_t status, char **name); | 407 | LIBIMOBILEDEVICE_API void instproxy_status_get_name(plist_t status, char **name); |
408 | 408 | ||
409 | /** | 409 | /** |
410 | * Gets error name, code and description from a response if available. | 410 | * Gets error name, code and description from a response if available. |
@@ -420,7 +420,7 @@ void instproxy_status_get_name(plist_t status, char **name); | |||
420 | * @return INSTPROXY_E_SUCCESS if no error is found or an INSTPROXY_E_* error | 420 | * @return INSTPROXY_E_SUCCESS if no error is found or an INSTPROXY_E_* error |
421 | * value matching the error that ẃas found in the status. | 421 | * value matching the error that ẃas found in the status. |
422 | */ | 422 | */ |
423 | instproxy_error_t instproxy_status_get_error(plist_t status, char **name, char** description, uint64_t* code); | 423 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_status_get_error(plist_t status, char **name, char** description, uint64_t* code); |
424 | 424 | ||
425 | /** | 425 | /** |
426 | * Gets total and current item information from a browse response if available. | 426 | * Gets total and current item information from a browse response if available. |
@@ -435,7 +435,7 @@ instproxy_error_t instproxy_status_get_error(plist_t status, char **name, char** | |||
435 | * If NULL is passed no list will be returned. If NULL is returned no | 435 | * If NULL is passed no list will be returned. If NULL is returned no |
436 | * list was found in the status. | 436 | * list was found in the status. |
437 | */ | 437 | */ |
438 | void instproxy_status_get_current_list(plist_t status, uint64_t* total, uint64_t* current_index, uint64_t* current_amount, plist_t* list); | 438 | LIBIMOBILEDEVICE_API void instproxy_status_get_current_list(plist_t status, uint64_t* total, uint64_t* current_index, uint64_t* current_amount, plist_t* list); |
439 | 439 | ||
440 | 440 | ||
441 | /** | 441 | /** |
@@ -445,14 +445,14 @@ void instproxy_status_get_current_list(plist_t status, uint64_t* total, uint64_t | |||
445 | * @param percent Pointer to an int to store the progress in percent (0-100) | 445 | * @param percent Pointer to an int to store the progress in percent (0-100) |
446 | * or -1 if no progress was found in the status. | 446 | * or -1 if no progress was found in the status. |
447 | */ | 447 | */ |
448 | void instproxy_status_get_percent_complete(plist_t status, int *percent); | 448 | LIBIMOBILEDEVICE_API void instproxy_status_get_percent_complete(plist_t status, int *percent); |
449 | 449 | ||
450 | /** | 450 | /** |
451 | * Creates a new client_options plist. | 451 | * Creates a new client_options plist. |
452 | * | 452 | * |
453 | * @return A new plist_t of type PLIST_DICT. | 453 | * @return A new plist_t of type PLIST_DICT. |
454 | */ | 454 | */ |
455 | plist_t instproxy_client_options_new(void); | 455 | LIBIMOBILEDEVICE_API plist_t instproxy_client_options_new(void); |
456 | 456 | ||
457 | /** | 457 | /** |
458 | * Adds one or more new key:value pairs to the given client_options. | 458 | * Adds one or more new key:value pairs to the given client_options. |
@@ -464,7 +464,7 @@ plist_t instproxy_client_options_new(void); | |||
464 | * keys "ApplicationSINF", "iTunesMetadata", "ReturnAttributes" which are | 464 | * keys "ApplicationSINF", "iTunesMetadata", "ReturnAttributes" which are |
465 | * expecting a plist_t node as value and "SkipUninstall" expects int. | 465 | * expecting a plist_t node as value and "SkipUninstall" expects int. |
466 | */ | 466 | */ |
467 | void instproxy_client_options_add(plist_t client_options, ...); | 467 | LIBIMOBILEDEVICE_API void instproxy_client_options_add(plist_t client_options, ...); |
468 | 468 | ||
469 | /** | 469 | /** |
470 | * Adds attributes to the given client_options to filter browse results. | 470 | * Adds attributes to the given client_options to filter browse results. |
@@ -474,7 +474,7 @@ void instproxy_client_options_add(plist_t client_options, ...); | |||
474 | * | 474 | * |
475 | * @note The values passed are expected to be strings. | 475 | * @note The values passed are expected to be strings. |
476 | */ | 476 | */ |
477 | void instproxy_client_options_set_return_attributes(plist_t client_options, ...); | 477 | LIBIMOBILEDEVICE_API void instproxy_client_options_set_return_attributes(plist_t client_options, ...); |
478 | 478 | ||
479 | /** | 479 | /** |
480 | * Frees client_options plist. | 480 | * Frees client_options plist. |
@@ -482,7 +482,7 @@ void instproxy_client_options_set_return_attributes(plist_t client_options, ...) | |||
482 | * @param client_options The client options plist to free. Does nothing if NULL | 482 | * @param client_options The client options plist to free. Does nothing if NULL |
483 | * is passed. | 483 | * is passed. |
484 | */ | 484 | */ |
485 | void instproxy_client_options_free(plist_t client_options); | 485 | LIBIMOBILEDEVICE_API void instproxy_client_options_free(plist_t client_options); |
486 | 486 | ||
487 | /** | 487 | /** |
488 | * Queries the device for the path of an application. | 488 | * Queries the device for the path of an application. |
@@ -496,7 +496,7 @@ void instproxy_client_options_free(plist_t client_options); | |||
496 | * the path could not be determined or an INSTPROXY_E_* error | 496 | * the path could not be determined or an INSTPROXY_E_* error |
497 | * value if an error occurred. | 497 | * value if an error occurred. |
498 | */ | 498 | */ |
499 | instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* bundle_id, char** path); | 499 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* bundle_id, char** path); |
500 | 500 | ||
501 | #ifdef __cplusplus | 501 | #ifdef __cplusplus |
502 | } | 502 | } |
diff --git a/include/libimobiledevice/libimobiledevice.h b/include/libimobiledevice/libimobiledevice.h index 6851145..66b4145 100644 --- a/include/libimobiledevice/libimobiledevice.h +++ b/include/libimobiledevice/libimobiledevice.h | |||
@@ -35,6 +35,16 @@ extern "C" { | |||
35 | #include <sys/stat.h> | 35 | #include <sys/stat.h> |
36 | #include <plist/plist.h> | 36 | #include <plist/plist.h> |
37 | 37 | ||
38 | #ifndef LIBIMOBILEDEVICE_API | ||
39 | #ifdef LIBIMOBILEDEVICE_STATIC | ||
40 | #define LIBIMOBILEDEVICE_API | ||
41 | #elif defined(_WIN32) | ||
42 | #define LIBIMOBILEDEVICE_API __declspec(dllimport) | ||
43 | #else | ||
44 | #define LIBIMOBILEDEVICE_API | ||
45 | #endif | ||
46 | #endif | ||
47 | |||
38 | /** Error Codes */ | 48 | /** Error Codes */ |
39 | typedef enum { | 49 | typedef enum { |
40 | IDEVICE_E_SUCCESS = 0, | 50 | IDEVICE_E_SUCCESS = 0, |
@@ -104,7 +114,7 @@ typedef struct idevice_subscription_context* idevice_subscription_context_t; | |||
104 | * | 114 | * |
105 | * @param level Set to 0 for no debug output or 1 to enable debug output. | 115 | * @param level Set to 0 for no debug output or 1 to enable debug output. |
106 | */ | 116 | */ |
107 | void idevice_set_debug_level(int level); | 117 | LIBIMOBILEDEVICE_API void idevice_set_debug_level(int level); |
108 | 118 | ||
109 | /** | 119 | /** |
110 | * Subscribe a callback function that will be called when device add/remove | 120 | * Subscribe a callback function that will be called when device add/remove |
@@ -119,7 +129,7 @@ void idevice_set_debug_level(int level); | |||
119 | * | 129 | * |
120 | * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred. | 130 | * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred. |
121 | */ | 131 | */ |
122 | idevice_error_t idevice_events_subscribe(idevice_subscription_context_t *context, idevice_event_cb_t callback, void *user_data); | 132 | LIBIMOBILEDEVICE_API idevice_error_t idevice_events_subscribe(idevice_subscription_context_t *context, idevice_event_cb_t callback, void *user_data); |
123 | 133 | ||
124 | /** | 134 | /** |
125 | * Unsubscribe the event callback function that has been registered with | 135 | * Unsubscribe the event callback function that has been registered with |
@@ -129,7 +139,7 @@ idevice_error_t idevice_events_subscribe(idevice_subscription_context_t *context | |||
129 | * | 139 | * |
130 | * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred. | 140 | * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred. |
131 | */ | 141 | */ |
132 | idevice_error_t idevice_events_unsubscribe(idevice_subscription_context_t context); | 142 | LIBIMOBILEDEVICE_API idevice_error_t idevice_events_unsubscribe(idevice_subscription_context_t context); |
133 | 143 | ||
134 | /** | 144 | /** |
135 | * (DEPRECATED) Register a callback function that will be called when device add/remove | 145 | * (DEPRECATED) Register a callback function that will be called when device add/remove |
@@ -143,7 +153,7 @@ idevice_error_t idevice_events_unsubscribe(idevice_subscription_context_t contex | |||
143 | * | 153 | * |
144 | * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred. | 154 | * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred. |
145 | */ | 155 | */ |
146 | idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data); | 156 | LIBIMOBILEDEVICE_API idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data); |
147 | 157 | ||
148 | /** | 158 | /** |
149 | * (DEPRECATED) Release the event callback function that has been registered with | 159 | * (DEPRECATED) Release the event callback function that has been registered with |
@@ -153,7 +163,7 @@ idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_ | |||
153 | * | 163 | * |
154 | * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred. | 164 | * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred. |
155 | */ | 165 | */ |
156 | idevice_error_t idevice_event_unsubscribe(void); | 166 | LIBIMOBILEDEVICE_API idevice_error_t idevice_event_unsubscribe(void); |
157 | 167 | ||
158 | /* discovery (synchronous) */ | 168 | /* discovery (synchronous) */ |
159 | 169 | ||
@@ -170,7 +180,7 @@ idevice_error_t idevice_event_unsubscribe(void); | |||
170 | * network devices in the list, use idevice_get_device_list_extended(). | 180 | * network devices in the list, use idevice_get_device_list_extended(). |
171 | * @see idevice_get_device_list_extended | 181 | * @see idevice_get_device_list_extended |
172 | */ | 182 | */ |
173 | idevice_error_t idevice_get_device_list(char ***devices, int *count); | 183 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_device_list(char ***devices, int *count); |
174 | 184 | ||
175 | /** | 185 | /** |
176 | * Free a list of device UDIDs. | 186 | * Free a list of device UDIDs. |
@@ -179,7 +189,7 @@ idevice_error_t idevice_get_device_list(char ***devices, int *count); | |||
179 | * | 189 | * |
180 | * @return Always returnes IDEVICE_E_SUCCESS. | 190 | * @return Always returnes IDEVICE_E_SUCCESS. |
181 | */ | 191 | */ |
182 | idevice_error_t idevice_device_list_free(char **devices); | 192 | LIBIMOBILEDEVICE_API idevice_error_t idevice_device_list_free(char **devices); |
183 | 193 | ||
184 | /** | 194 | /** |
185 | * Get a list of currently available devices | 195 | * Get a list of currently available devices |
@@ -190,7 +200,7 @@ idevice_error_t idevice_device_list_free(char **devices); | |||
190 | * | 200 | * |
191 | * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred. | 201 | * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred. |
192 | */ | 202 | */ |
193 | idevice_error_t idevice_get_device_list_extended(idevice_info_t **devices, int *count); | 203 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_device_list_extended(idevice_info_t **devices, int *count); |
194 | 204 | ||
195 | /** | 205 | /** |
196 | * Free an extended device list retrieved through idevice_get_device_list_extended(). | 206 | * Free an extended device list retrieved through idevice_get_device_list_extended(). |
@@ -199,7 +209,7 @@ idevice_error_t idevice_get_device_list_extended(idevice_info_t **devices, int * | |||
199 | * | 209 | * |
200 | * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred. | 210 | * @return IDEVICE_E_SUCCESS on success or an error value when an error occurred. |
201 | */ | 211 | */ |
202 | idevice_error_t idevice_device_list_extended_free(idevice_info_t *devices); | 212 | LIBIMOBILEDEVICE_API idevice_error_t idevice_device_list_extended_free(idevice_info_t *devices); |
203 | 213 | ||
204 | /* device structure creation and destruction */ | 214 | /* device structure creation and destruction */ |
205 | 215 | ||
@@ -220,7 +230,7 @@ idevice_error_t idevice_device_list_extended_free(idevice_info_t *devices); | |||
220 | * | 230 | * |
221 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. | 231 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. |
222 | */ | 232 | */ |
223 | idevice_error_t idevice_new(idevice_t *device, const char *udid); | 233 | LIBIMOBILEDEVICE_API idevice_error_t idevice_new(idevice_t *device, const char *udid); |
224 | 234 | ||
225 | /** | 235 | /** |
226 | * Creates an idevice_t structure for the device specified by UDID, | 236 | * Creates an idevice_t structure for the device specified by UDID, |
@@ -243,14 +253,14 @@ idevice_error_t idevice_new(idevice_t *device, const char *udid); | |||
243 | * | 253 | * |
244 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. | 254 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. |
245 | */ | 255 | */ |
246 | idevice_error_t idevice_new_with_options(idevice_t *device, const char *udid, enum idevice_options options); | 256 | LIBIMOBILEDEVICE_API idevice_error_t idevice_new_with_options(idevice_t *device, const char *udid, enum idevice_options options); |
247 | 257 | ||
248 | /** | 258 | /** |
249 | * Cleans up an idevice structure, then frees the structure itself. | 259 | * Cleans up an idevice structure, then frees the structure itself. |
250 | * | 260 | * |
251 | * @param device idevice_t to free. | 261 | * @param device idevice_t to free. |
252 | */ | 262 | */ |
253 | idevice_error_t idevice_free(idevice_t device); | 263 | LIBIMOBILEDEVICE_API idevice_error_t idevice_free(idevice_t device); |
254 | 264 | ||
255 | /* connection/disconnection */ | 265 | /* connection/disconnection */ |
256 | 266 | ||
@@ -264,7 +274,7 @@ idevice_error_t idevice_free(idevice_t device); | |||
264 | * | 274 | * |
265 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. | 275 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. |
266 | */ | 276 | */ |
267 | idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connection_t *connection); | 277 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connection_t *connection); |
268 | 278 | ||
269 | /** | 279 | /** |
270 | * Disconnect from the device and clean up the connection structure. | 280 | * Disconnect from the device and clean up the connection structure. |
@@ -273,7 +283,7 @@ idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connect | |||
273 | * | 283 | * |
274 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. | 284 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. |
275 | */ | 285 | */ |
276 | idevice_error_t idevice_disconnect(idevice_connection_t connection); | 286 | LIBIMOBILEDEVICE_API idevice_error_t idevice_disconnect(idevice_connection_t connection); |
277 | 287 | ||
278 | /* communication */ | 288 | /* communication */ |
279 | 289 | ||
@@ -288,7 +298,7 @@ idevice_error_t idevice_disconnect(idevice_connection_t connection); | |||
288 | * | 298 | * |
289 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. | 299 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. |
290 | */ | 300 | */ |
291 | idevice_error_t idevice_connection_send(idevice_connection_t connection, const char *data, uint32_t len, uint32_t *sent_bytes); | 301 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_send(idevice_connection_t connection, const char *data, uint32_t len, uint32_t *sent_bytes); |
292 | 302 | ||
293 | /** | 303 | /** |
294 | * Receive data from a device via the given connection. | 304 | * Receive data from a device via the given connection. |
@@ -305,7 +315,7 @@ idevice_error_t idevice_connection_send(idevice_connection_t connection, const c | |||
305 | * | 315 | * |
306 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. | 316 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. |
307 | */ | 317 | */ |
308 | idevice_error_t idevice_connection_receive_timeout(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout); | 318 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_receive_timeout(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout); |
309 | 319 | ||
310 | /** | 320 | /** |
311 | * Receive data from a device via the given connection. | 321 | * Receive data from a device via the given connection. |
@@ -320,7 +330,7 @@ idevice_error_t idevice_connection_receive_timeout(idevice_connection_t connecti | |||
320 | * | 330 | * |
321 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. | 331 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. |
322 | */ | 332 | */ |
323 | idevice_error_t idevice_connection_receive(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes); | 333 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_receive(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes); |
324 | 334 | ||
325 | /** | 335 | /** |
326 | * Enables SSL for the given connection. | 336 | * Enables SSL for the given connection. |
@@ -331,7 +341,7 @@ idevice_error_t idevice_connection_receive(idevice_connection_t connection, char | |||
331 | * is NULL or connection->ssl_data is non-NULL, or IDEVICE_E_SSL_ERROR when | 341 | * is NULL or connection->ssl_data is non-NULL, or IDEVICE_E_SSL_ERROR when |
332 | * SSL initialization, setup, or handshake fails. | 342 | * SSL initialization, setup, or handshake fails. |
333 | */ | 343 | */ |
334 | idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection); | 344 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection); |
335 | 345 | ||
336 | /** | 346 | /** |
337 | * Disable SSL for the given connection. | 347 | * Disable SSL for the given connection. |
@@ -342,7 +352,7 @@ idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection); | |||
342 | * is NULL. This function also returns IDEVICE_E_SUCCESS when SSL is not | 352 | * is NULL. This function also returns IDEVICE_E_SUCCESS when SSL is not |
343 | * enabled and does no further error checking on cleanup. | 353 | * enabled and does no further error checking on cleanup. |
344 | */ | 354 | */ |
345 | idevice_error_t idevice_connection_disable_ssl(idevice_connection_t connection); | 355 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_disable_ssl(idevice_connection_t connection); |
346 | 356 | ||
347 | /** | 357 | /** |
348 | * Disable bypass SSL for the given connection without sending out terminate messages. | 358 | * Disable bypass SSL for the given connection without sending out terminate messages. |
@@ -355,7 +365,7 @@ idevice_error_t idevice_connection_disable_ssl(idevice_connection_t connection); | |||
355 | * is NULL. This function also returns IDEVICE_E_SUCCESS when SSL is not | 365 | * is NULL. This function also returns IDEVICE_E_SUCCESS when SSL is not |
356 | * enabled and does no further error checking on cleanup. | 366 | * enabled and does no further error checking on cleanup. |
357 | */ | 367 | */ |
358 | idevice_error_t idevice_connection_disable_bypass_ssl(idevice_connection_t connection, uint8_t sslBypass); | 368 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_disable_bypass_ssl(idevice_connection_t connection, uint8_t sslBypass); |
359 | 369 | ||
360 | 370 | ||
361 | /** | 371 | /** |
@@ -366,7 +376,7 @@ idevice_error_t idevice_connection_disable_bypass_ssl(idevice_connection_t conne | |||
366 | * | 376 | * |
367 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. | 377 | * @return IDEVICE_E_SUCCESS if ok, otherwise an error code. |
368 | */ | 378 | */ |
369 | idevice_error_t idevice_connection_get_fd(idevice_connection_t connection, int *fd); | 379 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_get_fd(idevice_connection_t connection, int *fd); |
370 | 380 | ||
371 | /* misc */ | 381 | /* misc */ |
372 | 382 | ||
@@ -378,7 +388,7 @@ idevice_error_t idevice_connection_get_fd(idevice_connection_t connection, int * | |||
378 | * | 388 | * |
379 | * @return IDEVICE_E_SUCCESS on success, otherwise an error code. | 389 | * @return IDEVICE_E_SUCCESS on success, otherwise an error code. |
380 | */ | 390 | */ |
381 | idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle); | 391 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle); |
382 | 392 | ||
383 | /** | 393 | /** |
384 | * Gets the Unique Device ID for the device. | 394 | * Gets the Unique Device ID for the device. |
@@ -388,7 +398,7 @@ idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle); | |||
388 | * | 398 | * |
389 | * @return IDEVICE_E_SUCCESS on success, otherwise an error code. | 399 | * @return IDEVICE_E_SUCCESS on success, otherwise an error code. |
390 | */ | 400 | */ |
391 | idevice_error_t idevice_get_udid(idevice_t device, char **udid); | 401 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_udid(idevice_t device, char **udid); |
392 | 402 | ||
393 | #ifdef __cplusplus | 403 | #ifdef __cplusplus |
394 | } | 404 | } |
diff --git a/include/libimobiledevice/lockdown.h b/include/libimobiledevice/lockdown.h index 6d390fd..21669ef 100644 --- a/include/libimobiledevice/lockdown.h +++ b/include/libimobiledevice/lockdown.h | |||
@@ -130,7 +130,7 @@ typedef void (*lockdownd_cu_pairing_cb_t) (lockdownd_cu_pairing_cb_type_t cb_typ | |||
130 | * | 130 | * |
131 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL | 131 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL |
132 | */ | 132 | */ |
133 | lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *client, const char *label); | 133 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *client, const char *label); |
134 | 134 | ||
135 | /** | 135 | /** |
136 | * Creates a new lockdownd client for the device and starts initial handshake. | 136 | * Creates a new lockdownd client for the device and starts initial handshake. |
@@ -149,7 +149,7 @@ lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *cli | |||
149 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL, | 149 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL, |
150 | * LOCKDOWN_E_INVALID_CONF if configuration data is wrong | 150 | * LOCKDOWN_E_INVALID_CONF if configuration data is wrong |
151 | */ | 151 | */ |
152 | lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdownd_client_t *client, const char *label); | 152 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdownd_client_t *client, const char *label); |
153 | 153 | ||
154 | /** | 154 | /** |
155 | * Closes the lockdownd client session if one is running and frees up the | 155 | * Closes the lockdownd client session if one is running and frees up the |
@@ -159,7 +159,7 @@ lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdown | |||
159 | * | 159 | * |
160 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL | 160 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL |
161 | */ | 161 | */ |
162 | lockdownd_error_t lockdownd_client_free(lockdownd_client_t client); | 162 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_client_free(lockdownd_client_t client); |
163 | 163 | ||
164 | 164 | ||
165 | /** | 165 | /** |
@@ -171,7 +171,7 @@ lockdownd_error_t lockdownd_client_free(lockdownd_client_t client); | |||
171 | * | 171 | * |
172 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL | 172 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL |
173 | */ | 173 | */ |
174 | lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type); | 174 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type); |
175 | 175 | ||
176 | /** | 176 | /** |
177 | * Retrieves a preferences plist using an optional domain and/or key name. | 177 | * Retrieves a preferences plist using an optional domain and/or key name. |
@@ -183,7 +183,7 @@ lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type); | |||
183 | * | 183 | * |
184 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL | 184 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL |
185 | */ | 185 | */ |
186 | lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *domain, const char *key, plist_t *value); | 186 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *domain, const char *key, plist_t *value); |
187 | 187 | ||
188 | /** | 188 | /** |
189 | * Sets a preferences value using a plist and optional by domain and/or key name. | 189 | * Sets a preferences value using a plist and optional by domain and/or key name. |
@@ -196,7 +196,7 @@ lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *dom | |||
196 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client or | 196 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client or |
197 | * value is NULL | 197 | * value is NULL |
198 | */ | 198 | */ |
199 | lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value); | 199 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value); |
200 | 200 | ||
201 | /** | 201 | /** |
202 | * Removes a preference node by domain and/or key name. | 202 | * Removes a preference node by domain and/or key name. |
@@ -209,7 +209,7 @@ lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *dom | |||
209 | * | 209 | * |
210 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL | 210 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL |
211 | */ | 211 | */ |
212 | lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key); | 212 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key); |
213 | 213 | ||
214 | /** | 214 | /** |
215 | * Requests to start a service and retrieve it's port on success. | 215 | * Requests to start a service and retrieve it's port on success. |
@@ -223,7 +223,7 @@ lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char * | |||
223 | * by the device, LOCKDOWN_E_START_SERVICE_FAILED if the service could not be | 223 | * by the device, LOCKDOWN_E_START_SERVICE_FAILED if the service could not be |
224 | * started by the device | 224 | * started by the device |
225 | */ | 225 | */ |
226 | lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *identifier, lockdownd_service_descriptor_t *service); | 226 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *identifier, lockdownd_service_descriptor_t *service); |
227 | 227 | ||
228 | /** | 228 | /** |
229 | * Requests to start a service and retrieve it's port on success. | 229 | * Requests to start a service and retrieve it's port on success. |
@@ -239,7 +239,7 @@ lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char | |||
239 | * started by the device, LOCKDOWN_E_INVALID_CONF if the host id or escrow bag are | 239 | * started by the device, LOCKDOWN_E_INVALID_CONF if the host id or escrow bag are |
240 | * missing from the device record. | 240 | * missing from the device record. |
241 | */ | 241 | */ |
242 | lockdownd_error_t lockdownd_start_service_with_escrow_bag(lockdownd_client_t client, const char *identifier, lockdownd_service_descriptor_t *service); | 242 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_service_with_escrow_bag(lockdownd_client_t client, const char *identifier, lockdownd_service_descriptor_t *service); |
243 | 243 | ||
244 | /** | 244 | /** |
245 | * Opens a session with lockdownd and switches to SSL mode if device wants it. | 245 | * Opens a session with lockdownd and switches to SSL mode if device wants it. |
@@ -254,7 +254,7 @@ lockdownd_error_t lockdownd_start_service_with_escrow_bag(lockdownd_client_t cli | |||
254 | * LOCKDOWN_E_INVALID_HOST_ID if the device does not know the supplied HostID, | 254 | * LOCKDOWN_E_INVALID_HOST_ID if the device does not know the supplied HostID, |
255 | * LOCKDOWN_E_SSL_ERROR if enabling SSL communication failed | 255 | * LOCKDOWN_E_SSL_ERROR if enabling SSL communication failed |
256 | */ | 256 | */ |
257 | lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled); | 257 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled); |
258 | 258 | ||
259 | /** | 259 | /** |
260 | * Closes the lockdownd session by sending the StopSession request. | 260 | * Closes the lockdownd session by sending the StopSession request. |
@@ -266,7 +266,7 @@ lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char | |||
266 | * | 266 | * |
267 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL | 267 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL |
268 | */ | 268 | */ |
269 | lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id); | 269 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id); |
270 | 270 | ||
271 | /** | 271 | /** |
272 | * Sends a plist to lockdownd. | 272 | * Sends a plist to lockdownd. |
@@ -280,7 +280,7 @@ lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char * | |||
280 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client or | 280 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client or |
281 | * plist is NULL | 281 | * plist is NULL |
282 | */ | 282 | */ |
283 | lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist); | 283 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist); |
284 | 284 | ||
285 | /** | 285 | /** |
286 | * Receives a plist from lockdownd. | 286 | * Receives a plist from lockdownd. |
@@ -291,7 +291,7 @@ lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist); | |||
291 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client or | 291 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client or |
292 | * plist is NULL | 292 | * plist is NULL |
293 | */ | 293 | */ |
294 | lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist_t *plist); | 294 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist_t *plist); |
295 | 295 | ||
296 | /** | 296 | /** |
297 | * Pairs the device using the supplied pair record. | 297 | * Pairs the device using the supplied pair record. |
@@ -307,7 +307,7 @@ lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist_t *plist); | |||
307 | * LOCKDOWN_E_PASSWORD_PROTECTED if the device is password protected, | 307 | * LOCKDOWN_E_PASSWORD_PROTECTED if the device is password protected, |
308 | * LOCKDOWN_E_INVALID_HOST_ID if the device does not know the caller's host id | 308 | * LOCKDOWN_E_INVALID_HOST_ID if the device does not know the caller's host id |
309 | */ | 309 | */ |
310 | lockdownd_error_t lockdownd_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record); | 310 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record); |
311 | 311 | ||
312 | /** | 312 | /** |
313 | * Pairs the device using the supplied pair record and passing the given options. | 313 | * Pairs the device using the supplied pair record and passing the given options. |
@@ -326,7 +326,7 @@ lockdownd_error_t lockdownd_pair(lockdownd_client_t client, lockdownd_pair_recor | |||
326 | * LOCKDOWN_E_PASSWORD_PROTECTED if the device is password protected, | 326 | * LOCKDOWN_E_PASSWORD_PROTECTED if the device is password protected, |
327 | * LOCKDOWN_E_INVALID_HOST_ID if the device does not know the caller's host id | 327 | * LOCKDOWN_E_INVALID_HOST_ID if the device does not know the caller's host id |
328 | */ | 328 | */ |
329 | lockdownd_error_t lockdownd_pair_with_options(lockdownd_client_t client, lockdownd_pair_record_t pair_record, plist_t options, plist_t *response); | 329 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_pair_with_options(lockdownd_client_t client, lockdownd_pair_record_t pair_record, plist_t options, plist_t *response); |
330 | 330 | ||
331 | /** | 331 | /** |
332 | * Validates if the device is paired with the given HostID. If successful the | 332 | * Validates if the device is paired with the given HostID. If successful the |
@@ -345,7 +345,7 @@ lockdownd_error_t lockdownd_pair_with_options(lockdownd_client_t client, lockdow | |||
345 | * LOCKDOWN_E_PASSWORD_PROTECTED if the device is password protected, | 345 | * LOCKDOWN_E_PASSWORD_PROTECTED if the device is password protected, |
346 | * LOCKDOWN_E_INVALID_HOST_ID if the device does not know the caller's host id | 346 | * LOCKDOWN_E_INVALID_HOST_ID if the device does not know the caller's host id |
347 | */ | 347 | */ |
348 | lockdownd_error_t lockdownd_validate_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record); | 348 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_validate_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record); |
349 | 349 | ||
350 | /** | 350 | /** |
351 | * Unpairs the device with the given HostID and removes the pairing records | 351 | * Unpairs the device with the given HostID and removes the pairing records |
@@ -361,7 +361,7 @@ lockdownd_error_t lockdownd_validate_pair(lockdownd_client_t client, lockdownd_p | |||
361 | * LOCKDOWN_E_PASSWORD_PROTECTED if the device is password protected, | 361 | * LOCKDOWN_E_PASSWORD_PROTECTED if the device is password protected, |
362 | * LOCKDOWN_E_INVALID_HOST_ID if the device does not know the caller's host id | 362 | * LOCKDOWN_E_INVALID_HOST_ID if the device does not know the caller's host id |
363 | */ | 363 | */ |
364 | lockdownd_error_t lockdownd_unpair(lockdownd_client_t client, lockdownd_pair_record_t pair_record); | 364 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_unpair(lockdownd_client_t client, lockdownd_pair_record_t pair_record); |
365 | 365 | ||
366 | /** | 366 | /** |
367 | * Activates the device. Only works within an open session. | 367 | * Activates the device. Only works within an open session. |
@@ -378,7 +378,7 @@ lockdownd_error_t lockdownd_unpair(lockdownd_client_t client, lockdownd_pair_rec | |||
378 | * LOCKDOWN_E_INVALID_ACTIVATION_RECORD if the device reports that the | 378 | * LOCKDOWN_E_INVALID_ACTIVATION_RECORD if the device reports that the |
379 | * activation_record is invalid | 379 | * activation_record is invalid |
380 | */ | 380 | */ |
381 | lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activation_record); | 381 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activation_record); |
382 | 382 | ||
383 | /** | 383 | /** |
384 | * Deactivates the device, returning it to the locked “Activate with iTunes” | 384 | * Deactivates the device, returning it to the locked “Activate with iTunes” |
@@ -390,7 +390,7 @@ lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activati | |||
390 | * LOCKDOWN_E_NO_RUNNING_SESSION if no session is open, | 390 | * LOCKDOWN_E_NO_RUNNING_SESSION if no session is open, |
391 | * LOCKDOWN_E_PLIST_ERROR if the received plist is broken | 391 | * LOCKDOWN_E_PLIST_ERROR if the received plist is broken |
392 | */ | 392 | */ |
393 | lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client); | 393 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client); |
394 | 394 | ||
395 | /** | 395 | /** |
396 | * Tells the device to immediately enter recovery mode. | 396 | * Tells the device to immediately enter recovery mode. |
@@ -399,7 +399,7 @@ lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client); | |||
399 | * | 399 | * |
400 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL | 400 | * @return LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG when client is NULL |
401 | */ | 401 | */ |
402 | lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client); | 402 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client); |
403 | 403 | ||
404 | /** | 404 | /** |
405 | * Sends the Goodbye request to lockdownd signaling the end of communication. | 405 | * Sends the Goodbye request to lockdownd signaling the end of communication. |
@@ -410,7 +410,7 @@ lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client); | |||
410 | * is NULL, LOCKDOWN_E_PLIST_ERROR if the device did not acknowledge the | 410 | * is NULL, LOCKDOWN_E_PLIST_ERROR if the device did not acknowledge the |
411 | * request | 411 | * request |
412 | */ | 412 | */ |
413 | lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client); | 413 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client); |
414 | 414 | ||
415 | /** | 415 | /** |
416 | * Creates a CU pairing session for the current lockdown client. | 416 | * Creates a CU pairing session for the current lockdown client. |
@@ -439,7 +439,7 @@ lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client); | |||
439 | * parameters is invalid, LOCKDOWN_E_PAIRING_FAILED if the pairing failed, | 439 | * parameters is invalid, LOCKDOWN_E_PAIRING_FAILED if the pairing failed, |
440 | * or a LOCKDOWN_E_* error code otherwise. | 440 | * or a LOCKDOWN_E_* error code otherwise. |
441 | */ | 441 | */ |
442 | lockdownd_error_t lockdownd_cu_pairing_create(lockdownd_client_t client, lockdownd_cu_pairing_cb_t pairing_callback, void* cb_user_data, plist_t host_info, plist_t acl); | 442 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_cu_pairing_create(lockdownd_client_t client, lockdownd_cu_pairing_cb_t pairing_callback, void* cb_user_data, plist_t host_info, plist_t acl); |
443 | 443 | ||
444 | /** | 444 | /** |
445 | * Sends a request via lockdown client with established CU pairing session | 445 | * Sends a request via lockdown client with established CU pairing session |
@@ -459,7 +459,7 @@ lockdownd_error_t lockdownd_cu_pairing_create(lockdownd_client_t client, lockdow | |||
459 | * lockdown client does not have an established CU pairing session, | 459 | * lockdown client does not have an established CU pairing session, |
460 | * or a LOCKDOWN_E_* error code otherwise. | 460 | * or a LOCKDOWN_E_* error code otherwise. |
461 | */ | 461 | */ |
462 | lockdownd_error_t lockdownd_cu_send_request_and_get_reply(lockdownd_client_t client, const char* request, plist_t request_payload, plist_t* reply); | 462 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_cu_send_request_and_get_reply(lockdownd_client_t client, const char* request, plist_t request_payload, plist_t* reply); |
463 | 463 | ||
464 | /** | 464 | /** |
465 | * Retrieves a value using an optional domain and/or key name from a lockdown | 465 | * Retrieves a value using an optional domain and/or key name from a lockdown |
@@ -479,7 +479,7 @@ lockdownd_error_t lockdownd_cu_send_request_and_get_reply(lockdownd_client_t cli | |||
479 | * lockdown client does not have an established CU pairing session, | 479 | * lockdown client does not have an established CU pairing session, |
480 | * or a LOCKDOWN_E_* error code otherwise. | 480 | * or a LOCKDOWN_E_* error code otherwise. |
481 | */ | 481 | */ |
482 | lockdownd_error_t lockdownd_get_value_cu(lockdownd_client_t client, const char* domain, const char* key, plist_t* value); | 482 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_value_cu(lockdownd_client_t client, const char* domain, const char* key, plist_t* value); |
483 | 483 | ||
484 | /** | 484 | /** |
485 | * Perform a device pairing with a lockdown client that has an established | 485 | * Perform a device pairing with a lockdown client that has an established |
@@ -492,7 +492,7 @@ lockdownd_error_t lockdownd_get_value_cu(lockdownd_client_t client, const char* | |||
492 | * does not have an established CU pairing session, or a LOCKDOWN_E_* error | 492 | * does not have an established CU pairing session, or a LOCKDOWN_E_* error |
493 | * code otherwise. | 493 | * code otherwise. |
494 | */ | 494 | */ |
495 | lockdownd_error_t lockdownd_pair_cu(lockdownd_client_t client); | 495 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_pair_cu(lockdownd_client_t client); |
496 | 496 | ||
497 | 497 | ||
498 | /* Helper */ | 498 | /* Helper */ |
@@ -504,7 +504,7 @@ lockdownd_error_t lockdownd_pair_cu(lockdownd_client_t client); | |||
504 | * @param label The label to set or NULL to disable sending a label | 504 | * @param label The label to set or NULL to disable sending a label |
505 | * | 505 | * |
506 | */ | 506 | */ |
507 | void lockdownd_client_set_label(lockdownd_client_t client, const char *label); | 507 | LIBIMOBILEDEVICE_API void lockdownd_client_set_label(lockdownd_client_t client, const char *label); |
508 | 508 | ||
509 | /** | 509 | /** |
510 | * Returns the unique id of the device from lockdownd. | 510 | * Returns the unique id of the device from lockdownd. |
@@ -515,7 +515,7 @@ void lockdownd_client_set_label(lockdownd_client_t client, const char *label); | |||
515 | * | 515 | * |
516 | * @return LOCKDOWN_E_SUCCESS on success | 516 | * @return LOCKDOWN_E_SUCCESS on success |
517 | */ | 517 | */ |
518 | lockdownd_error_t lockdownd_get_device_udid(lockdownd_client_t client, char **udid); | 518 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_device_udid(lockdownd_client_t client, char **udid); |
519 | 519 | ||
520 | /** | 520 | /** |
521 | * Retrieves the name of the device from lockdownd set by the user. | 521 | * Retrieves the name of the device from lockdownd set by the user. |
@@ -526,7 +526,7 @@ lockdownd_error_t lockdownd_get_device_udid(lockdownd_client_t client, char **ud | |||
526 | * | 526 | * |
527 | * @return LOCKDOWN_E_SUCCESS on success | 527 | * @return LOCKDOWN_E_SUCCESS on success |
528 | */ | 528 | */ |
529 | lockdownd_error_t lockdownd_get_device_name(lockdownd_client_t client, char **device_name); | 529 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_device_name(lockdownd_client_t client, char **device_name); |
530 | 530 | ||
531 | /** | 531 | /** |
532 | * Calculates and returns the data classes the device supports from lockdownd. | 532 | * Calculates and returns the data classes the device supports from lockdownd. |
@@ -541,7 +541,7 @@ lockdownd_error_t lockdownd_get_device_name(lockdownd_client_t client, char **de | |||
541 | * LOCKDOWN_E_NO_RUNNING_SESSION if no session is open, | 541 | * LOCKDOWN_E_NO_RUNNING_SESSION if no session is open, |
542 | * LOCKDOWN_E_PLIST_ERROR if the received plist is broken | 542 | * LOCKDOWN_E_PLIST_ERROR if the received plist is broken |
543 | */ | 543 | */ |
544 | lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, char ***classes, int *count); | 544 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, char ***classes, int *count); |
545 | 545 | ||
546 | /** | 546 | /** |
547 | * Frees memory of an allocated array of data classes as returned by lockdownd_get_sync_data_classes() | 547 | * Frees memory of an allocated array of data classes as returned by lockdownd_get_sync_data_classes() |
@@ -550,7 +550,7 @@ lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, cha | |||
550 | * | 550 | * |
551 | * @return LOCKDOWN_E_SUCCESS on success | 551 | * @return LOCKDOWN_E_SUCCESS on success |
552 | */ | 552 | */ |
553 | lockdownd_error_t lockdownd_data_classes_free(char **classes); | 553 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_data_classes_free(char **classes); |
554 | 554 | ||
555 | /** | 555 | /** |
556 | * Frees memory of a service descriptor as returned by lockdownd_start_service() | 556 | * Frees memory of a service descriptor as returned by lockdownd_start_service() |
@@ -559,7 +559,7 @@ lockdownd_error_t lockdownd_data_classes_free(char **classes); | |||
559 | * | 559 | * |
560 | * @return LOCKDOWN_E_SUCCESS on success | 560 | * @return LOCKDOWN_E_SUCCESS on success |
561 | */ | 561 | */ |
562 | lockdownd_error_t lockdownd_service_descriptor_free(lockdownd_service_descriptor_t service); | 562 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_service_descriptor_free(lockdownd_service_descriptor_t service); |
563 | 563 | ||
564 | /** | 564 | /** |
565 | * Gets a readable error string for a given lockdown error code. | 565 | * Gets a readable error string for a given lockdown error code. |
@@ -568,7 +568,7 @@ lockdownd_error_t lockdownd_service_descriptor_free(lockdownd_service_descriptor | |||
568 | * | 568 | * |
569 | * @returns A readable error string | 569 | * @returns A readable error string |
570 | */ | 570 | */ |
571 | const char* lockdownd_strerror(lockdownd_error_t err); | 571 | LIBIMOBILEDEVICE_API const char* lockdownd_strerror(lockdownd_error_t err); |
572 | 572 | ||
573 | #ifdef __cplusplus | 573 | #ifdef __cplusplus |
574 | } | 574 | } |
diff --git a/include/libimobiledevice/misagent.h b/include/libimobiledevice/misagent.h index 394f5ce..7981a8b 100644 --- a/include/libimobiledevice/misagent.h +++ b/include/libimobiledevice/misagent.h | |||
@@ -60,7 +60,7 @@ typedef misagent_client_private *misagent_client_t; /**< The client handle. */ | |||
60 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when | 60 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when |
61 | * client is NULL, or an MISAGENT_E_* error code otherwise. | 61 | * client is NULL, or an MISAGENT_E_* error code otherwise. |
62 | */ | 62 | */ |
63 | misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client); | 63 | LIBIMOBILEDEVICE_API misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client); |
64 | 64 | ||
65 | /** | 65 | /** |
66 | * Starts a new misagent service on the specified device and connects to it. | 66 | * Starts a new misagent service on the specified device and connects to it. |
@@ -75,7 +75,7 @@ misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descrip | |||
75 | * @return MISAGENT_E_SUCCESS on success, or an MISAGENT_E_* error | 75 | * @return MISAGENT_E_SUCCESS on success, or an MISAGENT_E_* error |
76 | * code otherwise. | 76 | * code otherwise. |
77 | */ | 77 | */ |
78 | misagent_error_t misagent_client_start_service(idevice_t device, misagent_client_t* client, const char* label); | 78 | LIBIMOBILEDEVICE_API misagent_error_t misagent_client_start_service(idevice_t device, misagent_client_t* client, const char* label); |
79 | 79 | ||
80 | /** | 80 | /** |
81 | * Disconnects an misagent client from the device and frees up the | 81 | * Disconnects an misagent client from the device and frees up the |
@@ -86,7 +86,7 @@ misagent_error_t misagent_client_start_service(idevice_t device, misagent_client | |||
86 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when | 86 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when |
87 | * client is NULL, or an MISAGENT_E_* error code otherwise. | 87 | * client is NULL, or an MISAGENT_E_* error code otherwise. |
88 | */ | 88 | */ |
89 | misagent_error_t misagent_client_free(misagent_client_t client); | 89 | LIBIMOBILEDEVICE_API misagent_error_t misagent_client_free(misagent_client_t client); |
90 | 90 | ||
91 | 91 | ||
92 | /** | 92 | /** |
@@ -99,7 +99,7 @@ misagent_error_t misagent_client_free(misagent_client_t client); | |||
99 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when | 99 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when |
100 | * client is invalid, or an MISAGENT_E_* error code otherwise. | 100 | * client is invalid, or an MISAGENT_E_* error code otherwise. |
101 | */ | 101 | */ |
102 | misagent_error_t misagent_install(misagent_client_t client, plist_t profile); | 102 | LIBIMOBILEDEVICE_API misagent_error_t misagent_install(misagent_client_t client, plist_t profile); |
103 | 103 | ||
104 | /** | 104 | /** |
105 | * Retrieves all installed provisioning profiles (iOS 9.2.1 or below). | 105 | * Retrieves all installed provisioning profiles (iOS 9.2.1 or below). |
@@ -118,7 +118,7 @@ misagent_error_t misagent_install(misagent_client_t client, plist_t profile); | |||
118 | * still returns MISAGENT_E_SUCCESS and profiles will just point to an | 118 | * still returns MISAGENT_E_SUCCESS and profiles will just point to an |
119 | * empty array. | 119 | * empty array. |
120 | */ | 120 | */ |
121 | misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles); | 121 | LIBIMOBILEDEVICE_API misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles); |
122 | 122 | ||
123 | /** | 123 | /** |
124 | * Retrieves all installed provisioning profiles (iOS 9.3 or higher). | 124 | * Retrieves all installed provisioning profiles (iOS 9.3 or higher). |
@@ -137,7 +137,7 @@ misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles); | |||
137 | * still returns MISAGENT_E_SUCCESS and profiles will just point to an | 137 | * still returns MISAGENT_E_SUCCESS and profiles will just point to an |
138 | * empty array. | 138 | * empty array. |
139 | */ | 139 | */ |
140 | misagent_error_t misagent_copy_all(misagent_client_t client, plist_t* profiles); | 140 | LIBIMOBILEDEVICE_API misagent_error_t misagent_copy_all(misagent_client_t client, plist_t* profiles); |
141 | 141 | ||
142 | /** | 142 | /** |
143 | * Removes a given provisioning profile. | 143 | * Removes a given provisioning profile. |
@@ -150,7 +150,7 @@ misagent_error_t misagent_copy_all(misagent_client_t client, plist_t* profiles); | |||
150 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when | 150 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when |
151 | * client is invalid, or an MISAGENT_E_* error code otherwise. | 151 | * client is invalid, or an MISAGENT_E_* error code otherwise. |
152 | */ | 152 | */ |
153 | misagent_error_t misagent_remove(misagent_client_t client, const char* profileID); | 153 | LIBIMOBILEDEVICE_API misagent_error_t misagent_remove(misagent_client_t client, const char* profileID); |
154 | 154 | ||
155 | /** | 155 | /** |
156 | * Retrieves the status code from the last operation. | 156 | * Retrieves the status code from the last operation. |
@@ -159,7 +159,7 @@ misagent_error_t misagent_remove(misagent_client_t client, const char* profileID | |||
159 | * | 159 | * |
160 | * @return -1 if client is invalid, or the status code from the last operation | 160 | * @return -1 if client is invalid, or the status code from the last operation |
161 | */ | 161 | */ |
162 | int misagent_get_status_code(misagent_client_t client); | 162 | LIBIMOBILEDEVICE_API int misagent_get_status_code(misagent_client_t client); |
163 | 163 | ||
164 | #ifdef __cplusplus | 164 | #ifdef __cplusplus |
165 | } | 165 | } |
diff --git a/include/libimobiledevice/mobile_image_mounter.h b/include/libimobiledevice/mobile_image_mounter.h index 891df40..d4fc3f4 100644 --- a/include/libimobiledevice/mobile_image_mounter.h +++ b/include/libimobiledevice/mobile_image_mounter.h | |||
@@ -66,7 +66,7 @@ typedef ssize_t (*mobile_image_mounter_upload_cb_t) (void* buffer, size_t length | |||
66 | * or MOBILE_IMAGE_MOUNTER_E_CONN_FAILED if the connection to the | 66 | * or MOBILE_IMAGE_MOUNTER_E_CONN_FAILED if the connection to the |
67 | * device could not be established. | 67 | * device could not be established. |
68 | */ | 68 | */ |
69 | mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdownd_service_descriptor_t service, mobile_image_mounter_client_t *client); | 69 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdownd_service_descriptor_t service, mobile_image_mounter_client_t *client); |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * Starts a new mobile_image_mounter service on the specified device and connects to it. | 72 | * Starts a new mobile_image_mounter service on the specified device and connects to it. |
@@ -81,7 +81,7 @@ mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdown | |||
81 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an MOBILE_IMAGE_MOUNTER_E_* error | 81 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an MOBILE_IMAGE_MOUNTER_E_* error |
82 | * code otherwise. | 82 | * code otherwise. |
83 | */ | 83 | */ |
84 | mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t* client, const char* label); | 84 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t* client, const char* label); |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * Disconnects a mobile_image_mounter client from the device and frees up the | 87 | * Disconnects a mobile_image_mounter client from the device and frees up the |
@@ -92,7 +92,7 @@ mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device | |||
92 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, | 92 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, |
93 | * or MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is NULL. | 93 | * or MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is NULL. |
94 | */ | 94 | */ |
95 | mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client); | 95 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client); |
96 | 96 | ||
97 | 97 | ||
98 | /** | 98 | /** |
@@ -108,7 +108,7 @@ mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_clie | |||
108 | * | 108 | * |
109 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an error code on error | 109 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an error code on error |
110 | */ | 110 | */ |
111 | mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result); | 111 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result); |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * Uploads an image with an optional signature to the device. | 114 | * Uploads an image with an optional signature to the device. |
@@ -127,7 +127,7 @@ mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_moun | |||
127 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on succes, or a | 127 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on succes, or a |
128 | * MOBILE_IMAGE_MOUNTER_E_* error code otherwise. | 128 | * MOBILE_IMAGE_MOUNTER_E_* error code otherwise. |
129 | */ | 129 | */ |
130 | mobile_image_mounter_error_t mobile_image_mounter_upload_image(mobile_image_mounter_client_t client, const char *image_type, size_t image_size, const char *signature, uint16_t signature_size, mobile_image_mounter_upload_cb_t upload_cb, void* userdata); | 130 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_upload_image(mobile_image_mounter_client_t client, const char *image_type, size_t image_size, const char *signature, uint16_t signature_size, mobile_image_mounter_upload_cb_t upload_cb, void* userdata); |
131 | 131 | ||
132 | /** | 132 | /** |
133 | * Mounts an image on the device. | 133 | * Mounts an image on the device. |
@@ -150,7 +150,7 @@ mobile_image_mounter_error_t mobile_image_mounter_upload_image(mobile_image_moun | |||
150 | * MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if on ore more parameters are | 150 | * MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if on ore more parameters are |
151 | * invalid, or another error code otherwise. | 151 | * invalid, or another error code otherwise. |
152 | */ | 152 | */ |
153 | mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mounter_client_t client, const char *image_path, const char *signature, uint16_t signature_size, const char *image_type, plist_t *result); | 153 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mounter_client_t client, const char *image_path, const char *signature, uint16_t signature_size, const char *image_type, plist_t *result); |
154 | 154 | ||
155 | /** | 155 | /** |
156 | * Hangs up the connection to the mobile_image_mounter service. | 156 | * Hangs up the connection to the mobile_image_mounter service. |
@@ -163,7 +163,7 @@ mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mount | |||
163 | * MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is invalid, | 163 | * MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is invalid, |
164 | * or another error code otherwise. | 164 | * or another error code otherwise. |
165 | */ | 165 | */ |
166 | mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client); | 166 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client); |
167 | 167 | ||
168 | #ifdef __cplusplus | 168 | #ifdef __cplusplus |
169 | } | 169 | } |
diff --git a/include/libimobiledevice/mobileactivation.h b/include/libimobiledevice/mobileactivation.h index 774c116..8e036a8 100644 --- a/include/libimobiledevice/mobileactivation.h +++ b/include/libimobiledevice/mobileactivation.h | |||
@@ -59,7 +59,7 @@ typedef mobileactivation_client_private *mobileactivation_client_t; /**< The cli | |||
59 | * MOBILEACTIVATION_E_INVALID_ARG when one of the parameters is invalid, | 59 | * MOBILEACTIVATION_E_INVALID_ARG when one of the parameters is invalid, |
60 | * or MOBILEACTIVATION_E_MUX_ERROR when the connection failed. | 60 | * or MOBILEACTIVATION_E_MUX_ERROR when the connection failed. |
61 | */ | 61 | */ |
62 | mobileactivation_error_t mobileactivation_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobileactivation_client_t *client); | 62 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobileactivation_client_t *client); |
63 | 63 | ||
64 | /** | 64 | /** |
65 | * Starts a new mobileactivation service on the specified device and connects to it. | 65 | * Starts a new mobileactivation service on the specified device and connects to it. |
@@ -74,7 +74,7 @@ mobileactivation_error_t mobileactivation_client_new(idevice_t device, lockdownd | |||
74 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* | 74 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* |
75 | * error code otherwise. | 75 | * error code otherwise. |
76 | */ | 76 | */ |
77 | mobileactivation_error_t mobileactivation_client_start_service(idevice_t device, mobileactivation_client_t* client, const char* label); | 77 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_client_start_service(idevice_t device, mobileactivation_client_t* client, const char* label); |
78 | 78 | ||
79 | /** | 79 | /** |
80 | * Disconnects a mobileactivation client from the device and frees up the | 80 | * Disconnects a mobileactivation client from the device and frees up the |
@@ -87,7 +87,7 @@ mobileactivation_error_t mobileactivation_client_start_service(idevice_t device, | |||
87 | * is invalid, or MOBILEACTIVATION_E_UNKNOWN_ERROR when the was an | 87 | * is invalid, or MOBILEACTIVATION_E_UNKNOWN_ERROR when the was an |
88 | * error freeing the parent property_list_service client. | 88 | * error freeing the parent property_list_service client. |
89 | */ | 89 | */ |
90 | mobileactivation_error_t mobileactivation_client_free(mobileactivation_client_t client); | 90 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_client_free(mobileactivation_client_t client); |
91 | 91 | ||
92 | 92 | ||
93 | /** | 93 | /** |
@@ -102,7 +102,7 @@ mobileactivation_error_t mobileactivation_client_free(mobileactivation_client_t | |||
102 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* | 102 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* |
103 | * error code otherwise. | 103 | * error code otherwise. |
104 | */ | 104 | */ |
105 | mobileactivation_error_t mobileactivation_get_activation_state(mobileactivation_client_t client, plist_t *state); | 105 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_get_activation_state(mobileactivation_client_t client, plist_t *state); |
106 | 106 | ||
107 | /** | 107 | /** |
108 | * Retrieves a session blob required for 'drmHandshake' via albert.apple.com. | 108 | * Retrieves a session blob required for 'drmHandshake' via albert.apple.com. |
@@ -116,7 +116,7 @@ mobileactivation_error_t mobileactivation_get_activation_state(mobileactivation_ | |||
116 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* | 116 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* |
117 | * error code otherwise. | 117 | * error code otherwise. |
118 | */ | 118 | */ |
119 | mobileactivation_error_t mobileactivation_create_activation_session_info(mobileactivation_client_t client, plist_t *blob); | 119 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation_session_info(mobileactivation_client_t client, plist_t *blob); |
120 | 120 | ||
121 | /** | 121 | /** |
122 | * Retrieves the activation info required for device activation. | 122 | * Retrieves the activation info required for device activation. |
@@ -130,7 +130,7 @@ mobileactivation_error_t mobileactivation_create_activation_session_info(mobilea | |||
130 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* | 130 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* |
131 | * error code otherwise. | 131 | * error code otherwise. |
132 | */ | 132 | */ |
133 | mobileactivation_error_t mobileactivation_create_activation_info(mobileactivation_client_t client, plist_t *info); | 133 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation_info(mobileactivation_client_t client, plist_t *info); |
134 | 134 | ||
135 | /** | 135 | /** |
136 | * Retrieves the activation info required for device activation in 'session' | 136 | * Retrieves the activation info required for device activation in 'session' |
@@ -148,7 +148,7 @@ mobileactivation_error_t mobileactivation_create_activation_info(mobileactivatio | |||
148 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* | 148 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* |
149 | * error code otherwise. | 149 | * error code otherwise. |
150 | */ | 150 | */ |
151 | mobileactivation_error_t mobileactivation_create_activation_info_with_session(mobileactivation_client_t client, plist_t handshake_response, plist_t *info); | 151 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation_info_with_session(mobileactivation_client_t client, plist_t handshake_response, plist_t *info); |
152 | 152 | ||
153 | /** | 153 | /** |
154 | * Activates the device with the given activation record. | 154 | * Activates the device with the given activation record. |
@@ -161,7 +161,7 @@ mobileactivation_error_t mobileactivation_create_activation_info_with_session(mo | |||
161 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* | 161 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* |
162 | * error code otherwise. | 162 | * error code otherwise. |
163 | */ | 163 | */ |
164 | mobileactivation_error_t mobileactivation_activate(mobileactivation_client_t client, plist_t activation_record); | 164 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_activate(mobileactivation_client_t client, plist_t activation_record); |
165 | 165 | ||
166 | /** | 166 | /** |
167 | * Activates the device with the given activation record in 'session' mode. | 167 | * Activates the device with the given activation record in 'session' mode. |
@@ -176,14 +176,14 @@ mobileactivation_error_t mobileactivation_activate(mobileactivation_client_t cli | |||
176 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* | 176 | * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_* |
177 | * error code otherwise. | 177 | * error code otherwise. |
178 | */ | 178 | */ |
179 | mobileactivation_error_t mobileactivation_activate_with_session(mobileactivation_client_t client, plist_t activation_record, plist_t headers); | 179 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_activate_with_session(mobileactivation_client_t client, plist_t activation_record, plist_t headers); |
180 | 180 | ||
181 | /** | 181 | /** |
182 | * Deactivates the device. | 182 | * Deactivates the device. |
183 | * | 183 | * |
184 | * @param client The mobileactivation client | 184 | * @param client The mobileactivation client |
185 | */ | 185 | */ |
186 | mobileactivation_error_t mobileactivation_deactivate(mobileactivation_client_t client); | 186 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_deactivate(mobileactivation_client_t client); |
187 | 187 | ||
188 | #ifdef __cplusplus | 188 | #ifdef __cplusplus |
189 | } | 189 | } |
diff --git a/include/libimobiledevice/mobilebackup.h b/include/libimobiledevice/mobilebackup.h index d4c042e..2ecb60c 100644 --- a/include/libimobiledevice/mobilebackup.h +++ b/include/libimobiledevice/mobilebackup.h | |||
@@ -69,7 +69,7 @@ typedef enum { | |||
69 | * or more parameters are invalid, or DEVICE_LINK_SERVICE_E_BAD_VERSION if | 69 | * or more parameters are invalid, or DEVICE_LINK_SERVICE_E_BAD_VERSION if |
70 | * the mobilebackup version on the device is newer. | 70 | * the mobilebackup version on the device is newer. |
71 | */ | 71 | */ |
72 | mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup_client_t * client); | 72 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup_client_t * client); |
73 | 73 | ||
74 | /** | 74 | /** |
75 | * Starts a new mobilebackup service on the specified device and connects to it. | 75 | * Starts a new mobilebackup service on the specified device and connects to it. |
@@ -84,7 +84,7 @@ mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service | |||
84 | * @return MOBILEBACKUP_E_SUCCESS on success, or an MOBILEBACKUP_E_* error | 84 | * @return MOBILEBACKUP_E_SUCCESS on success, or an MOBILEBACKUP_E_* error |
85 | * code otherwise. | 85 | * code otherwise. |
86 | */ | 86 | */ |
87 | mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobilebackup_client_t* client, const char* label); | 87 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobilebackup_client_t* client, const char* label); |
88 | 88 | ||
89 | /** | 89 | /** |
90 | * Disconnects a mobilebackup client from the device and frees up the | 90 | * Disconnects a mobilebackup client from the device and frees up the |
@@ -95,7 +95,7 @@ mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobileb | |||
95 | * @return MOBILEBACKUP_E_SUCCESS on success, or MOBILEBACKUP_E_INVALID_ARG | 95 | * @return MOBILEBACKUP_E_SUCCESS on success, or MOBILEBACKUP_E_INVALID_ARG |
96 | * if client is NULL. | 96 | * if client is NULL. |
97 | */ | 97 | */ |
98 | mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client); | 98 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client); |
99 | 99 | ||
100 | 100 | ||
101 | /** | 101 | /** |
@@ -106,7 +106,7 @@ mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client); | |||
106 | * | 106 | * |
107 | * @return an error code | 107 | * @return an error code |
108 | */ | 108 | */ |
109 | mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t *plist); | 109 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t *plist); |
110 | 110 | ||
111 | /** | 111 | /** |
112 | * Sends mobilebackup data to the device | 112 | * Sends mobilebackup data to the device |
@@ -119,7 +119,7 @@ mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t | |||
119 | * | 119 | * |
120 | * @return an error code | 120 | * @return an error code |
121 | */ | 121 | */ |
122 | mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist); | 122 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist); |
123 | 123 | ||
124 | /** | 124 | /** |
125 | * Request a backup from the connected device. | 125 | * Request a backup from the connected device. |
@@ -138,7 +138,7 @@ mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t pli | |||
138 | * backup_manifest is not of type PLIST_DICT, MOBILEBACKUP_E_MUX_ERROR | 138 | * backup_manifest is not of type PLIST_DICT, MOBILEBACKUP_E_MUX_ERROR |
139 | * if a communication error occurs, MOBILEBACKUP_E_REPLY_NOT_OK | 139 | * if a communication error occurs, MOBILEBACKUP_E_REPLY_NOT_OK |
140 | */ | 140 | */ |
141 | mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, plist_t backup_manifest, const char *base_path, const char *proto_version); | 141 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, plist_t backup_manifest, const char *base_path, const char *proto_version); |
142 | 142 | ||
143 | /** | 143 | /** |
144 | * Sends a confirmation to the device that a backup file has been received. | 144 | * Sends a confirmation to the device that a backup file has been received. |
@@ -149,7 +149,7 @@ mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, p | |||
149 | * client is invalid, or MOBILEBACKUP_E_MUX_ERROR if a communication error | 149 | * client is invalid, or MOBILEBACKUP_E_MUX_ERROR if a communication error |
150 | * occurs. | 150 | * occurs. |
151 | */ | 151 | */ |
152 | mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_t client); | 152 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_t client); |
153 | 153 | ||
154 | /** | 154 | /** |
155 | * Request that a backup should be restored to the connected device. | 155 | * Request that a backup should be restored to the connected device. |
@@ -172,7 +172,7 @@ mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_ | |||
172 | * if a communication error occurs, or MOBILEBACKUP_E_REPLY_NOT_OK | 172 | * if a communication error occurs, or MOBILEBACKUP_E_REPLY_NOT_OK |
173 | * if the device did not accept the request. | 173 | * if the device did not accept the request. |
174 | */ | 174 | */ |
175 | mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, plist_t backup_manifest, mobilebackup_flags_t flags, const char *proto_version); | 175 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, plist_t backup_manifest, mobilebackup_flags_t flags, const char *proto_version); |
176 | 176 | ||
177 | /** | 177 | /** |
178 | * Receive a confirmation from the device that it successfully received | 178 | * Receive a confirmation from the device that it successfully received |
@@ -192,7 +192,7 @@ mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, | |||
192 | * message plist, or MOBILEBACKUP_E_MUX_ERROR if a communication error | 192 | * message plist, or MOBILEBACKUP_E_MUX_ERROR if a communication error |
193 | * occurs. | 193 | * occurs. |
194 | */ | 194 | */ |
195 | mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_client_t client, plist_t *result); | 195 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_client_t client, plist_t *result); |
196 | 196 | ||
197 | /** | 197 | /** |
198 | * Receive a confirmation from the device that it successfully received | 198 | * Receive a confirmation from the device that it successfully received |
@@ -212,7 +212,7 @@ mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_cli | |||
212 | * message plist, or MOBILEBACKUP_E_MUX_ERROR if a communication error | 212 | * message plist, or MOBILEBACKUP_E_MUX_ERROR if a communication error |
213 | * occurs. | 213 | * occurs. |
214 | */ | 214 | */ |
215 | mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebackup_client_t client, plist_t *result); | 215 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebackup_client_t client, plist_t *result); |
216 | 216 | ||
217 | /** | 217 | /** |
218 | * Tells the device that the restore process is complete and waits for the | 218 | * Tells the device that the restore process is complete and waits for the |
@@ -225,7 +225,7 @@ mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebac | |||
225 | * message plist is invalid, or MOBILEBACKUP_E_MUX_ERROR if a communication | 225 | * message plist is invalid, or MOBILEBACKUP_E_MUX_ERROR if a communication |
226 | * error occurs. | 226 | * error occurs. |
227 | */ | 227 | */ |
228 | mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t client); | 228 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t client); |
229 | 229 | ||
230 | /** | 230 | /** |
231 | * Sends a backup error message to the device. | 231 | * Sends a backup error message to the device. |
@@ -237,7 +237,7 @@ mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t cl | |||
237 | * one of the parameters is invalid, or MOBILEBACKUP_E_MUX_ERROR if a | 237 | * one of the parameters is invalid, or MOBILEBACKUP_E_MUX_ERROR if a |
238 | * communication error occurs. | 238 | * communication error occurs. |
239 | */ | 239 | */ |
240 | mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const char *reason); | 240 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const char *reason); |
241 | 241 | ||
242 | #ifdef __cplusplus | 242 | #ifdef __cplusplus |
243 | } | 243 | } |
diff --git a/include/libimobiledevice/mobilebackup2.h b/include/libimobiledevice/mobilebackup2.h index 1af4141..2e9222d 100644 --- a/include/libimobiledevice/mobilebackup2.h +++ b/include/libimobiledevice/mobilebackup2.h | |||
@@ -64,7 +64,7 @@ typedef mobilebackup2_client_private *mobilebackup2_client_t; /**< The client ha | |||
64 | * if one or more parameter is invalid, or MOBILEBACKUP2_E_BAD_VERSION | 64 | * if one or more parameter is invalid, or MOBILEBACKUP2_E_BAD_VERSION |
65 | * if the mobilebackup2 version on the device is newer. | 65 | * if the mobilebackup2 version on the device is newer. |
66 | */ | 66 | */ |
67 | mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup2_client_t * client); | 67 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup2_client_t * client); |
68 | 68 | ||
69 | /** | 69 | /** |
70 | * Starts a new mobilebackup2 service on the specified device and connects to it. | 70 | * Starts a new mobilebackup2 service on the specified device and connects to it. |
@@ -79,7 +79,7 @@ mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_servi | |||
79 | * @return MOBILEBACKUP2_E_SUCCESS on success, or an MOBILEBACKUP2_E_* error | 79 | * @return MOBILEBACKUP2_E_SUCCESS on success, or an MOBILEBACKUP2_E_* error |
80 | * code otherwise. | 80 | * code otherwise. |
81 | */ | 81 | */ |
82 | mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t* client, const char* label); | 82 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t* client, const char* label); |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * Disconnects a mobilebackup2 client from the device and frees up the | 85 | * Disconnects a mobilebackup2 client from the device and frees up the |
@@ -90,7 +90,7 @@ mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobil | |||
90 | * @return MOBILEBACKUP2_E_SUCCESS on success, or MOBILEBACKUP2_E_INVALID_ARG | 90 | * @return MOBILEBACKUP2_E_SUCCESS on success, or MOBILEBACKUP2_E_INVALID_ARG |
91 | * if client is NULL. | 91 | * if client is NULL. |
92 | */ | 92 | */ |
93 | mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client); | 93 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client); |
94 | 94 | ||
95 | 95 | ||
96 | /** | 96 | /** |
@@ -105,7 +105,7 @@ mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client); | |||
105 | * will be inserted into this plist before sending it. This parameter | 105 | * will be inserted into this plist before sending it. This parameter |
106 | * can be NULL if message is not NULL. | 106 | * can be NULL if message is not NULL. |
107 | */ | 107 | */ |
108 | mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options); | 108 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options); |
109 | 109 | ||
110 | /** | 110 | /** |
111 | * Receives a DL* message plist from the device. | 111 | * Receives a DL* message plist from the device. |
@@ -125,7 +125,7 @@ mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, | |||
125 | * or is not a DL* message plist, or MOBILEBACKUP2_E_MUX_ERROR if | 125 | * or is not a DL* message plist, or MOBILEBACKUP2_E_MUX_ERROR if |
126 | * receiving from the device failed. | 126 | * receiving from the device failed. |
127 | */ | 127 | */ |
128 | mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage); | 128 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage); |
129 | 129 | ||
130 | /** | 130 | /** |
131 | * Send binary data to the device. | 131 | * Send binary data to the device. |
@@ -143,7 +143,7 @@ mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t clien | |||
143 | * MOBILEBACKUP2_E_INVALID_ARG if one of the parameters is invalid, | 143 | * MOBILEBACKUP2_E_INVALID_ARG if one of the parameters is invalid, |
144 | * or MOBILEBACKUP2_E_MUX_ERROR if sending of the data failed. | 144 | * or MOBILEBACKUP2_E_MUX_ERROR if sending of the data failed. |
145 | */ | 145 | */ |
146 | mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes); | 146 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes); |
147 | 147 | ||
148 | /** | 148 | /** |
149 | * Receive binary from the device. | 149 | * Receive binary from the device. |
@@ -163,7 +163,7 @@ mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, cons | |||
163 | * MOBILEBACKUP2_E_INVALID_ARG if one of the parameters is invalid, | 163 | * MOBILEBACKUP2_E_INVALID_ARG if one of the parameters is invalid, |
164 | * or MOBILEBACKUP2_E_MUX_ERROR if receiving the data failed. | 164 | * or MOBILEBACKUP2_E_MUX_ERROR if receiving the data failed. |
165 | */ | 165 | */ |
166 | mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes); | 166 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes); |
167 | 167 | ||
168 | /** | 168 | /** |
169 | * Performs the mobilebackup2 protocol version exchange. | 169 | * Performs the mobilebackup2 protocol version exchange. |
@@ -176,7 +176,7 @@ mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, c | |||
176 | * @return MOBILEBACKUP2_E_SUCCESS on success, or a MOBILEBACKUP2_E_* error | 176 | * @return MOBILEBACKUP2_E_SUCCESS on success, or a MOBILEBACKUP2_E_* error |
177 | * code otherwise. | 177 | * code otherwise. |
178 | */ | 178 | */ |
179 | mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client, double local_versions[], char count, double *remote_version); | 179 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client, double local_versions[], char count, double *remote_version); |
180 | 180 | ||
181 | /** | 181 | /** |
182 | * Send a request to the connected mobilebackup2 service. | 182 | * Send a request to the connected mobilebackup2 service. |
@@ -191,7 +191,7 @@ mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t clie | |||
191 | * @return MOBILEBACKUP2_E_SUCCESS if the request was successfully sent, | 191 | * @return MOBILEBACKUP2_E_SUCCESS if the request was successfully sent, |
192 | * or a MOBILEBACKUP2_E_* error value otherwise. | 192 | * or a MOBILEBACKUP2_E_* error value otherwise. |
193 | */ | 193 | */ |
194 | mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options); | 194 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options); |
195 | 195 | ||
196 | /** | 196 | /** |
197 | * Sends a DLMessageStatusResponse to the device. | 197 | * Sends a DLMessageStatusResponse to the device. |
@@ -205,7 +205,7 @@ mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, | |||
205 | * @return MOBILEBACKUP2_E_SUCCESS on success, MOBILEBACKUP2_E_INVALID_ARG | 205 | * @return MOBILEBACKUP2_E_SUCCESS on success, MOBILEBACKUP2_E_INVALID_ARG |
206 | * if client is invalid, or another MOBILEBACKUP2_E_* otherwise. | 206 | * if client is invalid, or another MOBILEBACKUP2_E_* otherwise. |
207 | */ | 207 | */ |
208 | mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2); | 208 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2); |
209 | 209 | ||
210 | #ifdef __cplusplus | 210 | #ifdef __cplusplus |
211 | } | 211 | } |
diff --git a/include/libimobiledevice/mobilesync.h b/include/libimobiledevice/mobilesync.h index 6b1af18..c3bc53d 100644 --- a/include/libimobiledevice/mobilesync.h +++ b/include/libimobiledevice/mobilesync.h | |||
@@ -86,7 +86,7 @@ typedef mobilesync_anchors *mobilesync_anchors_t; | |||
86 | * @retval DEVICE_LINK_SERVICE_E_BAD_VERSION if the mobilesync version on | 86 | * @retval DEVICE_LINK_SERVICE_E_BAD_VERSION if the mobilesync version on |
87 | * the device is newer. | 87 | * the device is newer. |
88 | */ | 88 | */ |
89 | mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilesync_client_t * client); | 89 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilesync_client_t * client); |
90 | 90 | ||
91 | /** | 91 | /** |
92 | * Starts a new mobilesync service on the specified device and connects to it. | 92 | * Starts a new mobilesync service on the specified device and connects to it. |
@@ -101,7 +101,7 @@ mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_des | |||
101 | * @return MOBILESYNC_E_SUCCESS on success, or an MOBILESYNC_E_* error | 101 | * @return MOBILESYNC_E_SUCCESS on success, or an MOBILESYNC_E_* error |
102 | * code otherwise. | 102 | * code otherwise. |
103 | */ | 103 | */ |
104 | mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t* client, const char* label); | 104 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t* client, const char* label); |
105 | 105 | ||
106 | /** | 106 | /** |
107 | * Disconnects a mobilesync client from the device and frees up the | 107 | * Disconnects a mobilesync client from the device and frees up the |
@@ -112,7 +112,7 @@ mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_ | |||
112 | * @retval MOBILESYNC_E_SUCCESS on success | 112 | * @retval MOBILESYNC_E_SUCCESS on success |
113 | * @retval MOBILESYNC_E_INVALID_ARG if \a client is NULL. | 113 | * @retval MOBILESYNC_E_INVALID_ARG if \a client is NULL. |
114 | */ | 114 | */ |
115 | mobilesync_error_t mobilesync_client_free(mobilesync_client_t client); | 115 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_free(mobilesync_client_t client); |
116 | 116 | ||
117 | 117 | ||
118 | /** | 118 | /** |
@@ -123,7 +123,7 @@ mobilesync_error_t mobilesync_client_free(mobilesync_client_t client); | |||
123 | * | 123 | * |
124 | * @return an error code | 124 | * @return an error code |
125 | */ | 125 | */ |
126 | mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist); | 126 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist); |
127 | 127 | ||
128 | /** | 128 | /** |
129 | * Sends mobilesync data to the device | 129 | * Sends mobilesync data to the device |
@@ -136,7 +136,7 @@ mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist | |||
136 | * | 136 | * |
137 | * @return an error code | 137 | * @return an error code |
138 | */ | 138 | */ |
139 | mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist); | 139 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist); |
140 | 140 | ||
141 | 141 | ||
142 | /** | 142 | /** |
@@ -159,7 +159,7 @@ mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist); | |||
159 | * @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the | 159 | * @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the |
160 | * sync request | 160 | * sync request |
161 | */ | 161 | */ |
162 | mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data_class, mobilesync_anchors_t anchors, uint64_t computer_data_class_version, mobilesync_sync_type_t *sync_type, uint64_t *device_data_class_version, char** error_description); | 162 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data_class, mobilesync_anchors_t anchors, uint64_t computer_data_class_version, mobilesync_sync_type_t *sync_type, uint64_t *device_data_class_version, char** error_description); |
163 | 163 | ||
164 | /** | 164 | /** |
165 | * Cancels a running synchronization session with a device at any time. | 165 | * Cancels a running synchronization session with a device at any time. |
@@ -170,7 +170,7 @@ mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data | |||
170 | * @retval MOBILESYNC_E_SUCCESS on success | 170 | * @retval MOBILESYNC_E_SUCCESS on success |
171 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid | 171 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid |
172 | */ | 172 | */ |
173 | mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason); | 173 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason); |
174 | 174 | ||
175 | /** | 175 | /** |
176 | * Finish a synchronization session of a data class on the device. | 176 | * Finish a synchronization session of a data class on the device. |
@@ -183,7 +183,7 @@ mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* rea | |||
183 | * @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid | 183 | * @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid |
184 | * form | 184 | * form |
185 | */ | 185 | */ |
186 | mobilesync_error_t mobilesync_finish(mobilesync_client_t client); | 186 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_finish(mobilesync_client_t client); |
187 | 187 | ||
188 | 188 | ||
189 | /** | 189 | /** |
@@ -196,7 +196,7 @@ mobilesync_error_t mobilesync_finish(mobilesync_client_t client); | |||
196 | * @retval MOBILESYNC_E_SUCCESS on success | 196 | * @retval MOBILESYNC_E_SUCCESS on success |
197 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid | 197 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid |
198 | */ | 198 | */ |
199 | mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client); | 199 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client); |
200 | 200 | ||
201 | /** | 201 | /** |
202 | * Requests to receive only changed records of the currently set data class from the device. | 202 | * Requests to receive only changed records of the currently set data class from the device. |
@@ -208,7 +208,7 @@ mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t cl | |||
208 | * @retval MOBILESYNC_E_SUCCESS on success | 208 | * @retval MOBILESYNC_E_SUCCESS on success |
209 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid | 209 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid |
210 | */ | 210 | */ |
211 | mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client); | 211 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client); |
212 | 212 | ||
213 | /** | 213 | /** |
214 | * Requests the device to delete all records of the current data class | 214 | * Requests the device to delete all records of the current data class |
@@ -221,7 +221,7 @@ mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client | |||
221 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid | 221 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid |
222 | * @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid form | 222 | * @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid form |
223 | */ | 223 | */ |
224 | mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client); | 224 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client); |
225 | 225 | ||
226 | 226 | ||
227 | /** | 227 | /** |
@@ -237,7 +237,7 @@ mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t cl | |||
237 | * @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the | 237 | * @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the |
238 | * session | 238 | * session |
239 | */ | 239 | */ |
240 | mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions); | 240 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions); |
241 | 241 | ||
242 | /** | 242 | /** |
243 | * Acknowledges to the device that the changes have been merged on the computer | 243 | * Acknowledges to the device that the changes have been merged on the computer |
@@ -247,7 +247,7 @@ mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_ | |||
247 | * @retval MOBILESYNC_E_SUCCESS on success | 247 | * @retval MOBILESYNC_E_SUCCESS on success |
248 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid | 248 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid |
249 | */ | 249 | */ |
250 | mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client); | 250 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client); |
251 | 251 | ||
252 | 252 | ||
253 | /** | 253 | /** |
@@ -267,7 +267,7 @@ mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_ | |||
267 | * @retval MOBILESYNC_E_NOT_READY if the device is not ready to start | 267 | * @retval MOBILESYNC_E_NOT_READY if the device is not ready to start |
268 | * receiving any changes | 268 | * receiving any changes |
269 | */ | 269 | */ |
270 | mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client); | 270 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client); |
271 | 271 | ||
272 | 272 | ||
273 | /** | 273 | /** |
@@ -284,7 +284,7 @@ mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_cli | |||
284 | * @retval MOBILESYNC_E_WRONG_DIRECTION if the current sync direction does | 284 | * @retval MOBILESYNC_E_WRONG_DIRECTION if the current sync direction does |
285 | * not permit this call | 285 | * not permit this call |
286 | */ | 286 | */ |
287 | mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions); | 287 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions); |
288 | 288 | ||
289 | /** | 289 | /** |
290 | * Receives any remapped identifiers reported after the device merged submitted changes. | 290 | * Receives any remapped identifiers reported after the device merged submitted changes. |
@@ -301,7 +301,7 @@ mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t e | |||
301 | * @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the | 301 | * @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the |
302 | * session | 302 | * session |
303 | */ | 303 | */ |
304 | mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping); | 304 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping); |
305 | 305 | ||
306 | /* Helper */ | 306 | /* Helper */ |
307 | 307 | ||
@@ -314,14 +314,14 @@ mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plis | |||
314 | * | 314 | * |
315 | * @return A new #mobilesync_anchors_t struct. Must be freed using mobilesync_anchors_free(). | 315 | * @return A new #mobilesync_anchors_t struct. Must be freed using mobilesync_anchors_free(). |
316 | */ | 316 | */ |
317 | mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor); | 317 | LIBIMOBILEDEVICE_API mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor); |
318 | 318 | ||
319 | /** | 319 | /** |
320 | * Free memory used by anchors. | 320 | * Free memory used by anchors. |
321 | * | 321 | * |
322 | * @param anchors The anchors to free. | 322 | * @param anchors The anchors to free. |
323 | */ | 323 | */ |
324 | void mobilesync_anchors_free(mobilesync_anchors_t anchors); | 324 | LIBIMOBILEDEVICE_API void mobilesync_anchors_free(mobilesync_anchors_t anchors); |
325 | 325 | ||
326 | 326 | ||
327 | /** | 327 | /** |
@@ -329,7 +329,7 @@ void mobilesync_anchors_free(mobilesync_anchors_t anchors); | |||
329 | * | 329 | * |
330 | * @return A new plist_t of type PLIST_DICT. | 330 | * @return A new plist_t of type PLIST_DICT. |
331 | */ | 331 | */ |
332 | plist_t mobilesync_actions_new(void); | 332 | LIBIMOBILEDEVICE_API plist_t mobilesync_actions_new(void); |
333 | 333 | ||
334 | /** | 334 | /** |
335 | * Add one or more new key:value pairs to the given actions plist. | 335 | * Add one or more new key:value pairs to the given actions plist. |
@@ -343,14 +343,14 @@ plist_t mobilesync_actions_new(void); | |||
343 | * integer to use as a boolean value indicating that the device should | 343 | * integer to use as a boolean value indicating that the device should |
344 | * link submitted changes and report remapped identifiers. | 344 | * link submitted changes and report remapped identifiers. |
345 | */ | 345 | */ |
346 | void mobilesync_actions_add(plist_t actions, ...); | 346 | LIBIMOBILEDEVICE_API void mobilesync_actions_add(plist_t actions, ...); |
347 | 347 | ||
348 | /** | 348 | /** |
349 | * Free actions plist. | 349 | * Free actions plist. |
350 | * | 350 | * |
351 | * @param actions The actions plist to free. Does nothing if NULL is passed. | 351 | * @param actions The actions plist to free. Does nothing if NULL is passed. |
352 | */ | 352 | */ |
353 | void mobilesync_actions_free(plist_t actions); | 353 | LIBIMOBILEDEVICE_API void mobilesync_actions_free(plist_t actions); |
354 | 354 | ||
355 | #ifdef __cplusplus | 355 | #ifdef __cplusplus |
356 | } | 356 | } |
diff --git a/include/libimobiledevice/notification_proxy.h b/include/libimobiledevice/notification_proxy.h index 4eccf20..f4f090b 100644 --- a/include/libimobiledevice/notification_proxy.h +++ b/include/libimobiledevice/notification_proxy.h | |||
@@ -109,7 +109,7 @@ typedef void (*np_notify_cb_t) (const char *notification, void *user_data); | |||
109 | * or NP_E_CONN_FAILED when the connection to the device could not be | 109 | * or NP_E_CONN_FAILED when the connection to the device could not be |
110 | * established. | 110 | * established. |
111 | */ | 111 | */ |
112 | np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t service, np_client_t *client); | 112 | LIBIMOBILEDEVICE_API np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t service, np_client_t *client); |
113 | 113 | ||
114 | /** | 114 | /** |
115 | * Starts a new notification proxy service on the specified device and connects to it. | 115 | * Starts a new notification proxy service on the specified device and connects to it. |
@@ -124,7 +124,7 @@ np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t servic | |||
124 | * @return NP_E_SUCCESS on success, or an NP_E_* error | 124 | * @return NP_E_SUCCESS on success, or an NP_E_* error |
125 | * code otherwise. | 125 | * code otherwise. |
126 | */ | 126 | */ |
127 | np_error_t np_client_start_service(idevice_t device, np_client_t* client, const char* label); | 127 | LIBIMOBILEDEVICE_API np_error_t np_client_start_service(idevice_t device, np_client_t* client, const char* label); |
128 | 128 | ||
129 | /** | 129 | /** |
130 | * Disconnects a notification_proxy client from the device and frees up the | 130 | * Disconnects a notification_proxy client from the device and frees up the |
@@ -134,7 +134,7 @@ np_error_t np_client_start_service(idevice_t device, np_client_t* client, const | |||
134 | * | 134 | * |
135 | * @return NP_E_SUCCESS on success, or NP_E_INVALID_ARG when client is NULL. | 135 | * @return NP_E_SUCCESS on success, or NP_E_INVALID_ARG when client is NULL. |
136 | */ | 136 | */ |
137 | np_error_t np_client_free(np_client_t client); | 137 | LIBIMOBILEDEVICE_API np_error_t np_client_free(np_client_t client); |
138 | 138 | ||
139 | 139 | ||
140 | /** | 140 | /** |
@@ -145,7 +145,7 @@ np_error_t np_client_free(np_client_t client); | |||
145 | * | 145 | * |
146 | * @return NP_E_SUCCESS on success, or an error returned by np_plist_send | 146 | * @return NP_E_SUCCESS on success, or an error returned by np_plist_send |
147 | */ | 147 | */ |
148 | np_error_t np_post_notification(np_client_t client, const char *notification); | 148 | LIBIMOBILEDEVICE_API np_error_t np_post_notification(np_client_t client, const char *notification); |
149 | 149 | ||
150 | /** | 150 | /** |
151 | * Tells the device to send a notification on the specified event. | 151 | * Tells the device to send a notification on the specified event. |
@@ -156,7 +156,7 @@ np_error_t np_post_notification(np_client_t client, const char *notification); | |||
156 | * @return NP_E_SUCCESS on success, NP_E_INVALID_ARG when client or | 156 | * @return NP_E_SUCCESS on success, NP_E_INVALID_ARG when client or |
157 | * notification are NULL, or an error returned by np_plist_send. | 157 | * notification are NULL, or an error returned by np_plist_send. |
158 | */ | 158 | */ |
159 | np_error_t np_observe_notification(np_client_t client, const char *notification); | 159 | LIBIMOBILEDEVICE_API np_error_t np_observe_notification(np_client_t client, const char *notification); |
160 | 160 | ||
161 | /** | 161 | /** |
162 | * Tells the device to send a notification on specified events. | 162 | * Tells the device to send a notification on specified events. |
@@ -169,7 +169,7 @@ np_error_t np_observe_notification(np_client_t client, const char *notification) | |||
169 | * @return NP_E_SUCCESS on success, NP_E_INVALID_ARG when client is null, | 169 | * @return NP_E_SUCCESS on success, NP_E_INVALID_ARG when client is null, |
170 | * or an error returned by np_observe_notification. | 170 | * or an error returned by np_observe_notification. |
171 | */ | 171 | */ |
172 | np_error_t np_observe_notifications(np_client_t client, const char **notification_spec); | 172 | LIBIMOBILEDEVICE_API np_error_t np_observe_notifications(np_client_t client, const char **notification_spec); |
173 | 173 | ||
174 | /** | 174 | /** |
175 | * This function allows an application to define a callback function that will | 175 | * This function allows an application to define a callback function that will |
@@ -193,7 +193,7 @@ np_error_t np_observe_notifications(np_client_t client, const char **notificatio | |||
193 | * NP_E_INVALID_ARG when client is NULL, or NP_E_UNKNOWN_ERROR when | 193 | * NP_E_INVALID_ARG when client is NULL, or NP_E_UNKNOWN_ERROR when |
194 | * the callback thread could no be created. | 194 | * the callback thread could no be created. |
195 | */ | 195 | */ |
196 | np_error_t np_set_notify_callback(np_client_t client, np_notify_cb_t notify_cb, void *user_data); | 196 | LIBIMOBILEDEVICE_API np_error_t np_set_notify_callback(np_client_t client, np_notify_cb_t notify_cb, void *user_data); |
197 | 197 | ||
198 | #ifdef __cplusplus | 198 | #ifdef __cplusplus |
199 | } | 199 | } |
diff --git a/include/libimobiledevice/preboard.h b/include/libimobiledevice/preboard.h index 88e9806..0d89eb4 100644 --- a/include/libimobiledevice/preboard.h +++ b/include/libimobiledevice/preboard.h | |||
@@ -64,7 +64,7 @@ typedef void (*preboard_status_cb_t) (plist_t message, void *user_data); | |||
64 | * @return PREBOARD_E_SUCCESS on success, PREBOARD_E_INVALID_ARG when | 64 | * @return PREBOARD_E_SUCCESS on success, PREBOARD_E_INVALID_ARG when |
65 | * client is NULL, or an PREBOARD_E_* error code otherwise. | 65 | * client is NULL, or an PREBOARD_E_* error code otherwise. |
66 | */ | 66 | */ |
67 | preboard_error_t preboard_client_new(idevice_t device, lockdownd_service_descriptor_t service, preboard_client_t * client); | 67 | LIBIMOBILEDEVICE_API preboard_error_t preboard_client_new(idevice_t device, lockdownd_service_descriptor_t service, preboard_client_t * client); |
68 | 68 | ||
69 | /** | 69 | /** |
70 | * Starts a new preboard service on the specified device and connects to it. | 70 | * Starts a new preboard service on the specified device and connects to it. |
@@ -79,7 +79,7 @@ preboard_error_t preboard_client_new(idevice_t device, lockdownd_service_descrip | |||
79 | * @return PREBOARD_E_SUCCESS on success, or a PREBOARD_E_* error | 79 | * @return PREBOARD_E_SUCCESS on success, or a PREBOARD_E_* error |
80 | * code otherwise. | 80 | * code otherwise. |
81 | */ | 81 | */ |
82 | preboard_error_t preboard_client_start_service(idevice_t device, preboard_client_t * client, const char* label); | 82 | LIBIMOBILEDEVICE_API preboard_error_t preboard_client_start_service(idevice_t device, preboard_client_t * client, const char* label); |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * Disconnects a preboard client from the device and frees up the | 85 | * Disconnects a preboard client from the device and frees up the |
@@ -90,7 +90,7 @@ preboard_error_t preboard_client_start_service(idevice_t device, preboard_client | |||
90 | * @return PREBOARD_E_SUCCESS on success, PREBOARD_E_INVALID_ARG when | 90 | * @return PREBOARD_E_SUCCESS on success, PREBOARD_E_INVALID_ARG when |
91 | * client is NULL, or a PREBOARD_E_* error code otherwise. | 91 | * client is NULL, or a PREBOARD_E_* error code otherwise. |
92 | */ | 92 | */ |
93 | preboard_error_t preboard_client_free(preboard_client_t client); | 93 | LIBIMOBILEDEVICE_API preboard_error_t preboard_client_free(preboard_client_t client); |
94 | 94 | ||
95 | /** | 95 | /** |
96 | * Sends a plist to the service. | 96 | * Sends a plist to the service. |
@@ -102,7 +102,7 @@ preboard_error_t preboard_client_free(preboard_client_t client); | |||
102 | * PREBOARD_E_INVALID_ARG when client or plist is NULL, | 102 | * PREBOARD_E_INVALID_ARG when client or plist is NULL, |
103 | * or a PREBOARD_E_* error code on error | 103 | * or a PREBOARD_E_* error code on error |
104 | */ | 104 | */ |
105 | preboard_error_t preboard_send(preboard_client_t client, plist_t plist); | 105 | LIBIMOBILEDEVICE_API preboard_error_t preboard_send(preboard_client_t client, plist_t plist); |
106 | 106 | ||
107 | /** | 107 | /** |
108 | * Receives a plist from the service. | 108 | * Receives a plist from the service. |
@@ -115,7 +115,7 @@ preboard_error_t preboard_send(preboard_client_t client, plist_t plist); | |||
115 | * PREBOARD_E_TIMEOUT when no data was received after 5 seconds, | 115 | * PREBOARD_E_TIMEOUT when no data was received after 5 seconds, |
116 | * or a PREBOARD_E_* error code on error | 116 | * or a PREBOARD_E_* error code on error |
117 | */ | 117 | */ |
118 | preboard_error_t preboard_receive(preboard_client_t client, plist_t * plist); | 118 | LIBIMOBILEDEVICE_API preboard_error_t preboard_receive(preboard_client_t client, plist_t * plist); |
119 | 119 | ||
120 | /** | 120 | /** |
121 | * Receives a plist from the service with the specified timeout. | 121 | * Receives a plist from the service with the specified timeout. |
@@ -129,7 +129,7 @@ preboard_error_t preboard_receive(preboard_client_t client, plist_t * plist); | |||
129 | * PREBOARD_E_TIMEOUT when no data was received after the given timeout, | 129 | * PREBOARD_E_TIMEOUT when no data was received after the given timeout, |
130 | * or a PREBOARD_E_* error code on error. | 130 | * or a PREBOARD_E_* error code on error. |
131 | */ | 131 | */ |
132 | preboard_error_t preboard_receive_with_timeout(preboard_client_t client, plist_t * plist, uint32_t timeout_ms); | 132 | LIBIMOBILEDEVICE_API preboard_error_t preboard_receive_with_timeout(preboard_client_t client, plist_t * plist, uint32_t timeout_ms); |
133 | 133 | ||
134 | /** | 134 | /** |
135 | * Tells the preboard service to create a stashbag. This will make the device | 135 | * Tells the preboard service to create a stashbag. This will make the device |
@@ -157,7 +157,7 @@ preboard_error_t preboard_receive_with_timeout(preboard_client_t client, plist_t | |||
157 | * PREBOARD_E_INVALID_ARG when client is invalid, | 157 | * PREBOARD_E_INVALID_ARG when client is invalid, |
158 | * or a PREBOARD_E_* error code on error. | 158 | * or a PREBOARD_E_* error code on error. |
159 | */ | 159 | */ |
160 | preboard_error_t preboard_create_stashbag(preboard_client_t client, plist_t manifest, preboard_status_cb_t status_cb, void *user_data); | 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 | 161 | ||
162 | /** | 162 | /** |
163 | * Instructs the preboard service to commit a previously created stashbag. | 163 | * Instructs the preboard service to commit a previously created stashbag. |
@@ -178,7 +178,7 @@ preboard_error_t preboard_create_stashbag(preboard_client_t client, plist_t mani | |||
178 | * PREBOARD_E_INVALID_ARG when client is invalid, | 178 | * PREBOARD_E_INVALID_ARG when client is invalid, |
179 | * or a PREBOARD_E_* error code on error. | 179 | * or a PREBOARD_E_* error code on error. |
180 | */ | 180 | */ |
181 | preboard_error_t preboard_commit_stashbag(preboard_client_t client, plist_t manifest, preboard_status_cb_t status_cb, void *user_data); | 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 | 182 | ||
183 | #ifdef __cplusplus | 183 | #ifdef __cplusplus |
184 | } | 184 | } |
diff --git a/include/libimobiledevice/property_list_service.h b/include/libimobiledevice/property_list_service.h index 3f6ebad..e6b26a3 100644 --- a/include/libimobiledevice/property_list_service.h +++ b/include/libimobiledevice/property_list_service.h | |||
@@ -60,7 +60,7 @@ typedef property_list_service_private* property_list_service_client_t; /**< The | |||
60 | * PROPERTY_LIST_SERVICE_E_INVALID_ARG when one of the arguments is invalid, | 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. | 61 | * or PROPERTY_LIST_SERVICE_E_MUX_ERROR when connecting to the device failed. |
62 | */ | 62 | */ |
63 | property_list_service_error_t property_list_service_client_new(idevice_t device, lockdownd_service_descriptor_t service, property_list_service_client_t *client); | 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 | 64 | ||
65 | /** | 65 | /** |
66 | * Frees a PropertyList service. | 66 | * Frees a PropertyList service. |
@@ -71,7 +71,7 @@ property_list_service_error_t property_list_service_client_new(idevice_t device, | |||
71 | * PROPERTY_LIST_SERVICE_E_INVALID_ARG when client is invalid, or a | 71 | * PROPERTY_LIST_SERVICE_E_INVALID_ARG when client is invalid, or a |
72 | * PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when another error occurred. | 72 | * PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when another error occurred. |
73 | */ | 73 | */ |
74 | property_list_service_error_t property_list_service_client_free(property_list_service_client_t client); | 74 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_client_free(property_list_service_client_t client); |
75 | 75 | ||
76 | /** | 76 | /** |
77 | * Sends an XML plist. | 77 | * Sends an XML plist. |
@@ -84,7 +84,7 @@ property_list_service_error_t property_list_service_client_free(property_list_se | |||
84 | * PROPERTY_LIST_SERVICE_E_PLIST_ERROR when dict is not a valid plist, | 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. | 85 | * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when an unspecified error occurs. |
86 | */ | 86 | */ |
87 | property_list_service_error_t property_list_service_send_xml_plist(property_list_service_client_t client, plist_t plist); | 87 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_send_xml_plist(property_list_service_client_t client, plist_t plist); |
88 | 88 | ||
89 | /** | 89 | /** |
90 | * Sends a binary plist. | 90 | * Sends a binary plist. |
@@ -97,7 +97,7 @@ property_list_service_error_t property_list_service_send_xml_plist(property_list | |||
97 | * PROPERTY_LIST_SERVICE_E_PLIST_ERROR when dict is not a valid plist, | 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. | 98 | * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when an unspecified error occurs. |
99 | */ | 99 | */ |
100 | property_list_service_error_t property_list_service_send_binary_plist(property_list_service_client_t client, plist_t plist); | 100 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_send_binary_plist(property_list_service_client_t client, plist_t plist); |
101 | 101 | ||
102 | /** | 102 | /** |
103 | * Receives a plist using the given property list service client with specified | 103 | * Receives a plist using the given property list service client with specified |
@@ -116,7 +116,7 @@ property_list_service_error_t property_list_service_send_binary_plist(property_l | |||
116 | * communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when | 116 | * communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when |
117 | * an unspecified error occurs. | 117 | * an unspecified error occurs. |
118 | */ | 118 | */ |
119 | property_list_service_error_t property_list_service_receive_plist_with_timeout(property_list_service_client_t client, plist_t *plist, unsigned int timeout); | 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 | 120 | ||
121 | /** | 121 | /** |
122 | * Receives a plist using the given property list service client. | 122 | * Receives a plist using the given property list service client. |
@@ -139,7 +139,7 @@ property_list_service_error_t property_list_service_receive_plist_with_timeout(p | |||
139 | * communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when | 139 | * communication error occurs, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR when |
140 | * an unspecified error occurs. | 140 | * an unspecified error occurs. |
141 | */ | 141 | */ |
142 | property_list_service_error_t property_list_service_receive_plist(property_list_service_client_t client, plist_t *plist); | 142 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_receive_plist(property_list_service_client_t client, plist_t *plist); |
143 | 143 | ||
144 | /** | 144 | /** |
145 | * Enable SSL for the given property list service client. | 145 | * Enable SSL for the given property list service client. |
@@ -152,7 +152,7 @@ property_list_service_error_t property_list_service_receive_plist(property_list_ | |||
152 | * PROPERTY_LIST_SERVICE_E_SSL_ERROR when SSL could not be enabled, | 152 | * PROPERTY_LIST_SERVICE_E_SSL_ERROR when SSL could not be enabled, |
153 | * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise. | 153 | * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise. |
154 | */ | 154 | */ |
155 | property_list_service_error_t property_list_service_enable_ssl(property_list_service_client_t client); | 155 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_enable_ssl(property_list_service_client_t client); |
156 | 156 | ||
157 | /** | 157 | /** |
158 | * Disable SSL for the given property list service client. | 158 | * Disable SSL for the given property list service client. |
@@ -164,7 +164,7 @@ property_list_service_error_t property_list_service_enable_ssl(property_list_ser | |||
164 | * PROPERTY_LIST_SERVICE_E_INVALID_ARG if one or more of the arguments are invalid, | 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. | 165 | * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise. |
166 | */ | 166 | */ |
167 | property_list_service_error_t property_list_service_disable_ssl(property_list_service_client_t client); | 167 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_disable_ssl(property_list_service_client_t client); |
168 | 168 | ||
169 | /** | 169 | /** |
170 | * Return a handle to the parent #service_client_t of the given property list service client. | 170 | * Return a handle to the parent #service_client_t of the given property list service client. |
@@ -175,7 +175,7 @@ property_list_service_error_t property_list_service_disable_ssl(property_list_se | |||
175 | * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success, | 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. | 176 | * PROPERTY_LIST_SERVICE_E_INVALID_ARG if one or more of the arguments are invalid. |
177 | */ | 177 | */ |
178 | property_list_service_error_t property_list_service_get_service_client(property_list_service_client_t client, service_client_t *service_client); | 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 | 179 | ||
180 | #ifdef __cplusplus | 180 | #ifdef __cplusplus |
181 | } | 181 | } |
diff --git a/include/libimobiledevice/restore.h b/include/libimobiledevice/restore.h index 0017cfd..859dc98 100644 --- a/include/libimobiledevice/restore.h +++ b/include/libimobiledevice/restore.h | |||
@@ -56,7 +56,7 @@ typedef restored_client_private *restored_client_t; /**< The client handle. */ | |||
56 | * | 56 | * |
57 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL | 57 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL |
58 | */ | 58 | */ |
59 | restored_error_t restored_client_new(idevice_t device, restored_client_t *client, const char *label); | 59 | LIBIMOBILEDEVICE_API restored_error_t restored_client_new(idevice_t device, restored_client_t *client, const char *label); |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * Closes the restored client session if one is running and frees up the | 62 | * Closes the restored client session if one is running and frees up the |
@@ -66,7 +66,7 @@ restored_error_t restored_client_new(idevice_t device, restored_client_t *client | |||
66 | * | 66 | * |
67 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL | 67 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL |
68 | */ | 68 | */ |
69 | restored_error_t restored_client_free(restored_client_t client); | 69 | LIBIMOBILEDEVICE_API restored_error_t restored_client_free(restored_client_t client); |
70 | 70 | ||
71 | 71 | ||
72 | /** | 72 | /** |
@@ -79,7 +79,7 @@ restored_error_t restored_client_free(restored_client_t client); | |||
79 | * | 79 | * |
80 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL | 80 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL |
81 | */ | 81 | */ |
82 | restored_error_t restored_query_type(restored_client_t client, char **type, uint64_t *version); | 82 | LIBIMOBILEDEVICE_API restored_error_t restored_query_type(restored_client_t client, char **type, uint64_t *version); |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * Queries a value from the device specified by a key. | 85 | * Queries a value from the device specified by a key. |
@@ -90,7 +90,7 @@ restored_error_t restored_query_type(restored_client_t client, char **type, uint | |||
90 | * | 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 | 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 | */ | 92 | */ |
93 | restored_error_t restored_query_value(restored_client_t client, const char *key, plist_t *value); | 93 | LIBIMOBILEDEVICE_API restored_error_t restored_query_value(restored_client_t client, const char *key, plist_t *value); |
94 | 94 | ||
95 | /** | 95 | /** |
96 | * Retrieves a value from information plist specified by a key. | 96 | * Retrieves a value from information plist specified by a key. |
@@ -101,7 +101,7 @@ restored_error_t restored_query_value(restored_client_t client, const char *key, | |||
101 | * | 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 | 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 | */ | 103 | */ |
104 | restored_error_t restored_get_value(restored_client_t client, const char *key, plist_t *value) ; | 104 | LIBIMOBILEDEVICE_API restored_error_t restored_get_value(restored_client_t client, const char *key, plist_t *value) ; |
105 | 105 | ||
106 | /** | 106 | /** |
107 | * Sends a plist to restored. | 107 | * Sends a plist to restored. |
@@ -115,7 +115,7 @@ restored_error_t restored_get_value(restored_client_t client, const char *key, p | |||
115 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client or | 115 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client or |
116 | * plist is NULL | 116 | * plist is NULL |
117 | */ | 117 | */ |
118 | restored_error_t restored_send(restored_client_t client, plist_t plist); | 118 | LIBIMOBILEDEVICE_API restored_error_t restored_send(restored_client_t client, plist_t plist); |
119 | 119 | ||
120 | /** | 120 | /** |
121 | * Receives a plist from restored. | 121 | * Receives a plist from restored. |
@@ -126,7 +126,7 @@ restored_error_t restored_send(restored_client_t client, plist_t plist); | |||
126 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client or | 126 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client or |
127 | * plist is NULL | 127 | * plist is NULL |
128 | */ | 128 | */ |
129 | restored_error_t restored_receive(restored_client_t client, plist_t *plist); | 129 | LIBIMOBILEDEVICE_API restored_error_t restored_receive(restored_client_t client, plist_t *plist); |
130 | 130 | ||
131 | /** | 131 | /** |
132 | * Sends the Goodbye request to restored signaling the end of communication. | 132 | * Sends the Goodbye request to restored signaling the end of communication. |
@@ -136,7 +136,7 @@ restored_error_t restored_receive(restored_client_t client, plist_t *plist); | |||
136 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG when client is NULL, | 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 | 137 | * RESTORE_E_PLIST_ERROR if the device did not acknowledge the request |
138 | */ | 138 | */ |
139 | restored_error_t restored_goodbye(restored_client_t client); | 139 | LIBIMOBILEDEVICE_API restored_error_t restored_goodbye(restored_client_t client); |
140 | 140 | ||
141 | 141 | ||
142 | /** | 142 | /** |
@@ -149,7 +149,7 @@ restored_error_t restored_goodbye(restored_client_t client); | |||
149 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG if a parameter | 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 | 150 | * is NULL, RESTORE_E_START_RESTORE_FAILED if the request fails |
151 | */ | 151 | */ |
152 | restored_error_t restored_start_restore(restored_client_t client, plist_t options, uint64_t version); | 152 | LIBIMOBILEDEVICE_API restored_error_t restored_start_restore(restored_client_t client, plist_t options, uint64_t version); |
153 | 153 | ||
154 | /** | 154 | /** |
155 | * Requests device to reboot. | 155 | * Requests device to reboot. |
@@ -159,7 +159,7 @@ restored_error_t restored_start_restore(restored_client_t client, plist_t option | |||
159 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG if a parameter | 159 | * @return RESTORE_E_SUCCESS on success, RESTORE_E_INVALID_ARG if a parameter |
160 | * is NULL | 160 | * is NULL |
161 | */ | 161 | */ |
162 | restored_error_t restored_reboot(restored_client_t client); | 162 | LIBIMOBILEDEVICE_API restored_error_t restored_reboot(restored_client_t client); |
163 | 163 | ||
164 | /* Helper */ | 164 | /* Helper */ |
165 | 165 | ||
@@ -170,7 +170,7 @@ restored_error_t restored_reboot(restored_client_t client); | |||
170 | * @param label The label to set or NULL to disable sending a label | 170 | * @param label The label to set or NULL to disable sending a label |
171 | * | 171 | * |
172 | */ | 172 | */ |
173 | void restored_client_set_label(restored_client_t client, const char *label); | 173 | LIBIMOBILEDEVICE_API void restored_client_set_label(restored_client_t client, const char *label); |
174 | 174 | ||
175 | #ifdef __cplusplus | 175 | #ifdef __cplusplus |
176 | } | 176 | } |
diff --git a/include/libimobiledevice/reverse_proxy.h b/include/libimobiledevice/reverse_proxy.h index b7a93ff..5e2f54b 100644 --- a/include/libimobiledevice/reverse_proxy.h +++ b/include/libimobiledevice/reverse_proxy.h | |||
@@ -118,7 +118,7 @@ typedef void (*reverse_proxy_status_cb_t) (reverse_proxy_client_t client, revers | |||
118 | * @return REVERSE_PROXY_E_SUCCESS on success, | 118 | * @return REVERSE_PROXY_E_SUCCESS on success, |
119 | * or a REVERSE_PROXY_E_* error code otherwise. | 119 | * or a REVERSE_PROXY_E_* error code otherwise. |
120 | */ | 120 | */ |
121 | reverse_proxy_error_t reverse_proxy_client_create_with_service(idevice_t device, reverse_proxy_client_t* client, const char* label); | 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 | 122 | ||
123 | /** | 123 | /** |
124 | * Create a reverse proxy client using an open port on the device. This is | 124 | * Create a reverse proxy client using an open port on the device. This is |
@@ -136,14 +136,14 @@ reverse_proxy_error_t reverse_proxy_client_create_with_service(idevice_t device, | |||
136 | * @return REVERSE_PROXY_E_SUCCESS on success, | 136 | * @return REVERSE_PROXY_E_SUCCESS on success, |
137 | * or a REVERSE_PROXY_E_* error code otherwise. | 137 | * or a REVERSE_PROXY_E_* error code otherwise. |
138 | */ | 138 | */ |
139 | reverse_proxy_error_t reverse_proxy_client_create_with_port(idevice_t device, reverse_proxy_client_t* client, uint16_t device_port); | 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 | 140 | ||
141 | /** | 141 | /** |
142 | * Disconnects a reverse proxy client and frees up the client data. | 142 | * Disconnects a reverse proxy client and frees up the client data. |
143 | * | 143 | * |
144 | * @param client The reverse proxy client to disconnect and free. | 144 | * @param client The reverse proxy client to disconnect and free. |
145 | */ | 145 | */ |
146 | reverse_proxy_error_t reverse_proxy_client_free(reverse_proxy_client_t client); | 146 | LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_free(reverse_proxy_client_t client); |
147 | 147 | ||
148 | /** | 148 | /** |
149 | * Make an initialized reverse proxy client operational, i.e. start the actual proxy. | 149 | * Make an initialized reverse proxy client operational, i.e. start the actual proxy. |
@@ -155,7 +155,7 @@ reverse_proxy_error_t reverse_proxy_client_free(reverse_proxy_client_t client); | |||
155 | * @return REVERSE_PROXY_E_SUCCESS on success, | 155 | * @return REVERSE_PROXY_E_SUCCESS on success, |
156 | * or a REVERSE_PROXY_E_* error code otherwise. | 156 | * or a REVERSE_PROXY_E_* error code otherwise. |
157 | */ | 157 | */ |
158 | reverse_proxy_error_t reverse_proxy_client_start_proxy(reverse_proxy_client_t client, int control_protocol_version); | 158 | LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_start_proxy(reverse_proxy_client_t client, int control_protocol_version); |
159 | 159 | ||
160 | /** | 160 | /** |
161 | * Set a status callback function. This allows to report the status of the | 161 | * Set a status callback function. This allows to report the status of the |
@@ -168,7 +168,7 @@ reverse_proxy_error_t reverse_proxy_client_start_proxy(reverse_proxy_client_t cl | |||
168 | * when the status of the reverse proxy changes. | 168 | * when the status of the reverse proxy changes. |
169 | * @param user_data A pointer that will be passed to the callback function. | 169 | * @param user_data A pointer that will be passed to the callback function. |
170 | */ | 170 | */ |
171 | void reverse_proxy_client_set_status_callback(reverse_proxy_client_t client, reverse_proxy_status_cb_t callback, void* user_data); | 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 | 172 | ||
173 | /** | 173 | /** |
174 | * Set a log callback function. Useful for debugging or verbosity. | 174 | * Set a log callback function. Useful for debugging or verbosity. |
@@ -180,7 +180,7 @@ void reverse_proxy_client_set_status_callback(reverse_proxy_client_t client, rev | |||
180 | * when the reverse proxy logs something. | 180 | * when the reverse proxy logs something. |
181 | * @param user_data A pointer that will be passed to the callback function. | 181 | * @param user_data A pointer that will be passed to the callback function. |
182 | */ | 182 | */ |
183 | void reverse_proxy_client_set_log_callback(reverse_proxy_client_t client, reverse_proxy_log_cb_t callback, void* user_data); | 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 | 184 | ||
185 | /** | 185 | /** |
186 | * Set a data callback function. Useful for debugging or extra verbosity. | 186 | * Set a data callback function. Useful for debugging or extra verbosity. |
@@ -193,7 +193,7 @@ void reverse_proxy_client_set_log_callback(reverse_proxy_client_t client, revers | |||
193 | * @param user_data A pointer that will be passed to the callback function. | 193 | * @param user_data A pointer that will be passed to the callback function. |
194 | */ | 194 | */ |
195 | 195 | ||
196 | void reverse_proxy_client_set_data_callback(reverse_proxy_client_t client, reverse_proxy_data_cb_t callback, void* user_data); | 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 | 197 | ||
198 | /** | 198 | /** |
199 | * Helper function to return the type of a given reverse proxy client, which | 199 | * Helper function to return the type of a given reverse proxy client, which |
@@ -204,7 +204,7 @@ void reverse_proxy_client_set_data_callback(reverse_proxy_client_t client, rever | |||
204 | * | 204 | * |
205 | * @return The type of the rerverse proxy client | 205 | * @return The type of the rerverse proxy client |
206 | */ | 206 | */ |
207 | reverse_proxy_client_type_t reverse_proxy_get_type(reverse_proxy_client_t client); | 207 | LIBIMOBILEDEVICE_API reverse_proxy_client_type_t reverse_proxy_get_type(reverse_proxy_client_t client); |
208 | 208 | ||
209 | #ifdef __cplusplus | 209 | #ifdef __cplusplus |
210 | } | 210 | } |
diff --git a/include/libimobiledevice/sbservices.h b/include/libimobiledevice/sbservices.h index 509d5b9..7435947 100644 --- a/include/libimobiledevice/sbservices.h +++ b/include/libimobiledevice/sbservices.h | |||
@@ -68,7 +68,7 @@ typedef sbservices_client_private *sbservices_client_t; /**< The client handle. | |||
68 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when | 68 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when |
69 | * client is NULL, or an SBSERVICES_E_* error code otherwise. | 69 | * client is NULL, or an SBSERVICES_E_* error code otherwise. |
70 | */ | 70 | */ |
71 | sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_descriptor_t service, sbservices_client_t *client); | 71 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_descriptor_t service, sbservices_client_t *client); |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * Starts a new sbservices service on the specified device and connects to it. | 74 | * Starts a new sbservices service on the specified device and connects to it. |
@@ -83,7 +83,7 @@ sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_des | |||
83 | * @return SBSERVICES_E_SUCCESS on success, or an SBSERVICES_E_* error | 83 | * @return SBSERVICES_E_SUCCESS on success, or an SBSERVICES_E_* error |
84 | * code otherwise. | 84 | * code otherwise. |
85 | */ | 85 | */ |
86 | sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_client_t* client, const char* label); | 86 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_client_t* client, const char* label); |
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Disconnects an sbservices client from the device and frees up the | 89 | * Disconnects an sbservices client from the device and frees up the |
@@ -94,7 +94,7 @@ sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_ | |||
94 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when | 94 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when |
95 | * client is NULL, or an SBSERVICES_E_* error code otherwise. | 95 | * client is NULL, or an SBSERVICES_E_* error code otherwise. |
96 | */ | 96 | */ |
97 | sbservices_error_t sbservices_client_free(sbservices_client_t client); | 97 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_free(sbservices_client_t client); |
98 | 98 | ||
99 | 99 | ||
100 | /** | 100 | /** |
@@ -111,7 +111,7 @@ sbservices_error_t sbservices_client_free(sbservices_client_t client); | |||
111 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when | 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. | 112 | * client or state is invalid, or an SBSERVICES_E_* error code otherwise. |
113 | */ | 113 | */ |
114 | sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version); | 114 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version); |
115 | 115 | ||
116 | /** | 116 | /** |
117 | * Sets the icon state of the connected device. | 117 | * Sets the icon state of the connected device. |
@@ -122,7 +122,7 @@ sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t | |||
122 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when | 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. | 123 | * client or newstate is NULL, or an SBSERVICES_E_* error code otherwise. |
124 | */ | 124 | */ |
125 | sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate); | 125 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate); |
126 | 126 | ||
127 | /** | 127 | /** |
128 | * Get the icon of the specified app as PNG data. | 128 | * Get the icon of the specified app as PNG data. |
@@ -139,7 +139,7 @@ sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t | |||
139 | * client, bundleId, or pngdata are invalid, or an SBSERVICES_E_* error | 139 | * client, bundleId, or pngdata are invalid, or an SBSERVICES_E_* error |
140 | * code otherwise. | 140 | * code otherwise. |
141 | */ | 141 | */ |
142 | sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize); | 142 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize); |
143 | 143 | ||
144 | /** | 144 | /** |
145 | * Gets the interface orientation of the device. | 145 | * Gets the interface orientation of the device. |
@@ -150,7 +150,7 @@ sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const | |||
150 | * @return SBSERVICES_E_SUCCESS on success, SBSERVICES_E_INVALID_ARG when | 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. | 151 | * client or state is invalid, or an SBSERVICES_E_* error code otherwise. |
152 | */ | 152 | */ |
153 | sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t client, sbservices_interface_orientation_t* interface_orientation); | 153 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t client, sbservices_interface_orientation_t* interface_orientation); |
154 | 154 | ||
155 | /** | 155 | /** |
156 | * Get the home screen wallpaper as PNG data. | 156 | * Get the home screen wallpaper as PNG data. |
@@ -166,7 +166,7 @@ sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t clie | |||
166 | * client or pngdata are invalid, or an SBSERVICES_E_* error | 166 | * client or pngdata are invalid, or an SBSERVICES_E_* error |
167 | * code otherwise. | 167 | * code otherwise. |
168 | */ | 168 | */ |
169 | sbservices_error_t sbservices_get_home_screen_wallpaper_pngdata(sbservices_client_t client, char **pngdata, uint64_t *pngsize); | 169 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_home_screen_wallpaper_pngdata(sbservices_client_t client, char **pngdata, uint64_t *pngsize); |
170 | 170 | ||
171 | #ifdef __cplusplus | 171 | #ifdef __cplusplus |
172 | } | 172 | } |
diff --git a/include/libimobiledevice/screenshotr.h b/include/libimobiledevice/screenshotr.h index ecbbdbe..db3c969 100644 --- a/include/libimobiledevice/screenshotr.h +++ b/include/libimobiledevice/screenshotr.h | |||
@@ -66,7 +66,7 @@ typedef screenshotr_client_private *screenshotr_client_t; /**< The client handle | |||
66 | * or more parameters are invalid, or SCREENSHOTR_E_CONN_FAILED if the | 66 | * or more parameters are invalid, or SCREENSHOTR_E_CONN_FAILED if the |
67 | * connection to the device could not be established. | 67 | * connection to the device could not be established. |
68 | */ | 68 | */ |
69 | screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_descriptor_t service, screenshotr_client_t * client); | 69 | LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_descriptor_t service, screenshotr_client_t * client); |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * Starts a new screenshotr service on the specified device and connects to it. | 72 | * Starts a new screenshotr service on the specified device and connects to it. |
@@ -81,7 +81,7 @@ screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_d | |||
81 | * @return SCREENSHOTR_E_SUCCESS on success, or an SCREENSHOTR_E_* error | 81 | * @return SCREENSHOTR_E_SUCCESS on success, or an SCREENSHOTR_E_* error |
82 | * code otherwise. | 82 | * code otherwise. |
83 | */ | 83 | */ |
84 | screenshotr_error_t screenshotr_client_start_service(idevice_t device, screenshotr_client_t* client, const char* label); | 84 | LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_start_service(idevice_t device, screenshotr_client_t* client, const char* label); |
85 | 85 | ||
86 | /** | 86 | /** |
87 | * Disconnects a screenshotr client from the device and frees up the | 87 | * Disconnects a screenshotr client from the device and frees up the |
@@ -92,7 +92,7 @@ screenshotr_error_t screenshotr_client_start_service(idevice_t device, screensho | |||
92 | * @return SCREENSHOTR_E_SUCCESS on success, or SCREENSHOTR_E_INVALID_ARG | 92 | * @return SCREENSHOTR_E_SUCCESS on success, or SCREENSHOTR_E_INVALID_ARG |
93 | * if client is NULL. | 93 | * if client is NULL. |
94 | */ | 94 | */ |
95 | screenshotr_error_t screenshotr_client_free(screenshotr_client_t client); | 95 | LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_free(screenshotr_client_t client); |
96 | 96 | ||
97 | 97 | ||
98 | /** | 98 | /** |
@@ -109,7 +109,7 @@ screenshotr_error_t screenshotr_client_free(screenshotr_client_t client); | |||
109 | * one or more parameters are invalid, or another error code if an | 109 | * one or more parameters are invalid, or another error code if an |
110 | * error occurred. | 110 | * error occurred. |
111 | */ | 111 | */ |
112 | screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize); | 112 | LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize); |
113 | 113 | ||
114 | #ifdef __cplusplus | 114 | #ifdef __cplusplus |
115 | } | 115 | } |
diff --git a/include/libimobiledevice/service.h b/include/libimobiledevice/service.h index 28b6db6..f31ada4 100644 --- a/include/libimobiledevice/service.h +++ b/include/libimobiledevice/service.h | |||
@@ -62,7 +62,7 @@ typedef service_client_private* service_client_t; /**< The client handle. */ | |||
62 | * SERVICE_E_INVALID_ARG when one of the arguments is invalid, | 62 | * SERVICE_E_INVALID_ARG when one of the arguments is invalid, |
63 | * or SERVICE_E_MUX_ERROR when connecting to the device failed. | 63 | * or SERVICE_E_MUX_ERROR when connecting to the device failed. |
64 | */ | 64 | */ |
65 | service_error_t service_client_new(idevice_t device, lockdownd_service_descriptor_t service, service_client_t *client); | 65 | LIBIMOBILEDEVICE_API service_error_t service_client_new(idevice_t device, lockdownd_service_descriptor_t service, service_client_t *client); |
66 | 66 | ||
67 | /** | 67 | /** |
68 | * Starts a new service on the specified device with given name and | 68 | * Starts a new service on the specified device with given name and |
@@ -81,7 +81,7 @@ service_error_t service_client_new(idevice_t device, lockdownd_service_descripto | |||
81 | * @return SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code | 81 | * @return SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code |
82 | * otherwise. | 82 | * otherwise. |
83 | */ | 83 | */ |
84 | 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); | 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 | 85 | ||
86 | /** | 86 | /** |
87 | * Frees a service instance. | 87 | * Frees a service instance. |
@@ -92,7 +92,7 @@ service_error_t service_client_factory_start_service(idevice_t device, const cha | |||
92 | * SERVICE_E_INVALID_ARG when client is invalid, or a | 92 | * SERVICE_E_INVALID_ARG when client is invalid, or a |
93 | * SERVICE_E_UNKNOWN_ERROR when another error occurred. | 93 | * SERVICE_E_UNKNOWN_ERROR when another error occurred. |
94 | */ | 94 | */ |
95 | service_error_t service_client_free(service_client_t client); | 95 | LIBIMOBILEDEVICE_API service_error_t service_client_free(service_client_t client); |
96 | 96 | ||
97 | 97 | ||
98 | /** | 98 | /** |
@@ -108,7 +108,7 @@ service_error_t service_client_free(service_client_t client); | |||
108 | * invalid, or SERVICE_E_UNKNOWN_ERROR when an unspecified | 108 | * invalid, or SERVICE_E_UNKNOWN_ERROR when an unspecified |
109 | * error occurs. | 109 | * error occurs. |
110 | */ | 110 | */ |
111 | service_error_t service_send(service_client_t client, const char *data, uint32_t size, uint32_t *sent); | 111 | LIBIMOBILEDEVICE_API service_error_t service_send(service_client_t client, const char *data, uint32_t size, uint32_t *sent); |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * Receives data using the given service client with specified timeout. | 114 | * Receives data using the given service client with specified timeout. |
@@ -125,7 +125,7 @@ service_error_t service_send(service_client_t client, const char *data, uint32_t | |||
125 | * occurs, or SERVICE_E_UNKNOWN_ERROR when an unspecified | 125 | * occurs, or SERVICE_E_UNKNOWN_ERROR when an unspecified |
126 | * error occurs. | 126 | * error occurs. |
127 | */ | 127 | */ |
128 | service_error_t service_receive_with_timeout(service_client_t client, char *data, uint32_t size, uint32_t *received, unsigned int timeout); | 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 | 129 | ||
130 | /** | 130 | /** |
131 | * Receives data using the given service client. | 131 | * Receives data using the given service client. |
@@ -143,7 +143,7 @@ service_error_t service_receive_with_timeout(service_client_t client, char *data | |||
143 | * occurs, or SERVICE_E_UNKNOWN_ERROR when an unspecified | 143 | * occurs, or SERVICE_E_UNKNOWN_ERROR when an unspecified |
144 | * error occurs. | 144 | * error occurs. |
145 | */ | 145 | */ |
146 | service_error_t service_receive(service_client_t client, char *data, uint32_t size, uint32_t *received); | 146 | LIBIMOBILEDEVICE_API service_error_t service_receive(service_client_t client, char *data, uint32_t size, uint32_t *received); |
147 | 147 | ||
148 | 148 | ||
149 | /** | 149 | /** |
@@ -158,7 +158,7 @@ service_error_t service_receive(service_client_t client, char *data, uint32_t si | |||
158 | * SERVICE_E_SSL_ERROR when SSL could not be enabled, | 158 | * SERVICE_E_SSL_ERROR when SSL could not be enabled, |
159 | * or SERVICE_E_UNKNOWN_ERROR otherwise. | 159 | * or SERVICE_E_UNKNOWN_ERROR otherwise. |
160 | */ | 160 | */ |
161 | service_error_t service_enable_ssl(service_client_t client); | 161 | LIBIMOBILEDEVICE_API service_error_t service_enable_ssl(service_client_t client); |
162 | 162 | ||
163 | /** | 163 | /** |
164 | * Disable SSL for the given service client. | 164 | * Disable SSL for the given service client. |
@@ -169,7 +169,7 @@ service_error_t service_enable_ssl(service_client_t client); | |||
169 | * SERVICE_E_INVALID_ARG if client or client->connection is | 169 | * SERVICE_E_INVALID_ARG if client or client->connection is |
170 | * NULL, or SERVICE_E_UNKNOWN_ERROR otherwise. | 170 | * NULL, or SERVICE_E_UNKNOWN_ERROR otherwise. |
171 | */ | 171 | */ |
172 | service_error_t service_disable_ssl(service_client_t client); | 172 | LIBIMOBILEDEVICE_API service_error_t service_disable_ssl(service_client_t client); |
173 | 173 | ||
174 | /** | 174 | /** |
175 | * Disable SSL for the given service client, optionally without sending SSL terminate messages. | 175 | * Disable SSL for the given service client, optionally without sending SSL terminate messages. |
@@ -182,7 +182,7 @@ service_error_t service_disable_ssl(service_client_t client); | |||
182 | * SERVICE_E_INVALID_ARG if client or client->connection is | 182 | * SERVICE_E_INVALID_ARG if client or client->connection is |
183 | * NULL, or SERVICE_E_UNKNOWN_ERROR otherwise. | 183 | * NULL, or SERVICE_E_UNKNOWN_ERROR otherwise. |
184 | */ | 184 | */ |
185 | service_error_t service_disable_bypass_ssl(service_client_t client, uint8_t sslBypass); | 185 | LIBIMOBILEDEVICE_API service_error_t service_disable_bypass_ssl(service_client_t client, uint8_t sslBypass); |
186 | 186 | ||
187 | /** | 187 | /** |
188 | * Return a handle to the parent #idevice_connection_t of the given service client. | 188 | * Return a handle to the parent #idevice_connection_t of the given service client. |
@@ -193,7 +193,8 @@ service_error_t service_disable_bypass_ssl(service_client_t client, uint8_t sslB | |||
193 | * @return SERVICE_E_SUCCESS on success, | 193 | * @return SERVICE_E_SUCCESS on success, |
194 | * SERVICE_E_INVALID_ARG if one or more of the arguments are invalid. | 194 | * SERVICE_E_INVALID_ARG if one or more of the arguments are invalid. |
195 | */ | 195 | */ |
196 | service_error_t service_get_connection(service_client_t client, idevice_connection_t *connection); | 196 | LIBIMOBILEDEVICE_API service_error_t service_get_connection(service_client_t client, idevice_connection_t *connection); |
197 | |||
197 | #ifdef __cplusplus | 198 | #ifdef __cplusplus |
198 | } | 199 | } |
199 | #endif | 200 | #endif |
diff --git a/include/libimobiledevice/syslog_relay.h b/include/libimobiledevice/syslog_relay.h index aae5d11..0f6487a 100644 --- a/include/libimobiledevice/syslog_relay.h +++ b/include/libimobiledevice/syslog_relay.h | |||
@@ -65,7 +65,7 @@ typedef void (*syslog_relay_receive_cb_t)(char c, void *user_data); | |||
65 | * @return SYSLOG_RELAY_E_SUCCESS on success, SYSLOG_RELAY_E_INVALID_ARG when | 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. | 66 | * client is NULL, or an SYSLOG_RELAY_E_* error code otherwise. |
67 | */ | 67 | */ |
68 | syslog_relay_error_t syslog_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, syslog_relay_client_t * client); | 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 | 69 | ||
70 | /** | 70 | /** |
71 | * Starts a new syslog_relay service on the specified device and connects to it. | 71 | * Starts a new syslog_relay service on the specified device and connects to it. |
@@ -80,7 +80,7 @@ syslog_relay_error_t syslog_relay_client_new(idevice_t device, lockdownd_service | |||
80 | * @return SYSLOG_RELAY_E_SUCCESS on success, or an SYSLOG_RELAY_E_* error | 80 | * @return SYSLOG_RELAY_E_SUCCESS on success, or an SYSLOG_RELAY_E_* error |
81 | * code otherwise. | 81 | * code otherwise. |
82 | */ | 82 | */ |
83 | syslog_relay_error_t syslog_relay_client_start_service(idevice_t device, syslog_relay_client_t * client, const char* label); | 83 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_start_service(idevice_t device, syslog_relay_client_t * client, const char* label); |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * Disconnects a syslog_relay client from the device and frees up the | 86 | * Disconnects a syslog_relay client from the device and frees up the |
@@ -91,7 +91,7 @@ syslog_relay_error_t syslog_relay_client_start_service(idevice_t device, syslog_ | |||
91 | * @return SYSLOG_RELAY_E_SUCCESS on success, SYSLOG_RELAY_E_INVALID_ARG when | 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. | 92 | * client is NULL, or an SYSLOG_RELAY_E_* error code otherwise. |
93 | */ | 93 | */ |
94 | syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client); | 94 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client); |
95 | 95 | ||
96 | 96 | ||
97 | /** | 97 | /** |
@@ -108,7 +108,7 @@ syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client); | |||
108 | * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified | 108 | * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified |
109 | * error occurs or a syslog capture has already been started. | 109 | * error occurs or a syslog capture has already been started. |
110 | */ | 110 | */ |
111 | syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data); | 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 | 112 | ||
113 | /** | 113 | /** |
114 | * Starts capturing the *raw* syslog of the device using a callback. | 114 | * Starts capturing the *raw* syslog of the device using a callback. |
@@ -129,7 +129,7 @@ syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, sy | |||
129 | * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified | 129 | * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified |
130 | * error occurs or a syslog capture has already been started. | 130 | * error occurs or a syslog capture has already been started. |
131 | */ | 131 | */ |
132 | syslog_relay_error_t syslog_relay_start_capture_raw(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data); | 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 | 133 | ||
134 | /** | 134 | /** |
135 | * Stops capturing the syslog of the device. | 135 | * Stops capturing the syslog of the device. |
@@ -143,7 +143,7 @@ syslog_relay_error_t syslog_relay_start_capture_raw(syslog_relay_client_t client | |||
143 | * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified | 143 | * invalid or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified |
144 | * error occurs or a syslog capture has already been started. | 144 | * error occurs or a syslog capture has already been started. |
145 | */ | 145 | */ |
146 | syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client); | 146 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client); |
147 | 147 | ||
148 | /* Receiving */ | 148 | /* Receiving */ |
149 | 149 | ||
@@ -162,7 +162,7 @@ syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client); | |||
162 | * occurs, or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified | 162 | * occurs, or SYSLOG_RELAY_E_UNKNOWN_ERROR when an unspecified |
163 | * error occurs. | 163 | * error occurs. |
164 | */ | 164 | */ |
165 | 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); | 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 | 166 | ||
167 | /** | 167 | /** |
168 | * Receives data from the service. | 168 | * Receives data from the service. |
@@ -175,7 +175,7 @@ syslog_relay_error_t syslog_relay_receive_with_timeout(syslog_relay_client_t cli | |||
175 | * @return SYSLOG_RELAY_E_SUCCESS on success, | 175 | * @return SYSLOG_RELAY_E_SUCCESS on success, |
176 | * SYSLOG_RELAY_E_INVALID_ARG when client or plist is NULL | 176 | * SYSLOG_RELAY_E_INVALID_ARG when client or plist is NULL |
177 | */ | 177 | */ |
178 | syslog_relay_error_t syslog_relay_receive(syslog_relay_client_t client, char *data, uint32_t size, uint32_t *received); | 178 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_receive(syslog_relay_client_t client, char *data, uint32_t size, uint32_t *received); |
179 | 179 | ||
180 | #ifdef __cplusplus | 180 | #ifdef __cplusplus |
181 | } | 181 | } |
diff --git a/include/libimobiledevice/webinspector.h b/include/libimobiledevice/webinspector.h index 064ba91..16d2ca2 100644 --- a/include/libimobiledevice/webinspector.h +++ b/include/libimobiledevice/webinspector.h | |||
@@ -62,7 +62,7 @@ typedef webinspector_client_private *webinspector_client_t; /**< The client hand | |||
62 | * @return WEBINSPECTOR_E_SUCCESS on success, WEBINSPECTOR_E_INVALID_ARG when | 62 | * @return WEBINSPECTOR_E_SUCCESS on success, WEBINSPECTOR_E_INVALID_ARG when |
63 | * client is NULL, or an WEBINSPECTOR_E_* error code otherwise. | 63 | * client is NULL, or an WEBINSPECTOR_E_* error code otherwise. |
64 | */ | 64 | */ |
65 | webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service_descriptor_t service, webinspector_client_t * client); | 65 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service_descriptor_t service, webinspector_client_t * client); |
66 | 66 | ||
67 | /** | 67 | /** |
68 | * Starts a new webinspector service on the specified device and connects to it. | 68 | * Starts a new webinspector service on the specified device and connects to it. |
@@ -77,7 +77,7 @@ webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service | |||
77 | * @return WEBINSPECTOR_E_SUCCESS on success, or an WEBINSPECTOR_E_* error | 77 | * @return WEBINSPECTOR_E_SUCCESS on success, or an WEBINSPECTOR_E_* error |
78 | * code otherwise. | 78 | * code otherwise. |
79 | */ | 79 | */ |
80 | webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client, const char* label); | 80 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client, const char* label); |
81 | 81 | ||
82 | /** | 82 | /** |
83 | * Disconnects a webinspector client from the device and frees up the | 83 | * Disconnects a webinspector client from the device and frees up the |
@@ -88,7 +88,7 @@ webinspector_error_t webinspector_client_start_service(idevice_t device, webinsp | |||
88 | * @return WEBINSPECTOR_E_SUCCESS on success, WEBINSPECTOR_E_INVALID_ARG when | 88 | * @return WEBINSPECTOR_E_SUCCESS on success, WEBINSPECTOR_E_INVALID_ARG when |
89 | * client is NULL, or an WEBINSPECTOR_E_* error code otherwise. | 89 | * client is NULL, or an WEBINSPECTOR_E_* error code otherwise. |
90 | */ | 90 | */ |
91 | webinspector_error_t webinspector_client_free(webinspector_client_t client); | 91 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_free(webinspector_client_t client); |
92 | 92 | ||
93 | 93 | ||
94 | /** | 94 | /** |
@@ -100,7 +100,7 @@ webinspector_error_t webinspector_client_free(webinspector_client_t client); | |||
100 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, | 100 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, |
101 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when client or plist is NULL | 101 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when client or plist is NULL |
102 | */ | 102 | */ |
103 | webinspector_error_t webinspector_send(webinspector_client_t client, plist_t plist); | 103 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_send(webinspector_client_t client, plist_t plist); |
104 | 104 | ||
105 | /** | 105 | /** |
106 | * Receives a plist from the service. | 106 | * Receives a plist from the service. |
@@ -111,7 +111,7 @@ webinspector_error_t webinspector_send(webinspector_client_t client, plist_t pli | |||
111 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, | 111 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, |
112 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when client or plist is NULL | 112 | * DIAGNOSTICS_RELAY_E_INVALID_ARG when client or plist is NULL |
113 | */ | 113 | */ |
114 | webinspector_error_t webinspector_receive(webinspector_client_t client, plist_t * plist); | 114 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_receive(webinspector_client_t client, plist_t * plist); |
115 | 115 | ||
116 | /** | 116 | /** |
117 | * Receives a plist using the given webinspector client. | 117 | * Receives a plist using the given webinspector client. |
@@ -128,7 +128,7 @@ webinspector_error_t webinspector_receive(webinspector_client_t client, plist_t | |||
128 | * communication error occurs, or WEBINSPECTOR_E_UNKNOWN_ERROR | 128 | * communication error occurs, or WEBINSPECTOR_E_UNKNOWN_ERROR |
129 | * when an unspecified error occurs. | 129 | * when an unspecified error occurs. |
130 | */ | 130 | */ |
131 | webinspector_error_t webinspector_receive_with_timeout(webinspector_client_t client, plist_t * plist, uint32_t timeout_ms); | 131 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_receive_with_timeout(webinspector_client_t client, plist_t * plist, uint32_t timeout_ms); |
132 | 132 | ||
133 | #ifdef __cplusplus | 133 | #ifdef __cplusplus |
134 | } | 134 | } |
@@ -29,8 +29,8 @@ | |||
29 | #include <unistd.h> | 29 | #include <unistd.h> |
30 | #include <string.h> | 30 | #include <string.h> |
31 | 31 | ||
32 | #include "afc.h" | ||
33 | #include "idevice.h" | 32 | #include "idevice.h" |
33 | #include "afc.h" | ||
34 | #include "common/debug.h" | 34 | #include "common/debug.h" |
35 | #include "endianness.h" | 35 | #include "endianness.h" |
36 | 36 | ||
@@ -68,7 +68,7 @@ static void afc_unlock(afc_client_t client) | |||
68 | * invalid, or AFC_E_NO_MEM if there is a memory allocation problem. | 68 | * invalid, or AFC_E_NO_MEM if there is a memory allocation problem. |
69 | */ | 69 | */ |
70 | 70 | ||
71 | LIBIMOBILEDEVICE_API afc_error_t afc_client_new_with_service_client(service_client_t service_client, afc_client_t *client) | 71 | afc_error_t afc_client_new_with_service_client(service_client_t service_client, afc_client_t *client) |
72 | { | 72 | { |
73 | if (!service_client) | 73 | if (!service_client) |
74 | return AFC_E_INVALID_ARG; | 74 | return AFC_E_INVALID_ARG; |
@@ -94,7 +94,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_client_new_with_service_client(service_clie | |||
94 | return AFC_E_SUCCESS; | 94 | return AFC_E_SUCCESS; |
95 | } | 95 | } |
96 | 96 | ||
97 | LIBIMOBILEDEVICE_API afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t service, afc_client_t * client) | 97 | afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t service, afc_client_t * client) |
98 | { | 98 | { |
99 | if (!device || !service || service->port == 0) | 99 | if (!device || !service || service->port == 0) |
100 | return AFC_E_INVALID_ARG; | 100 | return AFC_E_INVALID_ARG; |
@@ -113,14 +113,14 @@ LIBIMOBILEDEVICE_API afc_error_t afc_client_new(idevice_t device, lockdownd_serv | |||
113 | return err; | 113 | return err; |
114 | } | 114 | } |
115 | 115 | ||
116 | LIBIMOBILEDEVICE_API afc_error_t afc_client_start_service(idevice_t device, afc_client_t * client, const char* label) | 116 | afc_error_t afc_client_start_service(idevice_t device, afc_client_t * client, const char* label) |
117 | { | 117 | { |
118 | afc_error_t err = AFC_E_UNKNOWN_ERROR; | 118 | afc_error_t err = AFC_E_UNKNOWN_ERROR; |
119 | service_client_factory_start_service(device, AFC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(afc_client_new), &err); | 119 | service_client_factory_start_service(device, AFC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(afc_client_new), &err); |
120 | return err; | 120 | return err; |
121 | } | 121 | } |
122 | 122 | ||
123 | LIBIMOBILEDEVICE_API afc_error_t afc_client_free(afc_client_t client) | 123 | afc_error_t afc_client_free(afc_client_t client) |
124 | { | 124 | { |
125 | if (!client || !client->afc_packet) | 125 | if (!client || !client->afc_packet) |
126 | return AFC_E_INVALID_ARG; | 126 | return AFC_E_INVALID_ARG; |
@@ -414,7 +414,7 @@ static int _afc_check_packet_buffer(afc_client_t client, uint32_t data_len) | |||
414 | 414 | ||
415 | #define AFC_PACKET_DATA_PTR ((char*)client->afc_packet + sizeof(AFCPacket)) | 415 | #define AFC_PACKET_DATA_PTR ((char*)client->afc_packet + sizeof(AFCPacket)) |
416 | 416 | ||
417 | LIBIMOBILEDEVICE_API afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***directory_information) | 417 | afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***directory_information) |
418 | { | 418 | { |
419 | uint32_t bytes = 0; | 419 | uint32_t bytes = 0; |
420 | char *data = NULL, **list_loc = NULL; | 420 | char *data = NULL, **list_loc = NULL; |
@@ -458,7 +458,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_read_directory(afc_client_t client, const c | |||
458 | return ret; | 458 | return ret; |
459 | } | 459 | } |
460 | 460 | ||
461 | LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info(afc_client_t client, char ***device_information) | 461 | afc_error_t afc_get_device_info(afc_client_t client, char ***device_information) |
462 | { | 462 | { |
463 | uint32_t bytes = 0; | 463 | uint32_t bytes = 0; |
464 | char *data = NULL, **list = NULL; | 464 | char *data = NULL, **list = NULL; |
@@ -495,7 +495,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info(afc_client_t client, char * | |||
495 | return ret; | 495 | return ret; |
496 | } | 496 | } |
497 | 497 | ||
498 | LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char **value) | 498 | afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char **value) |
499 | { | 499 | { |
500 | afc_error_t ret = AFC_E_INTERNAL_ERROR; | 500 | afc_error_t ret = AFC_E_INTERNAL_ERROR; |
501 | char **kvps, **ptr; | 501 | char **kvps, **ptr; |
@@ -522,7 +522,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info_key(afc_client_t client, co | |||
522 | return ret; | 522 | return ret; |
523 | } | 523 | } |
524 | 524 | ||
525 | LIBIMOBILEDEVICE_API afc_error_t afc_remove_path(afc_client_t client, const char *path) | 525 | afc_error_t afc_remove_path(afc_client_t client, const char *path) |
526 | { | 526 | { |
527 | uint32_t bytes = 0; | 527 | uint32_t bytes = 0; |
528 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; | 528 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; |
@@ -558,7 +558,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_remove_path(afc_client_t client, const char | |||
558 | return ret; | 558 | return ret; |
559 | } | 559 | } |
560 | 560 | ||
561 | LIBIMOBILEDEVICE_API afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *to) | 561 | afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *to) |
562 | { | 562 | { |
563 | if (!client || !from || !to || !client->afc_packet || !client->parent) | 563 | if (!client || !from || !to || !client->afc_packet || !client->parent) |
564 | return AFC_E_INVALID_ARG; | 564 | return AFC_E_INVALID_ARG; |
@@ -594,7 +594,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_rename_path(afc_client_t client, const char | |||
594 | return ret; | 594 | return ret; |
595 | } | 595 | } |
596 | 596 | ||
597 | LIBIMOBILEDEVICE_API afc_error_t afc_make_directory(afc_client_t client, const char *path) | 597 | afc_error_t afc_make_directory(afc_client_t client, const char *path) |
598 | { | 598 | { |
599 | uint32_t bytes = 0; | 599 | uint32_t bytes = 0; |
600 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; | 600 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; |
@@ -626,7 +626,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_make_directory(afc_client_t client, const c | |||
626 | return ret; | 626 | return ret; |
627 | } | 627 | } |
628 | 628 | ||
629 | LIBIMOBILEDEVICE_API afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***file_information) | 629 | afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***file_information) |
630 | { | 630 | { |
631 | char *received = NULL; | 631 | char *received = NULL; |
632 | uint32_t bytes = 0; | 632 | uint32_t bytes = 0; |
@@ -666,7 +666,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_get_file_info(afc_client_t client, const ch | |||
666 | return ret; | 666 | return ret; |
667 | } | 667 | } |
668 | 668 | ||
669 | LIBIMOBILEDEVICE_API afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mode_t file_mode, uint64_t *handle) | 669 | afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mode_t file_mode, uint64_t *handle) |
670 | { | 670 | { |
671 | if (!client || !client->parent || !client->afc_packet) | 671 | if (!client || !client->parent || !client->afc_packet) |
672 | return AFC_E_INVALID_ARG; | 672 | return AFC_E_INVALID_ARG; |
@@ -718,7 +718,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_file_open(afc_client_t client, const char * | |||
718 | return ret; | 718 | return ret; |
719 | } | 719 | } |
720 | 720 | ||
721 | LIBIMOBILEDEVICE_API afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint32_t length, uint32_t *bytes_read) | 721 | afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint32_t length, uint32_t *bytes_read) |
722 | { | 722 | { |
723 | char *input = NULL; | 723 | char *input = NULL; |
724 | uint32_t current_count = 0, bytes_loc = 0; | 724 | uint32_t current_count = 0, bytes_loc = 0; |
@@ -774,7 +774,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_file_read(afc_client_t client, uint64_t han | |||
774 | return ret; | 774 | return ret; |
775 | } | 775 | } |
776 | 776 | ||
777 | LIBIMOBILEDEVICE_API afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *data, uint32_t length, uint32_t *bytes_written) | 777 | afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *data, uint32_t length, uint32_t *bytes_written) |
778 | { | 778 | { |
779 | uint32_t current_count = 0; | 779 | uint32_t current_count = 0; |
780 | uint32_t bytes_loc = 0; | 780 | uint32_t bytes_loc = 0; |
@@ -809,7 +809,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_file_write(afc_client_t client, uint64_t ha | |||
809 | return ret; | 809 | return ret; |
810 | } | 810 | } |
811 | 811 | ||
812 | LIBIMOBILEDEVICE_API afc_error_t afc_file_close(afc_client_t client, uint64_t handle) | 812 | afc_error_t afc_file_close(afc_client_t client, uint64_t handle) |
813 | { | 813 | { |
814 | uint32_t bytes = 0; | 814 | uint32_t bytes = 0; |
815 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; | 815 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; |
@@ -840,7 +840,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_file_close(afc_client_t client, uint64_t ha | |||
840 | return ret; | 840 | return ret; |
841 | } | 841 | } |
842 | 842 | ||
843 | LIBIMOBILEDEVICE_API afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t operation) | 843 | afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t operation) |
844 | { | 844 | { |
845 | uint32_t bytes = 0; | 845 | uint32_t bytes = 0; |
846 | struct lockinfo { | 846 | struct lockinfo { |
@@ -874,7 +874,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_file_lock(afc_client_t client, uint64_t han | |||
874 | return ret; | 874 | return ret; |
875 | } | 875 | } |
876 | 876 | ||
877 | LIBIMOBILEDEVICE_API afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, int whence) | 877 | afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, int whence) |
878 | { | 878 | { |
879 | uint32_t bytes = 0; | 879 | uint32_t bytes = 0; |
880 | struct seekinfo { | 880 | struct seekinfo { |
@@ -908,7 +908,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_file_seek(afc_client_t client, uint64_t han | |||
908 | return ret; | 908 | return ret; |
909 | } | 909 | } |
910 | 910 | ||
911 | LIBIMOBILEDEVICE_API afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *position) | 911 | afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *position) |
912 | { | 912 | { |
913 | char *buffer = NULL; | 913 | char *buffer = NULL; |
914 | uint32_t bytes = 0; | 914 | uint32_t bytes = 0; |
@@ -943,7 +943,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_file_tell(afc_client_t client, uint64_t han | |||
943 | return ret; | 943 | return ret; |
944 | } | 944 | } |
945 | 945 | ||
946 | LIBIMOBILEDEVICE_API afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t newsize) | 946 | afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t newsize) |
947 | { | 947 | { |
948 | uint32_t bytes = 0; | 948 | uint32_t bytes = 0; |
949 | struct truncinfo { | 949 | struct truncinfo { |
@@ -975,7 +975,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_file_truncate(afc_client_t client, uint64_t | |||
975 | return ret; | 975 | return ret; |
976 | } | 976 | } |
977 | 977 | ||
978 | LIBIMOBILEDEVICE_API afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize) | 978 | afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize) |
979 | { | 979 | { |
980 | if (!client || !path || !client->afc_packet || !client->parent) | 980 | if (!client || !path || !client->afc_packet || !client->parent) |
981 | return AFC_E_INVALID_ARG; | 981 | return AFC_E_INVALID_ARG; |
@@ -1008,7 +1008,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_truncate(afc_client_t client, const char *p | |||
1008 | return ret; | 1008 | return ret; |
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | LIBIMOBILEDEVICE_API afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const char *target, const char *linkname) | 1011 | afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const char *target, const char *linkname) |
1012 | { | 1012 | { |
1013 | if (!client || !target || !linkname || !client->afc_packet || !client->parent) | 1013 | if (!client || !target || !linkname || !client->afc_packet || !client->parent) |
1014 | return AFC_E_INVALID_ARG; | 1014 | return AFC_E_INVALID_ARG; |
@@ -1049,7 +1049,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_make_link(afc_client_t client, afc_link_typ | |||
1049 | return ret; | 1049 | return ret; |
1050 | } | 1050 | } |
1051 | 1051 | ||
1052 | LIBIMOBILEDEVICE_API afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mtime) | 1052 | afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mtime) |
1053 | { | 1053 | { |
1054 | if (!client || !path || !client->afc_packet || !client->parent) | 1054 | if (!client || !path || !client->afc_packet || !client->parent) |
1055 | return AFC_E_INVALID_ARG; | 1055 | return AFC_E_INVALID_ARG; |
@@ -1082,7 +1082,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_set_file_time(afc_client_t client, const ch | |||
1082 | return ret; | 1082 | return ret; |
1083 | } | 1083 | } |
1084 | 1084 | ||
1085 | LIBIMOBILEDEVICE_API afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path) | 1085 | afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path) |
1086 | { | 1086 | { |
1087 | uint32_t bytes = 0; | 1087 | uint32_t bytes = 0; |
1088 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; | 1088 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; |
@@ -1114,7 +1114,7 @@ LIBIMOBILEDEVICE_API afc_error_t afc_remove_path_and_contents(afc_client_t clien | |||
1114 | return ret; | 1114 | return ret; |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | LIBIMOBILEDEVICE_API afc_error_t afc_dictionary_free(char **dictionary) | 1117 | afc_error_t afc_dictionary_free(char **dictionary) |
1118 | { | 1118 | { |
1119 | int i = 0; | 1119 | int i = 0; |
1120 | 1120 | ||
diff --git a/src/bt_packet_logger.c b/src/bt_packet_logger.c index 5f7bdeb..937747c 100644 --- a/src/bt_packet_logger.c +++ b/src/bt_packet_logger.c | |||
@@ -69,7 +69,7 @@ static bt_packet_logger_error_t bt_packet_logger_error(service_error_t err) | |||
69 | return BT_PACKET_LOGGER_E_UNKNOWN_ERROR; | 69 | return BT_PACKET_LOGGER_E_UNKNOWN_ERROR; |
70 | } | 70 | } |
71 | 71 | ||
72 | LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_client_new(idevice_t device, lockdownd_service_descriptor_t service, bt_packet_logger_client_t * client) | 72 | bt_packet_logger_error_t bt_packet_logger_client_new(idevice_t device, lockdownd_service_descriptor_t service, bt_packet_logger_client_t * client) |
73 | { | 73 | { |
74 | if (!device || !service || service->port == 0 || !client || *client) { | 74 | if (!device || !service || service->port == 0 || !client || *client) { |
75 | debug_info("Incorrect parameter passed to bt_packet_logger_client_new."); | 75 | debug_info("Incorrect parameter passed to bt_packet_logger_client_new."); |
@@ -95,14 +95,14 @@ LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_client_new(idevic | |||
95 | return 0; | 95 | return 0; |
96 | } | 96 | } |
97 | 97 | ||
98 | LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_client_start_service(idevice_t device, bt_packet_logger_client_t * client, const char* label) | 98 | bt_packet_logger_error_t bt_packet_logger_client_start_service(idevice_t device, bt_packet_logger_client_t * client, const char* label) |
99 | { | 99 | { |
100 | bt_packet_logger_error_t err = BT_PACKET_LOGGER_E_UNKNOWN_ERROR; | 100 | bt_packet_logger_error_t err = BT_PACKET_LOGGER_E_UNKNOWN_ERROR; |
101 | service_client_factory_start_service(device, BT_PACKETLOGGER_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(bt_packet_logger_client_new), &err); | 101 | service_client_factory_start_service(device, BT_PACKETLOGGER_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(bt_packet_logger_client_new), &err); |
102 | return err; | 102 | return err; |
103 | } | 103 | } |
104 | 104 | ||
105 | LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_client_free(bt_packet_logger_client_t client) | 105 | bt_packet_logger_error_t bt_packet_logger_client_free(bt_packet_logger_client_t client) |
106 | { | 106 | { |
107 | if (!client) | 107 | if (!client) |
108 | return BT_PACKET_LOGGER_E_INVALID_ARG; | 108 | return BT_PACKET_LOGGER_E_INVALID_ARG; |
@@ -113,7 +113,7 @@ LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_client_free(bt_pa | |||
113 | return err; | 113 | return err; |
114 | } | 114 | } |
115 | 115 | ||
116 | LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_receive_with_timeout(bt_packet_logger_client_t client, char* data, uint32_t size, uint32_t *received, unsigned int timeout) | 116 | bt_packet_logger_error_t bt_packet_logger_receive_with_timeout(bt_packet_logger_client_t client, char* data, uint32_t size, uint32_t *received, unsigned int timeout) |
117 | { | 117 | { |
118 | bt_packet_logger_error_t res = BT_PACKET_LOGGER_E_UNKNOWN_ERROR; | 118 | bt_packet_logger_error_t res = BT_PACKET_LOGGER_E_UNKNOWN_ERROR; |
119 | int bytes = 0; | 119 | int bytes = 0; |
@@ -186,7 +186,7 @@ void *bt_packet_logger_worker(void *arg) | |||
186 | return NULL; | 186 | return NULL; |
187 | } | 187 | } |
188 | 188 | ||
189 | LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_start_capture(bt_packet_logger_client_t client, bt_packet_logger_receive_cb_t callback, void* user_data) | 189 | bt_packet_logger_error_t bt_packet_logger_start_capture(bt_packet_logger_client_t client, bt_packet_logger_receive_cb_t callback, void* user_data) |
190 | { | 190 | { |
191 | if (!client || !callback) | 191 | if (!client || !callback) |
192 | return BT_PACKET_LOGGER_E_INVALID_ARG; | 192 | return BT_PACKET_LOGGER_E_INVALID_ARG; |
@@ -214,7 +214,7 @@ LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_start_capture(bt_ | |||
214 | } | 214 | } |
215 | 215 | ||
216 | 216 | ||
217 | LIBIMOBILEDEVICE_API bt_packet_logger_error_t bt_packet_logger_stop_capture(bt_packet_logger_client_t client) | 217 | bt_packet_logger_error_t bt_packet_logger_stop_capture(bt_packet_logger_client_t client) |
218 | { | 218 | { |
219 | if (client->worker) { | 219 | if (client->worker) { |
220 | /* notify thread to finish */ | 220 | /* notify thread to finish */ |
diff --git a/src/bt_packet_logger.h b/src/bt_packet_logger.h index 95990d5..620555e 100644 --- a/src/bt_packet_logger.h +++ b/src/bt_packet_logger.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef _BR_PACKET_LOGGER_H | 22 | #ifndef _BR_PACKET_LOGGER_H |
23 | #define _BR_PACKET_LOGGER_H | 23 | #define _BR_PACKET_LOGGER_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/bt_packet_logger.h" | 26 | #include "libimobiledevice/bt_packet_logger.h" |
26 | #include "service.h" | 27 | #include "service.h" |
27 | #include <libimobiledevice-glue/thread.h> | 28 | #include <libimobiledevice-glue/thread.h> |
diff --git a/src/companion_proxy.c b/src/companion_proxy.c index 5852904..421fa9a 100644 --- a/src/companion_proxy.c +++ b/src/companion_proxy.c | |||
@@ -62,7 +62,7 @@ static companion_proxy_error_t companion_proxy_error(property_list_service_error | |||
62 | return COMPANION_PROXY_E_UNKNOWN_ERROR; | 62 | return COMPANION_PROXY_E_UNKNOWN_ERROR; |
63 | } | 63 | } |
64 | 64 | ||
65 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, companion_proxy_client_t * client) | 65 | companion_proxy_error_t companion_proxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, companion_proxy_client_t * client) |
66 | { | 66 | { |
67 | *client = NULL; | 67 | *client = NULL; |
68 | 68 | ||
@@ -90,14 +90,14 @@ LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_client_new(idevice_ | |||
90 | return COMPANION_PROXY_E_SUCCESS; | 90 | return COMPANION_PROXY_E_SUCCESS; |
91 | } | 91 | } |
92 | 92 | ||
93 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_client_start_service(idevice_t device, companion_proxy_client_t * client, const char* label) | 93 | companion_proxy_error_t companion_proxy_client_start_service(idevice_t device, companion_proxy_client_t * client, const char* label) |
94 | { | 94 | { |
95 | companion_proxy_error_t err = COMPANION_PROXY_E_UNKNOWN_ERROR; | 95 | companion_proxy_error_t err = COMPANION_PROXY_E_UNKNOWN_ERROR; |
96 | service_client_factory_start_service(device, COMPANION_PROXY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(companion_proxy_client_new), &err); | 96 | service_client_factory_start_service(device, COMPANION_PROXY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(companion_proxy_client_new), &err); |
97 | return err; | 97 | return err; |
98 | } | 98 | } |
99 | 99 | ||
100 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_client_free(companion_proxy_client_t client) | 100 | companion_proxy_error_t companion_proxy_client_free(companion_proxy_client_t client) |
101 | { | 101 | { |
102 | if (!client) | 102 | if (!client) |
103 | return COMPANION_PROXY_E_INVALID_ARG; | 103 | return COMPANION_PROXY_E_INVALID_ARG; |
@@ -116,7 +116,7 @@ LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_client_free(compani | |||
116 | return err; | 116 | return err; |
117 | } | 117 | } |
118 | 118 | ||
119 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_send(companion_proxy_client_t client, plist_t plist) | 119 | companion_proxy_error_t companion_proxy_send(companion_proxy_client_t client, plist_t plist) |
120 | { | 120 | { |
121 | companion_proxy_error_t res = COMPANION_PROXY_E_UNKNOWN_ERROR; | 121 | companion_proxy_error_t res = COMPANION_PROXY_E_UNKNOWN_ERROR; |
122 | 122 | ||
@@ -129,7 +129,7 @@ LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_send(companion_prox | |||
129 | return res; | 129 | return res; |
130 | } | 130 | } |
131 | 131 | ||
132 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_receive(companion_proxy_client_t client, plist_t * plist) | 132 | companion_proxy_error_t companion_proxy_receive(companion_proxy_client_t client, plist_t * plist) |
133 | { | 133 | { |
134 | companion_proxy_error_t res = COMPANION_PROXY_E_UNKNOWN_ERROR; | 134 | companion_proxy_error_t res = COMPANION_PROXY_E_UNKNOWN_ERROR; |
135 | plist_t outplist = NULL; | 135 | plist_t outplist = NULL; |
@@ -143,7 +143,7 @@ LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_receive(companion_p | |||
143 | return res; | 143 | return res; |
144 | } | 144 | } |
145 | 145 | ||
146 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_get_device_registry(companion_proxy_client_t client, plist_t* paired_devices) | 146 | companion_proxy_error_t companion_proxy_get_device_registry(companion_proxy_client_t client, plist_t* paired_devices) |
147 | { | 147 | { |
148 | if (!client || !paired_devices) { | 148 | if (!client || !paired_devices) { |
149 | return COMPANION_PROXY_E_INVALID_ARG; | 149 | return COMPANION_PROXY_E_INVALID_ARG; |
@@ -226,7 +226,7 @@ static void* companion_proxy_event_thread(void* arg) | |||
226 | return NULL; | 226 | return NULL; |
227 | } | 227 | } |
228 | 228 | ||
229 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_start_listening_for_devices(companion_proxy_client_t client, companion_proxy_device_event_cb_t callback, void* userdata) | 229 | companion_proxy_error_t companion_proxy_start_listening_for_devices(companion_proxy_client_t client, companion_proxy_device_event_cb_t callback, void* userdata) |
230 | { | 230 | { |
231 | if (!client || !client->parent || !callback) { | 231 | if (!client || !client->parent || !callback) { |
232 | return COMPANION_PROXY_E_INVALID_ARG; | 232 | return COMPANION_PROXY_E_INVALID_ARG; |
@@ -252,7 +252,7 @@ LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_start_listening_for | |||
252 | return res; | 252 | return res; |
253 | } | 253 | } |
254 | 254 | ||
255 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_stop_listening_for_devices(companion_proxy_client_t client) | 255 | companion_proxy_error_t companion_proxy_stop_listening_for_devices(companion_proxy_client_t client) |
256 | { | 256 | { |
257 | property_list_service_client_t parent = client->parent; | 257 | property_list_service_client_t parent = client->parent; |
258 | client->parent = NULL; | 258 | client->parent = NULL; |
@@ -266,7 +266,7 @@ LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_stop_listening_for_ | |||
266 | return COMPANION_PROXY_E_SUCCESS; | 266 | return COMPANION_PROXY_E_SUCCESS; |
267 | } | 267 | } |
268 | 268 | ||
269 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_get_value_from_registry(companion_proxy_client_t client, const char* companion_udid, const char* key, plist_t* value) | 269 | companion_proxy_error_t companion_proxy_get_value_from_registry(companion_proxy_client_t client, const char* companion_udid, const char* key, plist_t* value) |
270 | { | 270 | { |
271 | if (!client || !companion_udid || !key || !value) { | 271 | if (!client || !companion_udid || !key || !value) { |
272 | return COMPANION_PROXY_E_INVALID_ARG; | 272 | return COMPANION_PROXY_E_INVALID_ARG; |
@@ -310,7 +310,7 @@ LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_get_value_from_regi | |||
310 | return res; | 310 | return res; |
311 | } | 311 | } |
312 | 312 | ||
313 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_start_forwarding_service_port(companion_proxy_client_t client, uint16_t remote_port, const char* service_name, uint16_t* forward_port, plist_t options) | 313 | companion_proxy_error_t companion_proxy_start_forwarding_service_port(companion_proxy_client_t client, uint16_t remote_port, const char* service_name, uint16_t* forward_port, plist_t options) |
314 | { | 314 | { |
315 | if (!client) { | 315 | if (!client) { |
316 | return COMPANION_PROXY_E_INVALID_ARG; | 316 | return COMPANION_PROXY_E_INVALID_ARG; |
@@ -353,7 +353,7 @@ LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_start_forwarding_se | |||
353 | return res; | 353 | return res; |
354 | } | 354 | } |
355 | 355 | ||
356 | LIBIMOBILEDEVICE_API companion_proxy_error_t companion_proxy_stop_forwarding_service_port(companion_proxy_client_t client, uint16_t remote_port) | 356 | companion_proxy_error_t companion_proxy_stop_forwarding_service_port(companion_proxy_client_t client, uint16_t remote_port) |
357 | { | 357 | { |
358 | if (!client) { | 358 | if (!client) { |
359 | return COMPANION_PROXY_E_INVALID_ARG; | 359 | return COMPANION_PROXY_E_INVALID_ARG; |
diff --git a/src/companion_proxy.h b/src/companion_proxy.h index 0226640..e36932a 100644 --- a/src/companion_proxy.h +++ b/src/companion_proxy.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __COMPANION_PROXY_H | 22 | #ifndef __COMPANION_PROXY_H |
23 | #define __COMPANION_PROXY_H | 23 | #define __COMPANION_PROXY_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/companion_proxy.h" | 26 | #include "libimobiledevice/companion_proxy.h" |
26 | #include "property_list_service.h" | 27 | #include "property_list_service.h" |
27 | #include <libimobiledevice-glue/thread.h> | 28 | #include <libimobiledevice-glue/thread.h> |
diff --git a/src/debugserver.c b/src/debugserver.c index 39c1bdc..74ade8a 100644 --- a/src/debugserver.c +++ b/src/debugserver.c | |||
@@ -64,7 +64,7 @@ static debugserver_error_t debugserver_error(service_error_t err) | |||
64 | return DEBUGSERVER_E_UNKNOWN_ERROR; | 64 | return DEBUGSERVER_E_UNKNOWN_ERROR; |
65 | } | 65 | } |
66 | 66 | ||
67 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_new(idevice_t device, lockdownd_service_descriptor_t service, debugserver_client_t* client) | 67 | debugserver_error_t debugserver_client_new(idevice_t device, lockdownd_service_descriptor_t service, debugserver_client_t* client) |
68 | { | 68 | { |
69 | *client = NULL; | 69 | *client = NULL; |
70 | 70 | ||
@@ -98,7 +98,7 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_new(idevice_t device | |||
98 | return DEBUGSERVER_E_SUCCESS; | 98 | return DEBUGSERVER_E_SUCCESS; |
99 | } | 99 | } |
100 | 100 | ||
101 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_start_service(idevice_t device, debugserver_client_t * client, const char* label) | 101 | debugserver_error_t debugserver_client_start_service(idevice_t device, debugserver_client_t * client, const char* label) |
102 | { | 102 | { |
103 | debugserver_error_t err = DEBUGSERVER_E_UNKNOWN_ERROR; | 103 | debugserver_error_t err = DEBUGSERVER_E_UNKNOWN_ERROR; |
104 | service_client_factory_start_service(device, DEBUGSERVER_SECURE_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(debugserver_client_new), &err); | 104 | service_client_factory_start_service(device, DEBUGSERVER_SECURE_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(debugserver_client_new), &err); |
@@ -109,7 +109,7 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_start_service(idevic | |||
109 | return err; | 109 | return err; |
110 | } | 110 | } |
111 | 111 | ||
112 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_free(debugserver_client_t client) | 112 | debugserver_error_t debugserver_client_free(debugserver_client_t client) |
113 | { | 113 | { |
114 | if (!client) | 114 | if (!client) |
115 | return DEBUGSERVER_E_INVALID_ARG; | 115 | return DEBUGSERVER_E_INVALID_ARG; |
@@ -121,7 +121,7 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_free(debugserver_cli | |||
121 | return err; | 121 | return err; |
122 | } | 122 | } |
123 | 123 | ||
124 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_send(debugserver_client_t client, const char* data, uint32_t size, uint32_t *sent) | 124 | debugserver_error_t debugserver_client_send(debugserver_client_t client, const char* data, uint32_t size, uint32_t *sent) |
125 | { | 125 | { |
126 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; | 126 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; |
127 | int bytes = 0; | 127 | int bytes = 0; |
@@ -142,7 +142,7 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_send(debugserver_cli | |||
142 | return res; | 142 | return res; |
143 | } | 143 | } |
144 | 144 | ||
145 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive_with_timeout(debugserver_client_t client, char* data, uint32_t size, uint32_t *received, unsigned int timeout) | 145 | debugserver_error_t debugserver_client_receive_with_timeout(debugserver_client_t client, char* data, uint32_t size, uint32_t *received, unsigned int timeout) |
146 | { | 146 | { |
147 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; | 147 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; |
148 | int bytes = 0; | 148 | int bytes = 0; |
@@ -162,7 +162,7 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive_with_timeout | |||
162 | return (bytes > 0) ? DEBUGSERVER_E_SUCCESS : res; | 162 | return (bytes > 0) ? DEBUGSERVER_E_SUCCESS : res; |
163 | } | 163 | } |
164 | 164 | ||
165 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive(debugserver_client_t client, char* data, uint32_t size, uint32_t *received) | 165 | debugserver_error_t debugserver_client_receive(debugserver_client_t client, char* data, uint32_t size, uint32_t *received) |
166 | { | 166 | { |
167 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; | 167 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; |
168 | do { | 168 | do { |
@@ -172,7 +172,7 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive(debugserver_ | |||
172 | return res; | 172 | return res; |
173 | } | 173 | } |
174 | 174 | ||
175 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_command_new(const char* name, int argc, char* argv[], debugserver_command_t* command) | 175 | debugserver_error_t debugserver_command_new(const char* name, int argc, char* argv[], debugserver_command_t* command) |
176 | { | 176 | { |
177 | int i; | 177 | int i; |
178 | debugserver_command_t tmp = (debugserver_command_t) malloc(sizeof(struct debugserver_command_private)); | 178 | debugserver_command_t tmp = (debugserver_command_t) malloc(sizeof(struct debugserver_command_private)); |
@@ -197,7 +197,7 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_command_new(const char* nam | |||
197 | return DEBUGSERVER_E_SUCCESS; | 197 | return DEBUGSERVER_E_SUCCESS; |
198 | } | 198 | } |
199 | 199 | ||
200 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_command_free(debugserver_command_t command) | 200 | debugserver_error_t debugserver_command_free(debugserver_command_t command) |
201 | { | 201 | { |
202 | int i; | 202 | int i; |
203 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; | 203 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; |
@@ -275,7 +275,7 @@ static int debugserver_response_is_checksum_valid(const char* response, uint32_t | |||
275 | return 1; | 275 | return 1; |
276 | } | 276 | } |
277 | 277 | ||
278 | LIBIMOBILEDEVICE_API void debugserver_encode_string(const char* buffer, char** encoded_buffer, uint32_t* encoded_length) | 278 | void debugserver_encode_string(const char* buffer, char** encoded_buffer, uint32_t* encoded_length) |
279 | { | 279 | { |
280 | uint32_t position; | 280 | uint32_t position; |
281 | uint32_t index; | 281 | uint32_t index; |
@@ -291,7 +291,7 @@ LIBIMOBILEDEVICE_API void debugserver_encode_string(const char* buffer, char** e | |||
291 | } | 291 | } |
292 | } | 292 | } |
293 | 293 | ||
294 | LIBIMOBILEDEVICE_API void debugserver_decode_string(const char *encoded_buffer, size_t encoded_length, char** buffer) | 294 | void debugserver_decode_string(const char *encoded_buffer, size_t encoded_length, char** buffer) |
295 | { | 295 | { |
296 | *buffer = malloc(sizeof(char) * ((encoded_length / 2)+1)); | 296 | *buffer = malloc(sizeof(char) * ((encoded_length / 2)+1)); |
297 | char* t = *buffer; | 297 | char* t = *buffer; |
@@ -350,7 +350,7 @@ static debugserver_error_t debugserver_client_send_noack(debugserver_client_t cl | |||
350 | return debugserver_client_send(client, "-", sizeof(char), NULL); | 350 | return debugserver_client_send(client, "-", sizeof(char), NULL); |
351 | } | 351 | } |
352 | 352 | ||
353 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_ack_mode(debugserver_client_t client, int enabled) | 353 | debugserver_error_t debugserver_client_set_ack_mode(debugserver_client_t client, int enabled) |
354 | { | 354 | { |
355 | if (!client) | 355 | if (!client) |
356 | return DEBUGSERVER_E_INVALID_ARG; | 356 | return DEBUGSERVER_E_INVALID_ARG; |
@@ -362,7 +362,7 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_ack_mode(debugse | |||
362 | return DEBUGSERVER_E_SUCCESS; | 362 | return DEBUGSERVER_E_SUCCESS; |
363 | } | 363 | } |
364 | 364 | ||
365 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_receive_params(debugserver_client_t client, int (*cancel_receive)(), int receive_loop_timeout) | 365 | debugserver_error_t debugserver_client_set_receive_params(debugserver_client_t client, int (*cancel_receive)(), int receive_loop_timeout) |
366 | { | 366 | { |
367 | if (!client) | 367 | if (!client) |
368 | return DEBUGSERVER_E_INVALID_ARG; | 368 | return DEBUGSERVER_E_INVALID_ARG; |
@@ -392,7 +392,7 @@ static debugserver_error_t debugserver_client_receive_internal_char(debugserver_ | |||
392 | return res; | 392 | return res; |
393 | } | 393 | } |
394 | 394 | ||
395 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive_response(debugserver_client_t client, char** response, size_t* response_size) | 395 | debugserver_error_t debugserver_client_receive_response(debugserver_client_t client, char** response, size_t* response_size) |
396 | { | 396 | { |
397 | debugserver_error_t res = DEBUGSERVER_E_SUCCESS; | 397 | debugserver_error_t res = DEBUGSERVER_E_SUCCESS; |
398 | 398 | ||
@@ -503,7 +503,7 @@ cleanup: | |||
503 | return res; | 503 | return res; |
504 | } | 504 | } |
505 | 505 | ||
506 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_send_command(debugserver_client_t client, debugserver_command_t command, char** response, size_t* response_size) | 506 | debugserver_error_t debugserver_client_send_command(debugserver_client_t client, debugserver_command_t command, char** response, size_t* response_size) |
507 | { | 507 | { |
508 | debugserver_error_t res = DEBUGSERVER_E_SUCCESS; | 508 | debugserver_error_t res = DEBUGSERVER_E_SUCCESS; |
509 | int i; | 509 | int i; |
@@ -559,7 +559,7 @@ cleanup: | |||
559 | return res; | 559 | return res; |
560 | } | 560 | } |
561 | 561 | ||
562 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_environment_hex_encoded(debugserver_client_t client, const char* env, char** response) | 562 | debugserver_error_t debugserver_client_set_environment_hex_encoded(debugserver_client_t client, const char* env, char** response) |
563 | { | 563 | { |
564 | if (!client || !env) | 564 | if (!client || !env) |
565 | return DEBUGSERVER_E_INVALID_ARG; | 565 | return DEBUGSERVER_E_INVALID_ARG; |
@@ -578,7 +578,7 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_environment_hex_ | |||
578 | return result; | 578 | return result; |
579 | } | 579 | } |
580 | 580 | ||
581 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_argv(debugserver_client_t client, int argc, char* argv[], char** response) | 581 | debugserver_error_t debugserver_client_set_argv(debugserver_client_t client, int argc, char* argv[], char** response) |
582 | { | 582 | { |
583 | if (!client || !argc) | 583 | if (!client || !argc) |
584 | return DEBUGSERVER_E_INVALID_ARG; | 584 | return DEBUGSERVER_E_INVALID_ARG; |
diff --git a/src/debugserver.h b/src/debugserver.h index ee3ba62..ce9c255 100644 --- a/src/debugserver.h +++ b/src/debugserver.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef _DEBUGSERVER_H | 22 | #ifndef _DEBUGSERVER_H |
23 | #define _DEBUGSERVER_H | 23 | #define _DEBUGSERVER_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/debugserver.h" | 26 | #include "libimobiledevice/debugserver.h" |
26 | #include "service.h" | 27 | #include "service.h" |
27 | 28 | ||
diff --git a/src/device_link_service.h b/src/device_link_service.h index eae912a..0255b21 100644 --- a/src/device_link_service.h +++ b/src/device_link_service.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __DEVICE_LINK_SERVICE_H | 22 | #ifndef __DEVICE_LINK_SERVICE_H |
23 | #define __DEVICE_LINK_SERVICE_H | 23 | #define __DEVICE_LINK_SERVICE_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "property_list_service.h" | 26 | #include "property_list_service.h" |
26 | 27 | ||
27 | /* Error Codes */ | 28 | /* Error Codes */ |
diff --git a/src/diagnostics_relay.c b/src/diagnostics_relay.c index 5444fcc..6ee3150 100644 --- a/src/diagnostics_relay.c +++ b/src/diagnostics_relay.c | |||
@@ -73,7 +73,7 @@ static int diagnostics_relay_check_result(plist_t dict) | |||
73 | return ret; | 73 | return ret; |
74 | } | 74 | } |
75 | 75 | ||
76 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, diagnostics_relay_client_t *client) | 76 | diagnostics_relay_error_t diagnostics_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, diagnostics_relay_client_t *client) |
77 | { | 77 | { |
78 | if (!device || !service || service->port == 0 || !client || *client) { | 78 | if (!device || !service || service->port == 0 || !client || *client) { |
79 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 79 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
@@ -93,14 +93,14 @@ LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_client_new(idev | |||
93 | return DIAGNOSTICS_RELAY_E_SUCCESS; | 93 | return DIAGNOSTICS_RELAY_E_SUCCESS; |
94 | } | 94 | } |
95 | 95 | ||
96 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_client_start_service(idevice_t device, diagnostics_relay_client_t * client, const char* label) | 96 | diagnostics_relay_error_t diagnostics_relay_client_start_service(idevice_t device, diagnostics_relay_client_t * client, const char* label) |
97 | { | 97 | { |
98 | diagnostics_relay_error_t err = DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR; | 98 | diagnostics_relay_error_t err = DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR; |
99 | service_client_factory_start_service(device, DIAGNOSTICS_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(diagnostics_relay_client_new), &err); | 99 | service_client_factory_start_service(device, DIAGNOSTICS_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(diagnostics_relay_client_new), &err); |
100 | return err; | 100 | return err; |
101 | } | 101 | } |
102 | 102 | ||
103 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_client_free(diagnostics_relay_client_t client) | 103 | diagnostics_relay_error_t diagnostics_relay_client_free(diagnostics_relay_client_t client) |
104 | { | 104 | { |
105 | if (!client) | 105 | if (!client) |
106 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 106 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
@@ -167,7 +167,7 @@ static diagnostics_relay_error_t diagnostics_relay_send(diagnostics_relay_client | |||
167 | return ret; | 167 | return ret; |
168 | } | 168 | } |
169 | 169 | ||
170 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_goodbye(diagnostics_relay_client_t client) | 170 | diagnostics_relay_error_t diagnostics_relay_goodbye(diagnostics_relay_client_t client) |
171 | { | 171 | { |
172 | if (!client) | 172 | if (!client) |
173 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 173 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
@@ -201,7 +201,7 @@ LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_goodbye(diagnos | |||
201 | return ret; | 201 | return ret; |
202 | } | 202 | } |
203 | 203 | ||
204 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_sleep(diagnostics_relay_client_t client) | 204 | diagnostics_relay_error_t diagnostics_relay_sleep(diagnostics_relay_client_t client) |
205 | { | 205 | { |
206 | if (!client) | 206 | if (!client) |
207 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 207 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
@@ -277,17 +277,17 @@ static diagnostics_relay_error_t internal_diagnostics_relay_action(diagnostics_r | |||
277 | return ret; | 277 | return ret; |
278 | } | 278 | } |
279 | 279 | ||
280 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_restart(diagnostics_relay_client_t client, diagnostics_relay_action_t flags) | 280 | diagnostics_relay_error_t diagnostics_relay_restart(diagnostics_relay_client_t client, diagnostics_relay_action_t flags) |
281 | { | 281 | { |
282 | return internal_diagnostics_relay_action(client, "Restart", flags); | 282 | return internal_diagnostics_relay_action(client, "Restart", flags); |
283 | } | 283 | } |
284 | 284 | ||
285 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t client, diagnostics_relay_action_t flags) | 285 | diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t client, diagnostics_relay_action_t flags) |
286 | { | 286 | { |
287 | return internal_diagnostics_relay_action(client, "Shutdown", flags); | 287 | return internal_diagnostics_relay_action(client, "Shutdown", flags); |
288 | } | 288 | } |
289 | 289 | ||
290 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_relay_client_t client, const char* type, plist_t* diagnostics) | 290 | diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_relay_client_t client, const char* type, plist_t* diagnostics) |
291 | { | 291 | { |
292 | if (!client || diagnostics == NULL) | 292 | if (!client || diagnostics == NULL) |
293 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 293 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
@@ -331,7 +331,7 @@ LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_request_diagnos | |||
331 | return ret; | 331 | return ret; |
332 | } | 332 | } |
333 | 333 | ||
334 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_relay_client_t client, plist_t keys, plist_t* result) | 334 | diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_relay_client_t client, plist_t keys, plist_t* result) |
335 | { | 335 | { |
336 | if (!client || plist_get_node_type(keys) != PLIST_ARRAY || result == NULL) | 336 | if (!client || plist_get_node_type(keys) != PLIST_ARRAY || result == NULL) |
337 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 337 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
@@ -376,7 +376,7 @@ LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_query_mobileges | |||
376 | return ret; | 376 | return ret; |
377 | } | 377 | } |
378 | 378 | ||
379 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_relay_client_t client, const char* entry_name, const char* entry_class, plist_t* result) | 379 | diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_relay_client_t client, const char* entry_name, const char* entry_class, plist_t* result) |
380 | { | 380 | { |
381 | if (!client || (entry_name == NULL && entry_class == NULL) || result == NULL) | 381 | if (!client || (entry_name == NULL && entry_class == NULL) || result == NULL) |
382 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 382 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
@@ -424,7 +424,7 @@ LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_query_ioregistr | |||
424 | return ret; | 424 | return ret; |
425 | } | 425 | } |
426 | 426 | ||
427 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_query_ioregistry_plane(diagnostics_relay_client_t client, const char* plane, plist_t* result) | 427 | diagnostics_relay_error_t diagnostics_relay_query_ioregistry_plane(diagnostics_relay_client_t client, const char* plane, plist_t* result) |
428 | { | 428 | { |
429 | if (!client || plane == NULL || result == NULL) | 429 | if (!client || plane == NULL || result == NULL) |
430 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 430 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
diff --git a/src/diagnostics_relay.h b/src/diagnostics_relay.h index 6d11ea1..3bb543a 100644 --- a/src/diagnostics_relay.h +++ b/src/diagnostics_relay.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __DIAGNOSTICS_RELAY_H | 22 | #ifndef __DIAGNOSTICS_RELAY_H |
23 | #define __DIAGNOSTICS_RELAY_H | 23 | #define __DIAGNOSTICS_RELAY_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/diagnostics_relay.h" | 26 | #include "libimobiledevice/diagnostics_relay.h" |
26 | #include "property_list_service.h" | 27 | #include "property_list_service.h" |
27 | 28 | ||
diff --git a/src/file_relay.c b/src/file_relay.c index aa77ae6..fbe7cbf 100644 --- a/src/file_relay.c +++ b/src/file_relay.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include "property_list_service.h" | 28 | #include "property_list_service.h" |
29 | #include "common/debug.h" | 29 | #include "common/debug.h" |
30 | 30 | ||
31 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, file_relay_client_t *client) | 31 | file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, file_relay_client_t *client) |
32 | { | 32 | { |
33 | if (!device || !service || service->port == 0 || !client || *client) { | 33 | if (!device || !service || service->port == 0 || !client || *client) { |
34 | return FILE_RELAY_E_INVALID_ARG; | 34 | return FILE_RELAY_E_INVALID_ARG; |
@@ -48,14 +48,14 @@ LIBIMOBILEDEVICE_API file_relay_error_t file_relay_client_new(idevice_t device, | |||
48 | return FILE_RELAY_E_SUCCESS; | 48 | return FILE_RELAY_E_SUCCESS; |
49 | } | 49 | } |
50 | 50 | ||
51 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_client_start_service(idevice_t device, file_relay_client_t * client, const char* label) | 51 | file_relay_error_t file_relay_client_start_service(idevice_t device, file_relay_client_t * client, const char* label) |
52 | { | 52 | { |
53 | file_relay_error_t err = FILE_RELAY_E_UNKNOWN_ERROR; | 53 | file_relay_error_t err = FILE_RELAY_E_UNKNOWN_ERROR; |
54 | service_client_factory_start_service(device, FILE_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(file_relay_client_new), &err); | 54 | service_client_factory_start_service(device, FILE_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(file_relay_client_new), &err); |
55 | return err; | 55 | return err; |
56 | } | 56 | } |
57 | 57 | ||
58 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_client_free(file_relay_client_t client) | 58 | file_relay_error_t file_relay_client_free(file_relay_client_t client) |
59 | { | 59 | { |
60 | if (!client) | 60 | if (!client) |
61 | return FILE_RELAY_E_INVALID_ARG; | 61 | return FILE_RELAY_E_INVALID_ARG; |
@@ -67,7 +67,7 @@ LIBIMOBILEDEVICE_API file_relay_error_t file_relay_client_free(file_relay_client | |||
67 | return FILE_RELAY_E_SUCCESS; | 67 | return FILE_RELAY_E_SUCCESS; |
68 | } | 68 | } |
69 | 69 | ||
70 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_request_sources_timeout(file_relay_client_t client, const char **sources, idevice_connection_t *connection, unsigned int timeout) | 70 | file_relay_error_t file_relay_request_sources_timeout(file_relay_client_t client, const char **sources, idevice_connection_t *connection, unsigned int timeout) |
71 | { | 71 | { |
72 | if (!client || !client->parent || !sources || !sources[0]) { | 72 | if (!client || !client->parent || !sources || !sources[0]) { |
73 | return FILE_RELAY_E_INVALID_ARG; | 73 | return FILE_RELAY_E_INVALID_ARG; |
@@ -159,7 +159,7 @@ leave: | |||
159 | return err; | 159 | return err; |
160 | } | 160 | } |
161 | 161 | ||
162 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, idevice_connection_t *connection) | 162 | file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, idevice_connection_t *connection) |
163 | { | 163 | { |
164 | return file_relay_request_sources_timeout(client, sources, connection, 60000); | 164 | return file_relay_request_sources_timeout(client, sources, connection, 60000); |
165 | } | 165 | } |
diff --git a/src/file_relay.h b/src/file_relay.h index 626fab8..65bf460 100644 --- a/src/file_relay.h +++ b/src/file_relay.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __FILE_RELAY_H | 22 | #ifndef __FILE_RELAY_H |
23 | #define __FILE_RELAY_H | 23 | #define __FILE_RELAY_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/file_relay.h" | 26 | #include "libimobiledevice/file_relay.h" |
26 | #include "property_list_service.h" | 27 | #include "property_list_service.h" |
27 | 28 | ||
diff --git a/src/heartbeat.c b/src/heartbeat.c index 9a527cc..3945d73 100644 --- a/src/heartbeat.c +++ b/src/heartbeat.c | |||
@@ -62,7 +62,7 @@ static heartbeat_error_t heartbeat_error(property_list_service_error_t err) | |||
62 | return HEARTBEAT_E_UNKNOWN_ERROR; | 62 | return HEARTBEAT_E_UNKNOWN_ERROR; |
63 | } | 63 | } |
64 | 64 | ||
65 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descriptor_t service, heartbeat_client_t * client) | 65 | heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descriptor_t service, heartbeat_client_t * client) |
66 | { | 66 | { |
67 | *client = NULL; | 67 | *client = NULL; |
68 | 68 | ||
@@ -89,14 +89,14 @@ LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_client_new(idevice_t device, lo | |||
89 | return 0; | 89 | return 0; |
90 | } | 90 | } |
91 | 91 | ||
92 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client, const char* label) | 92 | heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client, const char* label) |
93 | { | 93 | { |
94 | heartbeat_error_t err = HEARTBEAT_E_UNKNOWN_ERROR; | 94 | heartbeat_error_t err = HEARTBEAT_E_UNKNOWN_ERROR; |
95 | service_client_factory_start_service(device, HEARTBEAT_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(heartbeat_client_new), &err); | 95 | service_client_factory_start_service(device, HEARTBEAT_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(heartbeat_client_new), &err); |
96 | return err; | 96 | return err; |
97 | } | 97 | } |
98 | 98 | ||
99 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_client_free(heartbeat_client_t client) | 99 | heartbeat_error_t heartbeat_client_free(heartbeat_client_t client) |
100 | { | 100 | { |
101 | if (!client) | 101 | if (!client) |
102 | return HEARTBEAT_E_INVALID_ARG; | 102 | return HEARTBEAT_E_INVALID_ARG; |
@@ -107,7 +107,7 @@ LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_client_free(heartbeat_client_t | |||
107 | return err; | 107 | return err; |
108 | } | 108 | } |
109 | 109 | ||
110 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_send(heartbeat_client_t client, plist_t plist) | 110 | heartbeat_error_t heartbeat_send(heartbeat_client_t client, plist_t plist) |
111 | { | 111 | { |
112 | heartbeat_error_t res = HEARTBEAT_E_UNKNOWN_ERROR; | 112 | heartbeat_error_t res = HEARTBEAT_E_UNKNOWN_ERROR; |
113 | 113 | ||
@@ -122,12 +122,12 @@ LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_send(heartbeat_client_t client, | |||
122 | return res; | 122 | return res; |
123 | } | 123 | } |
124 | 124 | ||
125 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_receive(heartbeat_client_t client, plist_t * plist) | 125 | heartbeat_error_t heartbeat_receive(heartbeat_client_t client, plist_t * plist) |
126 | { | 126 | { |
127 | return heartbeat_receive_with_timeout(client, plist, 1000); | 127 | return heartbeat_receive_with_timeout(client, plist, 1000); |
128 | } | 128 | } |
129 | 129 | ||
130 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_receive_with_timeout(heartbeat_client_t client, plist_t * plist, uint32_t timeout_ms) | 130 | heartbeat_error_t heartbeat_receive_with_timeout(heartbeat_client_t client, plist_t * plist, uint32_t timeout_ms) |
131 | { | 131 | { |
132 | heartbeat_error_t res = HEARTBEAT_E_UNKNOWN_ERROR; | 132 | heartbeat_error_t res = HEARTBEAT_E_UNKNOWN_ERROR; |
133 | plist_t outplist = NULL; | 133 | plist_t outplist = NULL; |
diff --git a/src/heartbeat.h b/src/heartbeat.h index f648681..379ecc1 100644 --- a/src/heartbeat.h +++ b/src/heartbeat.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __HEARTBEAT_H | 22 | #ifndef __HEARTBEAT_H |
23 | #define __HEARTBEAT_H | 23 | #define __HEARTBEAT_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/heartbeat.h" | 26 | #include "libimobiledevice/heartbeat.h" |
26 | #include "property_list_service.h" | 27 | #include "property_list_service.h" |
27 | 28 | ||
diff --git a/src/house_arrest.c b/src/house_arrest.c index ac92130..caad731 100644 --- a/src/house_arrest.c +++ b/src/house_arrest.c | |||
@@ -58,7 +58,7 @@ static house_arrest_error_t house_arrest_error(property_list_service_error_t err | |||
58 | return HOUSE_ARREST_E_UNKNOWN_ERROR; | 58 | return HOUSE_ARREST_E_UNKNOWN_ERROR; |
59 | } | 59 | } |
60 | 60 | ||
61 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_client_new(idevice_t device, lockdownd_service_descriptor_t service, house_arrest_client_t *client) | 61 | house_arrest_error_t house_arrest_client_new(idevice_t device, lockdownd_service_descriptor_t service, house_arrest_client_t *client) |
62 | { | 62 | { |
63 | property_list_service_client_t plistclient = NULL; | 63 | property_list_service_client_t plistclient = NULL; |
64 | house_arrest_error_t err = house_arrest_error(property_list_service_client_new(device, service, &plistclient)); | 64 | house_arrest_error_t err = house_arrest_error(property_list_service_client_new(device, service, &plistclient)); |
@@ -74,14 +74,14 @@ LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_client_new(idevice_t devi | |||
74 | return HOUSE_ARREST_E_SUCCESS; | 74 | return HOUSE_ARREST_E_SUCCESS; |
75 | } | 75 | } |
76 | 76 | ||
77 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_client_start_service(idevice_t device, house_arrest_client_t * client, const char* label) | 77 | house_arrest_error_t house_arrest_client_start_service(idevice_t device, house_arrest_client_t * client, const char* label) |
78 | { | 78 | { |
79 | house_arrest_error_t err = HOUSE_ARREST_E_UNKNOWN_ERROR; | 79 | house_arrest_error_t err = HOUSE_ARREST_E_UNKNOWN_ERROR; |
80 | service_client_factory_start_service(device, HOUSE_ARREST_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(house_arrest_client_new), &err); | 80 | service_client_factory_start_service(device, HOUSE_ARREST_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(house_arrest_client_new), &err); |
81 | return err; | 81 | return err; |
82 | } | 82 | } |
83 | 83 | ||
84 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_client_free(house_arrest_client_t client) | 84 | house_arrest_error_t house_arrest_client_free(house_arrest_client_t client) |
85 | { | 85 | { |
86 | if (!client) | 86 | if (!client) |
87 | return HOUSE_ARREST_E_INVALID_ARG; | 87 | return HOUSE_ARREST_E_INVALID_ARG; |
@@ -96,7 +96,7 @@ LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_client_free(house_arrest_ | |||
96 | return err; | 96 | return err; |
97 | } | 97 | } |
98 | 98 | ||
99 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_send_request(house_arrest_client_t client, plist_t dict) | 99 | house_arrest_error_t house_arrest_send_request(house_arrest_client_t client, plist_t dict) |
100 | { | 100 | { |
101 | if (!client || !client->parent || !dict) | 101 | if (!client || !client->parent || !dict) |
102 | return HOUSE_ARREST_E_INVALID_ARG; | 102 | return HOUSE_ARREST_E_INVALID_ARG; |
@@ -112,7 +112,7 @@ LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_send_request(house_arrest | |||
112 | return res; | 112 | return res; |
113 | } | 113 | } |
114 | 114 | ||
115 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_send_command(house_arrest_client_t client, const char *command, const char *appid) | 115 | house_arrest_error_t house_arrest_send_command(house_arrest_client_t client, const char *command, const char *appid) |
116 | { | 116 | { |
117 | if (!client || !client->parent || !command || !appid) | 117 | if (!client || !client->parent || !command || !appid) |
118 | return HOUSE_ARREST_E_INVALID_ARG; | 118 | return HOUSE_ARREST_E_INVALID_ARG; |
@@ -132,7 +132,7 @@ LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_send_command(house_arrest | |||
132 | return res; | 132 | return res; |
133 | } | 133 | } |
134 | 134 | ||
135 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_get_result(house_arrest_client_t client, plist_t *dict) | 135 | house_arrest_error_t house_arrest_get_result(house_arrest_client_t client, plist_t *dict) |
136 | { | 136 | { |
137 | if (!client || !client->parent) | 137 | if (!client || !client->parent) |
138 | return HOUSE_ARREST_E_INVALID_ARG; | 138 | return HOUSE_ARREST_E_INVALID_ARG; |
@@ -150,7 +150,7 @@ LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_get_result(house_arrest_c | |||
150 | return res; | 150 | return res; |
151 | } | 151 | } |
152 | 152 | ||
153 | LIBIMOBILEDEVICE_API afc_error_t afc_client_new_from_house_arrest_client(house_arrest_client_t client, afc_client_t *afc_client) | 153 | afc_error_t afc_client_new_from_house_arrest_client(house_arrest_client_t client, afc_client_t *afc_client) |
154 | { | 154 | { |
155 | if (!client || !client->parent || (client->mode == HOUSE_ARREST_CLIENT_MODE_AFC)) { | 155 | if (!client || !client->parent || (client->mode == HOUSE_ARREST_CLIENT_MODE_AFC)) { |
156 | return AFC_E_INVALID_ARG; | 156 | return AFC_E_INVALID_ARG; |
diff --git a/src/house_arrest.h b/src/house_arrest.h index 387594f..5612a29 100644 --- a/src/house_arrest.h +++ b/src/house_arrest.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __HOUSE_ARREST_H | 22 | #ifndef __HOUSE_ARREST_H |
23 | #define __HOUSE_ARREST_H | 23 | #define __HOUSE_ARREST_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/house_arrest.h" | 26 | #include "libimobiledevice/house_arrest.h" |
26 | #include "property_list_service.h" | 27 | #include "property_list_service.h" |
27 | 28 | ||
diff --git a/src/idevice.c b/src/idevice.c index 19b171c..ed1cf3c 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
@@ -248,7 +248,7 @@ static void usbmux_event_cb(const usbmuxd_event_t *event, void *user_data) | |||
248 | } | 248 | } |
249 | } | 249 | } |
250 | 250 | ||
251 | LIBIMOBILEDEVICE_API idevice_error_t idevice_events_subscribe(idevice_subscription_context_t *context, idevice_event_cb_t callback, void *user_data) | 251 | idevice_error_t idevice_events_subscribe(idevice_subscription_context_t *context, idevice_event_cb_t callback, void *user_data) |
252 | { | 252 | { |
253 | if (!context || !callback) { | 253 | if (!context || !callback) { |
254 | return IDEVICE_E_INVALID_ARG; | 254 | return IDEVICE_E_INVALID_ARG; |
@@ -270,7 +270,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_events_subscribe(idevice_subscripti | |||
270 | return IDEVICE_E_SUCCESS; | 270 | return IDEVICE_E_SUCCESS; |
271 | } | 271 | } |
272 | 272 | ||
273 | LIBIMOBILEDEVICE_API idevice_error_t idevice_events_unsubscribe(idevice_subscription_context_t context) | 273 | idevice_error_t idevice_events_unsubscribe(idevice_subscription_context_t context) |
274 | { | 274 | { |
275 | if (!context) { | 275 | if (!context) { |
276 | return IDEVICE_E_INVALID_ARG; | 276 | return IDEVICE_E_INVALID_ARG; |
@@ -287,7 +287,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_events_unsubscribe(idevice_subscrip | |||
287 | return IDEVICE_E_SUCCESS; | 287 | return IDEVICE_E_SUCCESS; |
288 | } | 288 | } |
289 | 289 | ||
290 | LIBIMOBILEDEVICE_API idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data) | 290 | idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data) |
291 | { | 291 | { |
292 | if (event_ctx) { | 292 | if (event_ctx) { |
293 | idevice_events_unsubscribe(event_ctx); | 293 | idevice_events_unsubscribe(event_ctx); |
@@ -295,7 +295,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_event_subscribe(idevice_event_cb_t | |||
295 | return idevice_events_subscribe(&event_ctx, callback, user_data); | 295 | return idevice_events_subscribe(&event_ctx, callback, user_data); |
296 | } | 296 | } |
297 | 297 | ||
298 | LIBIMOBILEDEVICE_API idevice_error_t idevice_event_unsubscribe(void) | 298 | idevice_error_t idevice_event_unsubscribe(void) |
299 | { | 299 | { |
300 | if (!event_ctx) { | 300 | if (!event_ctx) { |
301 | return IDEVICE_E_SUCCESS; | 301 | return IDEVICE_E_SUCCESS; |
@@ -304,7 +304,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_event_unsubscribe(void) | |||
304 | return idevice_events_unsubscribe(event_ctx); | 304 | return idevice_events_unsubscribe(event_ctx); |
305 | } | 305 | } |
306 | 306 | ||
307 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_device_list_extended(idevice_info_t **devices, int *count) | 307 | idevice_error_t idevice_get_device_list_extended(idevice_info_t **devices, int *count) |
308 | { | 308 | { |
309 | usbmuxd_device_info_t *dev_list; | 309 | usbmuxd_device_info_t *dev_list; |
310 | 310 | ||
@@ -359,7 +359,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_get_device_list_extended(idevice_in | |||
359 | return IDEVICE_E_SUCCESS; | 359 | return IDEVICE_E_SUCCESS; |
360 | } | 360 | } |
361 | 361 | ||
362 | LIBIMOBILEDEVICE_API idevice_error_t idevice_device_list_extended_free(idevice_info_t *devices) | 362 | idevice_error_t idevice_device_list_extended_free(idevice_info_t *devices) |
363 | { | 363 | { |
364 | if (devices) { | 364 | if (devices) { |
365 | int i = 0; | 365 | int i = 0; |
@@ -374,7 +374,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_device_list_extended_free(idevice_i | |||
374 | return IDEVICE_E_SUCCESS; | 374 | return IDEVICE_E_SUCCESS; |
375 | } | 375 | } |
376 | 376 | ||
377 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_device_list(char ***devices, int *count) | 377 | idevice_error_t idevice_get_device_list(char ***devices, int *count) |
378 | { | 378 | { |
379 | usbmuxd_device_info_t *dev_list; | 379 | usbmuxd_device_info_t *dev_list; |
380 | 380 | ||
@@ -406,7 +406,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_get_device_list(char ***devices, in | |||
406 | return IDEVICE_E_SUCCESS; | 406 | return IDEVICE_E_SUCCESS; |
407 | } | 407 | } |
408 | 408 | ||
409 | LIBIMOBILEDEVICE_API idevice_error_t idevice_device_list_free(char **devices) | 409 | idevice_error_t idevice_device_list_free(char **devices) |
410 | { | 410 | { |
411 | if (devices) { | 411 | if (devices) { |
412 | int i = 0; | 412 | int i = 0; |
@@ -419,7 +419,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_device_list_free(char **devices) | |||
419 | return IDEVICE_E_SUCCESS; | 419 | return IDEVICE_E_SUCCESS; |
420 | } | 420 | } |
421 | 421 | ||
422 | LIBIMOBILEDEVICE_API void idevice_set_debug_level(int level) | 422 | void idevice_set_debug_level(int level) |
423 | { | 423 | { |
424 | internal_set_debug_level(level); | 424 | internal_set_debug_level(level); |
425 | } | 425 | } |
@@ -472,7 +472,7 @@ static idevice_t idevice_from_mux_device(usbmuxd_device_info_t *muxdev) | |||
472 | return device; | 472 | return device; |
473 | } | 473 | } |
474 | 474 | ||
475 | LIBIMOBILEDEVICE_API idevice_error_t idevice_new_with_options(idevice_t * device, const char *udid, enum idevice_options options) | 475 | idevice_error_t idevice_new_with_options(idevice_t * device, const char *udid, enum idevice_options options) |
476 | { | 476 | { |
477 | usbmuxd_device_info_t muxdev; | 477 | usbmuxd_device_info_t muxdev; |
478 | int usbmux_options = 0; | 478 | int usbmux_options = 0; |
@@ -496,12 +496,12 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_new_with_options(idevice_t * device | |||
496 | return IDEVICE_E_NO_DEVICE; | 496 | return IDEVICE_E_NO_DEVICE; |
497 | } | 497 | } |
498 | 498 | ||
499 | LIBIMOBILEDEVICE_API idevice_error_t idevice_new(idevice_t * device, const char *udid) | 499 | idevice_error_t idevice_new(idevice_t * device, const char *udid) |
500 | { | 500 | { |
501 | return idevice_new_with_options(device, udid, 0); | 501 | return idevice_new_with_options(device, udid, 0); |
502 | } | 502 | } |
503 | 503 | ||
504 | LIBIMOBILEDEVICE_API idevice_error_t idevice_free(idevice_t device) | 504 | idevice_error_t idevice_free(idevice_t device) |
505 | { | 505 | { |
506 | if (!device) | 506 | if (!device) |
507 | return IDEVICE_E_INVALID_ARG; | 507 | return IDEVICE_E_INVALID_ARG; |
@@ -518,7 +518,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_free(idevice_t device) | |||
518 | return ret; | 518 | return ret; |
519 | } | 519 | } |
520 | 520 | ||
521 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connection_t *connection) | 521 | idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connection_t *connection) |
522 | { | 522 | { |
523 | if (!device) { | 523 | if (!device) { |
524 | return IDEVICE_E_INVALID_ARG; | 524 | return IDEVICE_E_INVALID_ARG; |
@@ -599,7 +599,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connect(idevice_t device, uint16_t | |||
599 | return IDEVICE_E_UNKNOWN_ERROR; | 599 | return IDEVICE_E_UNKNOWN_ERROR; |
600 | } | 600 | } |
601 | 601 | ||
602 | LIBIMOBILEDEVICE_API idevice_error_t idevice_disconnect(idevice_connection_t connection) | 602 | idevice_error_t idevice_disconnect(idevice_connection_t connection) |
603 | { | 603 | { |
604 | if (!connection) { | 604 | if (!connection) { |
605 | return IDEVICE_E_INVALID_ARG; | 605 | return IDEVICE_E_INVALID_ARG; |
@@ -662,7 +662,7 @@ static idevice_error_t internal_connection_send(idevice_connection_t connection, | |||
662 | 662 | ||
663 | } | 663 | } |
664 | 664 | ||
665 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_send(idevice_connection_t connection, const char *data, uint32_t len, uint32_t *sent_bytes) | 665 | idevice_error_t idevice_connection_send(idevice_connection_t connection, const char *data, uint32_t len, uint32_t *sent_bytes) |
666 | { | 666 | { |
667 | if (!connection || !data | 667 | if (!connection || !data |
668 | #if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS) | 668 | #if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS) |
@@ -777,7 +777,7 @@ static idevice_error_t internal_connection_receive_timeout(idevice_connection_t | |||
777 | return IDEVICE_E_UNKNOWN_ERROR; | 777 | return IDEVICE_E_UNKNOWN_ERROR; |
778 | } | 778 | } |
779 | 779 | ||
780 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_receive_timeout(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout) | 780 | idevice_error_t idevice_connection_receive_timeout(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout) |
781 | { | 781 | { |
782 | if (!connection | 782 | if (!connection |
783 | #if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS) | 783 | #if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS) |
@@ -876,7 +876,7 @@ static idevice_error_t internal_connection_receive(idevice_connection_t connecti | |||
876 | return IDEVICE_E_UNKNOWN_ERROR; | 876 | return IDEVICE_E_UNKNOWN_ERROR; |
877 | } | 877 | } |
878 | 878 | ||
879 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_receive(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes) | 879 | idevice_error_t idevice_connection_receive(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes) |
880 | { | 880 | { |
881 | if (!connection | 881 | if (!connection |
882 | #if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS) | 882 | #if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS) |
@@ -909,7 +909,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_receive(idevice_connecti | |||
909 | return internal_connection_receive(connection, data, len, recv_bytes); | 909 | return internal_connection_receive(connection, data, len, recv_bytes); |
910 | } | 910 | } |
911 | 911 | ||
912 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_get_fd(idevice_connection_t connection, int *fd) | 912 | idevice_error_t idevice_connection_get_fd(idevice_connection_t connection, int *fd) |
913 | { | 913 | { |
914 | if (!connection || !fd) { | 914 | if (!connection || !fd) { |
915 | return IDEVICE_E_INVALID_ARG; | 915 | return IDEVICE_E_INVALID_ARG; |
@@ -928,7 +928,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_get_fd(idevice_connectio | |||
928 | return IDEVICE_E_UNKNOWN_ERROR; | 928 | return IDEVICE_E_UNKNOWN_ERROR; |
929 | } | 929 | } |
930 | 930 | ||
931 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle) | 931 | idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle) |
932 | { | 932 | { |
933 | if (!device || !handle) | 933 | if (!device || !handle) |
934 | return IDEVICE_E_INVALID_ARG; | 934 | return IDEVICE_E_INVALID_ARG; |
@@ -937,7 +937,7 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_get_handle(idevice_t device, uint32 | |||
937 | return IDEVICE_E_SUCCESS; | 937 | return IDEVICE_E_SUCCESS; |
938 | } | 938 | } |
939 | 939 | ||
940 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_udid(idevice_t device, char **udid) | 940 | idevice_error_t idevice_get_udid(idevice_t device, char **udid) |
941 | { | 941 | { |
942 | if (!device || !udid) | 942 | if (!device || !udid) |
943 | return IDEVICE_E_INVALID_ARG; | 943 | return IDEVICE_E_INVALID_ARG; |
@@ -1186,7 +1186,7 @@ static int _mbedtls_f_rng(void* p_rng, unsigned char* buf, size_t len) | |||
1186 | } | 1186 | } |
1187 | #endif | 1187 | #endif |
1188 | 1188 | ||
1189 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection) | 1189 | idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection) |
1190 | { | 1190 | { |
1191 | if (!connection || connection->ssl_data) | 1191 | if (!connection || connection->ssl_data) |
1192 | return IDEVICE_E_INVALID_ARG; | 1192 | return IDEVICE_E_INVALID_ARG; |
@@ -1489,12 +1489,12 @@ LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_conne | |||
1489 | return ret; | 1489 | return ret; |
1490 | } | 1490 | } |
1491 | 1491 | ||
1492 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_disable_ssl(idevice_connection_t connection) | 1492 | idevice_error_t idevice_connection_disable_ssl(idevice_connection_t connection) |
1493 | { | 1493 | { |
1494 | return idevice_connection_disable_bypass_ssl(connection, 0); | 1494 | return idevice_connection_disable_bypass_ssl(connection, 0); |
1495 | } | 1495 | } |
1496 | 1496 | ||
1497 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_disable_bypass_ssl(idevice_connection_t connection, uint8_t sslBypass) | 1497 | idevice_error_t idevice_connection_disable_bypass_ssl(idevice_connection_t connection, uint8_t sslBypass) |
1498 | { | 1498 | { |
1499 | if (!connection) | 1499 | if (!connection) |
1500 | return IDEVICE_E_INVALID_ARG; | 1500 | return IDEVICE_E_INVALID_ARG; |
diff --git a/src/idevice.h b/src/idevice.h index 2509e48..dd72f9d 100644 --- a/src/idevice.h +++ b/src/idevice.h | |||
@@ -37,14 +37,16 @@ | |||
37 | #include <mbedtls/ctr_drbg.h> | 37 | #include <mbedtls/ctr_drbg.h> |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #ifdef WIN32 | 40 | #ifdef LIBIMOBILEDEVICE_STATIC |
41 | #define LIBIMOBILEDEVICE_API __declspec( dllexport ) | 41 | #define LIBIMOBILEDEVICE_API |
42 | #elif defined(_WIN32) | ||
43 | #define LIBIMOBILEDEVICE_API __declspec( dllexport ) | ||
42 | #else | 44 | #else |
43 | #ifdef HAVE_FVISIBILITY | 45 | #if __GNUC__ >= 4 |
44 | #define LIBIMOBILEDEVICE_API __attribute__((visibility("default"))) | 46 | #define LIBIMOBILEDEVICE_API __attribute__((visibility("default"))) |
45 | #else | 47 | #else |
46 | #define LIBIMOBILEDEVICE_API | 48 | #define LIBIMOBILEDEVICE_API |
47 | #endif | 49 | #endif |
48 | #endif | 50 | #endif |
49 | 51 | ||
50 | #include "common/userpref.h" | 52 | #include "common/userpref.h" |
diff --git a/src/installation_proxy.c b/src/installation_proxy.c index 9602876..ec19da0 100644 --- a/src/installation_proxy.c +++ b/src/installation_proxy.c | |||
@@ -232,7 +232,7 @@ static instproxy_error_t instproxy_error(property_list_service_error_t err) | |||
232 | return INSTPROXY_E_UNKNOWN_ERROR; | 232 | return INSTPROXY_E_UNKNOWN_ERROR; |
233 | } | 233 | } |
234 | 234 | ||
235 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client) | 235 | instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client) |
236 | { | 236 | { |
237 | property_list_service_client_t plistclient = NULL; | 237 | property_list_service_client_t plistclient = NULL; |
238 | instproxy_error_t err = instproxy_error(property_list_service_client_new(device, service, &plistclient)); | 238 | instproxy_error_t err = instproxy_error(property_list_service_client_new(device, service, &plistclient)); |
@@ -249,14 +249,14 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_new(idevice_t device, lo | |||
249 | return INSTPROXY_E_SUCCESS; | 249 | return INSTPROXY_E_SUCCESS; |
250 | } | 250 | } |
251 | 251 | ||
252 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label) | 252 | instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label) |
253 | { | 253 | { |
254 | instproxy_error_t err = INSTPROXY_E_UNKNOWN_ERROR; | 254 | instproxy_error_t err = INSTPROXY_E_UNKNOWN_ERROR; |
255 | service_client_factory_start_service(device, INSTPROXY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(instproxy_client_new), &err); | 255 | service_client_factory_start_service(device, INSTPROXY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(instproxy_client_new), &err); |
256 | return err; | 256 | return err; |
257 | } | 257 | } |
258 | 258 | ||
259 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_free(instproxy_client_t client) | 259 | instproxy_error_t instproxy_client_free(instproxy_client_t client) |
260 | { | 260 | { |
261 | if (!client) | 261 | if (!client) |
262 | return INSTPROXY_E_INVALID_ARG; | 262 | return INSTPROXY_E_INVALID_ARG; |
@@ -525,7 +525,7 @@ static instproxy_error_t instproxy_perform_command(instproxy_client_t client, pl | |||
525 | return res; | 525 | return res; |
526 | } | 526 | } |
527 | 527 | ||
528 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_browse_with_callback(instproxy_client_t client, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 528 | instproxy_error_t instproxy_browse_with_callback(instproxy_client_t client, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
529 | { | 529 | { |
530 | if (!client || !client->parent || !status_cb) | 530 | if (!client || !client->parent || !status_cb) |
531 | return INSTPROXY_E_INVALID_ARG; | 531 | return INSTPROXY_E_INVALID_ARG; |
@@ -566,7 +566,7 @@ static void instproxy_append_current_list_to_result_cb(plist_t command, plist_t | |||
566 | plist_free(current_list); | 566 | plist_free(current_list); |
567 | } | 567 | } |
568 | 568 | ||
569 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result) | 569 | instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result) |
570 | { | 570 | { |
571 | if (!client || !client->parent || !result) | 571 | if (!client || !client->parent || !result) |
572 | return INSTPROXY_E_INVALID_ARG; | 572 | return INSTPROXY_E_INVALID_ARG; |
@@ -603,7 +603,7 @@ static void instproxy_copy_lookup_result_cb(plist_t command, plist_t status, voi | |||
603 | } | 603 | } |
604 | } | 604 | } |
605 | 605 | ||
606 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup(instproxy_client_t client, const char** appids, plist_t client_options, plist_t *result) | 606 | instproxy_error_t instproxy_lookup(instproxy_client_t client, const char** appids, plist_t client_options, plist_t *result) |
607 | { | 607 | { |
608 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 608 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
609 | int i = 0; | 609 | int i = 0; |
@@ -650,7 +650,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup(instproxy_client_t clien | |||
650 | return res; | 650 | return res; |
651 | } | 651 | } |
652 | 652 | ||
653 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_install(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 653 | instproxy_error_t instproxy_install(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
654 | { | 654 | { |
655 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 655 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
656 | 656 | ||
@@ -667,7 +667,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_install(instproxy_client_t clie | |||
667 | return res; | 667 | return res; |
668 | } | 668 | } |
669 | 669 | ||
670 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_upgrade(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 670 | instproxy_error_t instproxy_upgrade(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
671 | { | 671 | { |
672 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 672 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
673 | 673 | ||
@@ -684,7 +684,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_upgrade(instproxy_client_t clie | |||
684 | return res; | 684 | return res; |
685 | } | 685 | } |
686 | 686 | ||
687 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 687 | instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
688 | { | 688 | { |
689 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 689 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
690 | 690 | ||
@@ -701,7 +701,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_uninstall(instproxy_client_t cl | |||
701 | return res; | 701 | return res; |
702 | } | 702 | } |
703 | 703 | ||
704 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result) | 704 | instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result) |
705 | { | 705 | { |
706 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 706 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
707 | 707 | ||
@@ -717,7 +717,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup_archives(instproxy_clien | |||
717 | return res; | 717 | return res; |
718 | } | 718 | } |
719 | 719 | ||
720 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 720 | instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
721 | { | 721 | { |
722 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 722 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
723 | 723 | ||
@@ -734,7 +734,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_archive(instproxy_client_t clie | |||
734 | return res; | 734 | return res; |
735 | } | 735 | } |
736 | 736 | ||
737 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 737 | instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
738 | { | 738 | { |
739 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 739 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
740 | 740 | ||
@@ -751,7 +751,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_restore(instproxy_client_t clie | |||
751 | return res; | 751 | return res; |
752 | } | 752 | } |
753 | 753 | ||
754 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 754 | instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
755 | { | 755 | { |
756 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 756 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
757 | 757 | ||
@@ -768,7 +768,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_remove_archive(instproxy_client | |||
768 | return res; | 768 | return res; |
769 | } | 769 | } |
770 | 770 | ||
771 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_check_capabilities_match(instproxy_client_t client, const char** capabilities, plist_t client_options, plist_t *result) | 771 | instproxy_error_t instproxy_check_capabilities_match(instproxy_client_t client, const char** capabilities, plist_t client_options, plist_t *result) |
772 | { | 772 | { |
773 | if (!client || !capabilities || !result) | 773 | if (!client || !capabilities || !result) |
774 | return INSTPROXY_E_INVALID_ARG; | 774 | return INSTPROXY_E_INVALID_ARG; |
@@ -805,7 +805,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_check_capabilities_match(instpr | |||
805 | return res; | 805 | return res; |
806 | } | 806 | } |
807 | 807 | ||
808 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_status_get_error(plist_t status, char **name, char** description, uint64_t* code) | 808 | instproxy_error_t instproxy_status_get_error(plist_t status, char **name, char** description, uint64_t* code) |
809 | { | 809 | { |
810 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 810 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
811 | 811 | ||
@@ -843,7 +843,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_status_get_error(plist_t status | |||
843 | return res; | 843 | return res; |
844 | } | 844 | } |
845 | 845 | ||
846 | LIBIMOBILEDEVICE_API void instproxy_status_get_name(plist_t status, char **name) | 846 | void instproxy_status_get_name(plist_t status, char **name) |
847 | { | 847 | { |
848 | if (name) { | 848 | if (name) { |
849 | plist_t node = plist_dict_get_item(status, "Status"); | 849 | plist_t node = plist_dict_get_item(status, "Status"); |
@@ -855,7 +855,7 @@ LIBIMOBILEDEVICE_API void instproxy_status_get_name(plist_t status, char **name) | |||
855 | } | 855 | } |
856 | } | 856 | } |
857 | 857 | ||
858 | LIBIMOBILEDEVICE_API void instproxy_status_get_percent_complete(plist_t status, int *percent) | 858 | void instproxy_status_get_percent_complete(plist_t status, int *percent) |
859 | { | 859 | { |
860 | uint64_t val = 0; | 860 | uint64_t val = 0; |
861 | if (percent) { | 861 | if (percent) { |
@@ -867,7 +867,7 @@ LIBIMOBILEDEVICE_API void instproxy_status_get_percent_complete(plist_t status, | |||
867 | } | 867 | } |
868 | } | 868 | } |
869 | 869 | ||
870 | LIBIMOBILEDEVICE_API void instproxy_status_get_current_list(plist_t status, uint64_t* total, uint64_t* current_index, uint64_t* current_amount, plist_t* list) | 870 | void instproxy_status_get_current_list(plist_t status, uint64_t* total, uint64_t* current_index, uint64_t* current_amount, plist_t* list) |
871 | { | 871 | { |
872 | plist_t node = NULL; | 872 | plist_t node = NULL; |
873 | 873 | ||
@@ -904,7 +904,7 @@ LIBIMOBILEDEVICE_API void instproxy_status_get_current_list(plist_t status, uint | |||
904 | } | 904 | } |
905 | } | 905 | } |
906 | 906 | ||
907 | LIBIMOBILEDEVICE_API void instproxy_command_get_name(plist_t command, char** name) | 907 | void instproxy_command_get_name(plist_t command, char** name) |
908 | { | 908 | { |
909 | if (name) { | 909 | if (name) { |
910 | plist_t node = plist_dict_get_item(command, "Command"); | 910 | plist_t node = plist_dict_get_item(command, "Command"); |
@@ -916,12 +916,12 @@ LIBIMOBILEDEVICE_API void instproxy_command_get_name(plist_t command, char** nam | |||
916 | } | 916 | } |
917 | } | 917 | } |
918 | 918 | ||
919 | LIBIMOBILEDEVICE_API plist_t instproxy_client_options_new(void) | 919 | plist_t instproxy_client_options_new(void) |
920 | { | 920 | { |
921 | return plist_new_dict(); | 921 | return plist_new_dict(); |
922 | } | 922 | } |
923 | 923 | ||
924 | LIBIMOBILEDEVICE_API void instproxy_client_options_add(plist_t client_options, ...) | 924 | void instproxy_client_options_add(plist_t client_options, ...) |
925 | { | 925 | { |
926 | if (!client_options) | 926 | if (!client_options) |
927 | return; | 927 | return; |
@@ -955,7 +955,7 @@ LIBIMOBILEDEVICE_API void instproxy_client_options_add(plist_t client_options, . | |||
955 | va_end(args); | 955 | va_end(args); |
956 | } | 956 | } |
957 | 957 | ||
958 | LIBIMOBILEDEVICE_API void instproxy_client_options_set_return_attributes(plist_t client_options, ...) | 958 | void instproxy_client_options_set_return_attributes(plist_t client_options, ...) |
959 | { | 959 | { |
960 | if (!client_options) | 960 | if (!client_options) |
961 | return; | 961 | return; |
@@ -976,14 +976,14 @@ LIBIMOBILEDEVICE_API void instproxy_client_options_set_return_attributes(plist_t | |||
976 | plist_dict_set_item(client_options, "ReturnAttributes", return_attributes); | 976 | plist_dict_set_item(client_options, "ReturnAttributes", return_attributes); |
977 | } | 977 | } |
978 | 978 | ||
979 | LIBIMOBILEDEVICE_API void instproxy_client_options_free(plist_t client_options) | 979 | void instproxy_client_options_free(plist_t client_options) |
980 | { | 980 | { |
981 | if (client_options) { | 981 | if (client_options) { |
982 | plist_free(client_options); | 982 | plist_free(client_options); |
983 | } | 983 | } |
984 | } | 984 | } |
985 | 985 | ||
986 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* bundle_id, char** path) | 986 | instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* bundle_id, char** path) |
987 | { | 987 | { |
988 | if (!client || !client->parent || !bundle_id) | 988 | if (!client || !client->parent || !bundle_id) |
989 | return INSTPROXY_E_INVALID_ARG; | 989 | return INSTPROXY_E_INVALID_ARG; |
diff --git a/src/installation_proxy.h b/src/installation_proxy.h index 033bdef..5bdbb71 100644 --- a/src/installation_proxy.h +++ b/src/installation_proxy.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #ifndef __INSTALLATION_PROXY_H | 23 | #ifndef __INSTALLATION_PROXY_H |
24 | #define __INSTALLATION_PROXY_H | 24 | #define __INSTALLATION_PROXY_H |
25 | 25 | ||
26 | #include "idevice.h" | ||
26 | #include "libimobiledevice/installation_proxy.h" | 27 | #include "libimobiledevice/installation_proxy.h" |
27 | #include "property_list_service.h" | 28 | #include "property_list_service.h" |
28 | #include <libimobiledevice-glue/thread.h> | 29 | #include <libimobiledevice-glue/thread.h> |
diff --git a/src/lockdown-cu.c b/src/lockdown-cu.c index e527652..1afc2c5 100644 --- a/src/lockdown-cu.c +++ b/src/lockdown-cu.c | |||
@@ -490,7 +490,7 @@ static void chacha20_poly1305_decrypt_64(unsigned char* key, unsigned char* nonc | |||
490 | 490 | ||
491 | #endif /* HAVE_WIRELESS_PAIRING */ | 491 | #endif /* HAVE_WIRELESS_PAIRING */ |
492 | 492 | ||
493 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_cu_pairing_create(lockdownd_client_t client, lockdownd_cu_pairing_cb_t pairing_callback, void* cb_user_data, plist_t host_info, plist_t acl) | 493 | lockdownd_error_t lockdownd_cu_pairing_create(lockdownd_client_t client, lockdownd_cu_pairing_cb_t pairing_callback, void* cb_user_data, plist_t host_info, plist_t acl) |
494 | { | 494 | { |
495 | #ifdef HAVE_WIRELESS_PAIRING | 495 | #ifdef HAVE_WIRELESS_PAIRING |
496 | if (!client || !pairing_callback || (host_info && plist_get_node_type(host_info) != PLIST_DICT) || (acl && plist_get_node_type(acl) != PLIST_DICT)) | 496 | if (!client || !pairing_callback || (host_info && plist_get_node_type(host_info) != PLIST_DICT) || (acl && plist_get_node_type(acl) != PLIST_DICT)) |
@@ -932,7 +932,7 @@ debug_buffer(data, data_len); | |||
932 | #endif | 932 | #endif |
933 | } | 933 | } |
934 | 934 | ||
935 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_cu_send_request_and_get_reply(lockdownd_client_t client, const char* request, plist_t request_payload, plist_t* reply) | 935 | lockdownd_error_t lockdownd_cu_send_request_and_get_reply(lockdownd_client_t client, const char* request, plist_t request_payload, plist_t* reply) |
936 | { | 936 | { |
937 | #ifdef HAVE_WIRELESS_PAIRING | 937 | #ifdef HAVE_WIRELESS_PAIRING |
938 | if (!client || !request) | 938 | if (!client || !request) |
@@ -1057,7 +1057,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_cu_send_request_and_get_reply(l | |||
1057 | #endif | 1057 | #endif |
1058 | } | 1058 | } |
1059 | 1059 | ||
1060 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_value_cu(lockdownd_client_t client, const char* domain, const char* key, plist_t* value) | 1060 | lockdownd_error_t lockdownd_get_value_cu(lockdownd_client_t client, const char* domain, const char* key, plist_t* value) |
1061 | { | 1061 | { |
1062 | #ifdef HAVE_WIRELESS_PAIRING | 1062 | #ifdef HAVE_WIRELESS_PAIRING |
1063 | if (!client) | 1063 | if (!client) |
@@ -1097,7 +1097,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_value_cu(lockdownd_client_t | |||
1097 | #endif | 1097 | #endif |
1098 | } | 1098 | } |
1099 | 1099 | ||
1100 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_pair_cu(lockdownd_client_t client) | 1100 | lockdownd_error_t lockdownd_pair_cu(lockdownd_client_t client) |
1101 | { | 1101 | { |
1102 | #ifdef HAVE_WIRELESS_PAIRING | 1102 | #ifdef HAVE_WIRELESS_PAIRING |
1103 | if (!client) | 1103 | if (!client) |
diff --git a/src/lockdown.c b/src/lockdown.c index 92af186..256bff0 100644 --- a/src/lockdown.c +++ b/src/lockdown.c | |||
@@ -226,7 +226,7 @@ static void plist_dict_add_label(plist_t plist, const char *label) | |||
226 | } | 226 | } |
227 | } | 227 | } |
228 | 228 | ||
229 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id) | 229 | lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id) |
230 | { | 230 | { |
231 | if (!client) | 231 | if (!client) |
232 | return LOCKDOWN_E_INVALID_ARG; | 232 | return LOCKDOWN_E_INVALID_ARG; |
@@ -309,7 +309,7 @@ static lockdownd_error_t lockdownd_client_free_simple(lockdownd_client_t client) | |||
309 | return ret; | 309 | return ret; |
310 | } | 310 | } |
311 | 311 | ||
312 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_client_free(lockdownd_client_t client) | 312 | lockdownd_error_t lockdownd_client_free(lockdownd_client_t client) |
313 | { | 313 | { |
314 | if (!client) | 314 | if (!client) |
315 | return LOCKDOWN_E_INVALID_ARG; | 315 | return LOCKDOWN_E_INVALID_ARG; |
@@ -325,7 +325,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_client_free(lockdownd_client_t | |||
325 | return ret; | 325 | return ret; |
326 | } | 326 | } |
327 | 327 | ||
328 | LIBIMOBILEDEVICE_API void lockdownd_client_set_label(lockdownd_client_t client, const char *label) | 328 | void lockdownd_client_set_label(lockdownd_client_t client, const char *label) |
329 | { | 329 | { |
330 | if (client) { | 330 | if (client) { |
331 | if (client->label) | 331 | if (client->label) |
@@ -335,7 +335,7 @@ LIBIMOBILEDEVICE_API void lockdownd_client_set_label(lockdownd_client_t client, | |||
335 | } | 335 | } |
336 | } | 336 | } |
337 | 337 | ||
338 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist_t *plist) | 338 | lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist_t *plist) |
339 | { | 339 | { |
340 | if (!client || !plist || (plist && *plist)) | 340 | if (!client || !plist || (plist && *plist)) |
341 | return LOCKDOWN_E_INVALID_ARG; | 341 | return LOCKDOWN_E_INVALID_ARG; |
@@ -343,7 +343,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_receive(lockdownd_client_t clie | |||
343 | return lockdownd_error(property_list_service_receive_plist(client->parent, plist)); | 343 | return lockdownd_error(property_list_service_receive_plist(client->parent, plist)); |
344 | } | 344 | } |
345 | 345 | ||
346 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist) | 346 | lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist) |
347 | { | 347 | { |
348 | if (!client || !plist) | 348 | if (!client || !plist) |
349 | return LOCKDOWN_E_INVALID_ARG; | 349 | return LOCKDOWN_E_INVALID_ARG; |
@@ -351,7 +351,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_send(lockdownd_client_t client, | |||
351 | return lockdownd_error(property_list_service_send_xml_plist(client->parent, plist)); | 351 | return lockdownd_error(property_list_service_send_xml_plist(client->parent, plist)); |
352 | } | 352 | } |
353 | 353 | ||
354 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type) | 354 | lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type) |
355 | { | 355 | { |
356 | if (!client) | 356 | if (!client) |
357 | return LOCKDOWN_E_INVALID_ARG; | 357 | return LOCKDOWN_E_INVALID_ARG; |
@@ -396,7 +396,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_query_type(lockdownd_client_t c | |||
396 | return ret; | 396 | return ret; |
397 | } | 397 | } |
398 | 398 | ||
399 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *domain, const char *key, plist_t *value) | 399 | lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *domain, const char *key, plist_t *value) |
400 | { | 400 | { |
401 | if (!client) | 401 | if (!client) |
402 | return LOCKDOWN_E_INVALID_ARG; | 402 | return LOCKDOWN_E_INVALID_ARG; |
@@ -450,7 +450,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_value(lockdownd_client_t cl | |||
450 | return ret; | 450 | return ret; |
451 | } | 451 | } |
452 | 452 | ||
453 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value) | 453 | lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value) |
454 | { | 454 | { |
455 | if (!client || !value) | 455 | if (!client || !value) |
456 | return LOCKDOWN_E_INVALID_ARG; | 456 | return LOCKDOWN_E_INVALID_ARG; |
@@ -498,7 +498,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_set_value(lockdownd_client_t cl | |||
498 | return ret; | 498 | return ret; |
499 | } | 499 | } |
500 | 500 | ||
501 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key) | 501 | lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key) |
502 | { | 502 | { |
503 | if (!client) | 503 | if (!client) |
504 | return LOCKDOWN_E_INVALID_ARG; | 504 | return LOCKDOWN_E_INVALID_ARG; |
@@ -545,7 +545,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_remove_value(lockdownd_client_t | |||
545 | return ret; | 545 | return ret; |
546 | } | 546 | } |
547 | 547 | ||
548 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_device_udid(lockdownd_client_t client, char **udid) | 548 | lockdownd_error_t lockdownd_get_device_udid(lockdownd_client_t client, char **udid) |
549 | { | 549 | { |
550 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; | 550 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; |
551 | plist_t value = NULL; | 551 | plist_t value = NULL; |
@@ -591,7 +591,7 @@ static lockdownd_error_t lockdownd_get_device_public_key_as_key_data(lockdownd_c | |||
591 | return ret; | 591 | return ret; |
592 | } | 592 | } |
593 | 593 | ||
594 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_device_name(lockdownd_client_t client, char **device_name) | 594 | lockdownd_error_t lockdownd_get_device_name(lockdownd_client_t client, char **device_name) |
595 | { | 595 | { |
596 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; | 596 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; |
597 | plist_t value = NULL; | 597 | plist_t value = NULL; |
@@ -608,7 +608,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_device_name(lockdownd_clien | |||
608 | return ret; | 608 | return ret; |
609 | } | 609 | } |
610 | 610 | ||
611 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *client, const char *label) | 611 | lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *client, const char *label) |
612 | { | 612 | { |
613 | if (!device || !client) | 613 | if (!device || !client) |
614 | return LOCKDOWN_E_INVALID_ARG; | 614 | return LOCKDOWN_E_INVALID_ARG; |
@@ -643,7 +643,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_client_new(idevice_t device, lo | |||
643 | return LOCKDOWN_E_SUCCESS; | 643 | return LOCKDOWN_E_SUCCESS; |
644 | } | 644 | } |
645 | 645 | ||
646 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdownd_client_t *client, const char *label) | 646 | lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdownd_client_t *client, const char *label) |
647 | { | 647 | { |
648 | if (!client) | 648 | if (!client) |
649 | return LOCKDOWN_E_INVALID_ARG; | 649 | return LOCKDOWN_E_INVALID_ARG; |
@@ -1056,7 +1056,7 @@ static lockdownd_error_t lockdownd_do_pair(lockdownd_client_t client, lockdownd_ | |||
1056 | return ret; | 1056 | return ret; |
1057 | } | 1057 | } |
1058 | 1058 | ||
1059 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record) | 1059 | lockdownd_error_t lockdownd_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record) |
1060 | { | 1060 | { |
1061 | 1061 | ||
1062 | plist_t options = plist_new_dict(); | 1062 | plist_t options = plist_new_dict(); |
@@ -1069,22 +1069,22 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_pair(lockdownd_client_t client, | |||
1069 | return ret; | 1069 | return ret; |
1070 | } | 1070 | } |
1071 | 1071 | ||
1072 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_pair_with_options(lockdownd_client_t client, lockdownd_pair_record_t pair_record, plist_t options, plist_t *response) | 1072 | lockdownd_error_t lockdownd_pair_with_options(lockdownd_client_t client, lockdownd_pair_record_t pair_record, plist_t options, plist_t *response) |
1073 | { | 1073 | { |
1074 | return lockdownd_do_pair(client, pair_record, "Pair", options, response); | 1074 | return lockdownd_do_pair(client, pair_record, "Pair", options, response); |
1075 | } | 1075 | } |
1076 | 1076 | ||
1077 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_validate_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record) | 1077 | lockdownd_error_t lockdownd_validate_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record) |
1078 | { | 1078 | { |
1079 | return lockdownd_do_pair(client, pair_record, "ValidatePair", NULL, NULL); | 1079 | return lockdownd_do_pair(client, pair_record, "ValidatePair", NULL, NULL); |
1080 | } | 1080 | } |
1081 | 1081 | ||
1082 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_unpair(lockdownd_client_t client, lockdownd_pair_record_t pair_record) | 1082 | lockdownd_error_t lockdownd_unpair(lockdownd_client_t client, lockdownd_pair_record_t pair_record) |
1083 | { | 1083 | { |
1084 | return lockdownd_do_pair(client, pair_record, "Unpair", NULL, NULL); | 1084 | return lockdownd_do_pair(client, pair_record, "Unpair", NULL, NULL); |
1085 | } | 1085 | } |
1086 | 1086 | ||
1087 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client) | 1087 | lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client) |
1088 | { | 1088 | { |
1089 | if (!client) | 1089 | if (!client) |
1090 | return LOCKDOWN_E_INVALID_ARG; | 1090 | return LOCKDOWN_E_INVALID_ARG; |
@@ -1114,7 +1114,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_enter_recovery(lockdownd_client | |||
1114 | return ret; | 1114 | return ret; |
1115 | } | 1115 | } |
1116 | 1116 | ||
1117 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client) | 1117 | lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client) |
1118 | { | 1118 | { |
1119 | if (!client) | 1119 | if (!client) |
1120 | return LOCKDOWN_E_INVALID_ARG; | 1120 | return LOCKDOWN_E_INVALID_ARG; |
@@ -1148,7 +1148,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_goodbye(lockdownd_client_t clie | |||
1148 | return ret; | 1148 | return ret; |
1149 | } | 1149 | } |
1150 | 1150 | ||
1151 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled) | 1151 | lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled) |
1152 | { | 1152 | { |
1153 | lockdownd_error_t ret = LOCKDOWN_E_SUCCESS; | 1153 | lockdownd_error_t ret = LOCKDOWN_E_SUCCESS; |
1154 | plist_t dict = NULL; | 1154 | plist_t dict = NULL; |
@@ -1392,17 +1392,17 @@ static lockdownd_error_t lockdownd_do_start_service(lockdownd_client_t client, c | |||
1392 | return ret; | 1392 | return ret; |
1393 | } | 1393 | } |
1394 | 1394 | ||
1395 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *identifier, lockdownd_service_descriptor_t *service) | 1395 | lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *identifier, lockdownd_service_descriptor_t *service) |
1396 | { | 1396 | { |
1397 | return lockdownd_do_start_service(client, identifier, 0, service); | 1397 | return lockdownd_do_start_service(client, identifier, 0, service); |
1398 | } | 1398 | } |
1399 | 1399 | ||
1400 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_service_with_escrow_bag(lockdownd_client_t client, const char *identifier, lockdownd_service_descriptor_t *service) | 1400 | lockdownd_error_t lockdownd_start_service_with_escrow_bag(lockdownd_client_t client, const char *identifier, lockdownd_service_descriptor_t *service) |
1401 | { | 1401 | { |
1402 | return lockdownd_do_start_service(client, identifier, 1, service); | 1402 | return lockdownd_do_start_service(client, identifier, 1, service); |
1403 | } | 1403 | } |
1404 | 1404 | ||
1405 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activation_record) | 1405 | lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activation_record) |
1406 | { | 1406 | { |
1407 | if (!client) | 1407 | if (!client) |
1408 | return LOCKDOWN_E_INVALID_ARG; | 1408 | return LOCKDOWN_E_INVALID_ARG; |
@@ -1441,7 +1441,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_activate(lockdownd_client_t cli | |||
1441 | return ret; | 1441 | return ret; |
1442 | } | 1442 | } |
1443 | 1443 | ||
1444 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client) | 1444 | lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client) |
1445 | { | 1445 | { |
1446 | if (!client) | 1446 | if (!client) |
1447 | return LOCKDOWN_E_INVALID_ARG; | 1447 | return LOCKDOWN_E_INVALID_ARG; |
@@ -1488,7 +1488,7 @@ static void str_remove_spaces(char *source) | |||
1488 | *dest = 0; | 1488 | *dest = 0; |
1489 | } | 1489 | } |
1490 | 1490 | ||
1491 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, char ***classes, int *count) | 1491 | lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, char ***classes, int *count) |
1492 | { | 1492 | { |
1493 | if (!client) | 1493 | if (!client) |
1494 | return LOCKDOWN_E_INVALID_ARG; | 1494 | return LOCKDOWN_E_INVALID_ARG; |
@@ -1543,7 +1543,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd | |||
1543 | return LOCKDOWN_E_SUCCESS; | 1543 | return LOCKDOWN_E_SUCCESS; |
1544 | } | 1544 | } |
1545 | 1545 | ||
1546 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_data_classes_free(char **classes) | 1546 | lockdownd_error_t lockdownd_data_classes_free(char **classes) |
1547 | { | 1547 | { |
1548 | if (classes) { | 1548 | if (classes) { |
1549 | int i = 0; | 1549 | int i = 0; |
@@ -1555,7 +1555,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_data_classes_free(char **classe | |||
1555 | return LOCKDOWN_E_SUCCESS; | 1555 | return LOCKDOWN_E_SUCCESS; |
1556 | } | 1556 | } |
1557 | 1557 | ||
1558 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_service_descriptor_free(lockdownd_service_descriptor_t service) | 1558 | lockdownd_error_t lockdownd_service_descriptor_free(lockdownd_service_descriptor_t service) |
1559 | { | 1559 | { |
1560 | if (service) { | 1560 | if (service) { |
1561 | free(service->identifier); | 1561 | free(service->identifier); |
@@ -1565,7 +1565,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_service_descriptor_free(lockdow | |||
1565 | return LOCKDOWN_E_SUCCESS; | 1565 | return LOCKDOWN_E_SUCCESS; |
1566 | } | 1566 | } |
1567 | 1567 | ||
1568 | LIBIMOBILEDEVICE_API const char* lockdownd_strerror(lockdownd_error_t err) | 1568 | const char* lockdownd_strerror(lockdownd_error_t err) |
1569 | { | 1569 | { |
1570 | switch (err) { | 1570 | switch (err) { |
1571 | case LOCKDOWN_E_SUCCESS: | 1571 | case LOCKDOWN_E_SUCCESS: |
diff --git a/src/lockdown.h b/src/lockdown.h index bcd4717..ba291ec 100644 --- a/src/lockdown.h +++ b/src/lockdown.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #ifndef __LOCKDOWND_H | 23 | #ifndef __LOCKDOWND_H |
24 | #define __LOCKDOWND_H | 24 | #define __LOCKDOWND_H |
25 | 25 | ||
26 | #include "idevice.h" | ||
26 | #include "libimobiledevice/lockdown.h" | 27 | #include "libimobiledevice/lockdown.h" |
27 | #include "property_list_service.h" | 28 | #include "property_list_service.h" |
28 | 29 | ||
diff --git a/src/misagent.c b/src/misagent.c index af925f9..e3da997 100644 --- a/src/misagent.c +++ b/src/misagent.c | |||
@@ -89,7 +89,7 @@ static misagent_error_t misagent_check_result(plist_t response, int* status_code | |||
89 | return MISAGENT_E_REQUEST_FAILED; | 89 | return MISAGENT_E_REQUEST_FAILED; |
90 | } | 90 | } |
91 | 91 | ||
92 | LIBIMOBILEDEVICE_API misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client) | 92 | misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client) |
93 | { | 93 | { |
94 | property_list_service_client_t plistclient = NULL; | 94 | property_list_service_client_t plistclient = NULL; |
95 | misagent_error_t err = misagent_error(property_list_service_client_new(device, service, &plistclient)); | 95 | misagent_error_t err = misagent_error(property_list_service_client_new(device, service, &plistclient)); |
@@ -105,14 +105,14 @@ LIBIMOBILEDEVICE_API misagent_error_t misagent_client_new(idevice_t device, lock | |||
105 | return MISAGENT_E_SUCCESS; | 105 | return MISAGENT_E_SUCCESS; |
106 | } | 106 | } |
107 | 107 | ||
108 | LIBIMOBILEDEVICE_API misagent_error_t misagent_client_start_service(idevice_t device, misagent_client_t * client, const char* label) | 108 | misagent_error_t misagent_client_start_service(idevice_t device, misagent_client_t * client, const char* label) |
109 | { | 109 | { |
110 | misagent_error_t err = MISAGENT_E_UNKNOWN_ERROR; | 110 | misagent_error_t err = MISAGENT_E_UNKNOWN_ERROR; |
111 | service_client_factory_start_service(device, MISAGENT_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(misagent_client_new), &err); | 111 | service_client_factory_start_service(device, MISAGENT_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(misagent_client_new), &err); |
112 | return err; | 112 | return err; |
113 | } | 113 | } |
114 | 114 | ||
115 | LIBIMOBILEDEVICE_API misagent_error_t misagent_client_free(misagent_client_t client) | 115 | misagent_error_t misagent_client_free(misagent_client_t client) |
116 | { | 116 | { |
117 | if (!client) | 117 | if (!client) |
118 | return MISAGENT_E_INVALID_ARG; | 118 | return MISAGENT_E_INVALID_ARG; |
@@ -127,7 +127,7 @@ LIBIMOBILEDEVICE_API misagent_error_t misagent_client_free(misagent_client_t cli | |||
127 | return err; | 127 | return err; |
128 | } | 128 | } |
129 | 129 | ||
130 | LIBIMOBILEDEVICE_API misagent_error_t misagent_install(misagent_client_t client, plist_t profile) | 130 | misagent_error_t misagent_install(misagent_client_t client, plist_t profile) |
131 | { | 131 | { |
132 | if (!client || !client->parent || !profile || (plist_get_node_type(profile) != PLIST_DATA)) | 132 | if (!client || !client->parent || !profile || (plist_get_node_type(profile) != PLIST_DATA)) |
133 | return MISAGENT_E_INVALID_ARG; | 133 | return MISAGENT_E_INVALID_ARG; |
@@ -164,7 +164,7 @@ LIBIMOBILEDEVICE_API misagent_error_t misagent_install(misagent_client_t client, | |||
164 | return res; | 164 | return res; |
165 | } | 165 | } |
166 | 166 | ||
167 | LIBIMOBILEDEVICE_API misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles) | 167 | misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles) |
168 | { | 168 | { |
169 | if (!client || !client->parent || !profiles) | 169 | if (!client || !client->parent || !profiles) |
170 | return MISAGENT_E_INVALID_ARG; | 170 | return MISAGENT_E_INVALID_ARG; |
@@ -204,7 +204,7 @@ LIBIMOBILEDEVICE_API misagent_error_t misagent_copy(misagent_client_t client, pl | |||
204 | 204 | ||
205 | } | 205 | } |
206 | 206 | ||
207 | LIBIMOBILEDEVICE_API misagent_error_t misagent_copy_all(misagent_client_t client, plist_t* profiles) | 207 | misagent_error_t misagent_copy_all(misagent_client_t client, plist_t* profiles) |
208 | { | 208 | { |
209 | if (!client || !client->parent || !profiles) | 209 | if (!client || !client->parent || !profiles) |
210 | return MISAGENT_E_INVALID_ARG; | 210 | return MISAGENT_E_INVALID_ARG; |
@@ -244,7 +244,7 @@ LIBIMOBILEDEVICE_API misagent_error_t misagent_copy_all(misagent_client_t client | |||
244 | 244 | ||
245 | } | 245 | } |
246 | 246 | ||
247 | LIBIMOBILEDEVICE_API misagent_error_t misagent_remove(misagent_client_t client, const char* profileID) | 247 | misagent_error_t misagent_remove(misagent_client_t client, const char* profileID) |
248 | { | 248 | { |
249 | if (!client || !client->parent || !profileID) | 249 | if (!client || !client->parent || !profileID) |
250 | return MISAGENT_E_INVALID_ARG; | 250 | return MISAGENT_E_INVALID_ARG; |
@@ -281,7 +281,7 @@ LIBIMOBILEDEVICE_API misagent_error_t misagent_remove(misagent_client_t client, | |||
281 | return res; | 281 | return res; |
282 | } | 282 | } |
283 | 283 | ||
284 | LIBIMOBILEDEVICE_API int misagent_get_status_code(misagent_client_t client) | 284 | int misagent_get_status_code(misagent_client_t client) |
285 | { | 285 | { |
286 | if (!client) { | 286 | if (!client) { |
287 | return -1; | 287 | return -1; |
diff --git a/src/misagent.h b/src/misagent.h index 08ad063..e394087 100644 --- a/src/misagent.h +++ b/src/misagent.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __MISAGENT_H | 22 | #ifndef __MISAGENT_H |
23 | #define __MISAGENT_H | 23 | #define __MISAGENT_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/misagent.h" | 26 | #include "libimobiledevice/misagent.h" |
26 | #include "property_list_service.h" | 27 | #include "property_list_service.h" |
27 | 28 | ||
diff --git a/src/mobile_image_mounter.c b/src/mobile_image_mounter.c index 9ccfd85..5df8e86 100644 --- a/src/mobile_image_mounter.c +++ b/src/mobile_image_mounter.c | |||
@@ -78,7 +78,7 @@ static mobile_image_mounter_error_t mobile_image_mounter_error(property_list_ser | |||
78 | return MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; | 78 | return MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; |
79 | } | 79 | } |
80 | 80 | ||
81 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdownd_service_descriptor_t service, mobile_image_mounter_client_t *client) | 81 | mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdownd_service_descriptor_t service, mobile_image_mounter_client_t *client) |
82 | { | 82 | { |
83 | property_list_service_client_t plistclient = NULL; | 83 | property_list_service_client_t plistclient = NULL; |
84 | mobile_image_mounter_error_t err = mobile_image_mounter_error(property_list_service_client_new(device, service, &plistclient)); | 84 | mobile_image_mounter_error_t err = mobile_image_mounter_error(property_list_service_client_new(device, service, &plistclient)); |
@@ -95,14 +95,14 @@ LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_new(idevi | |||
95 | return MOBILE_IMAGE_MOUNTER_E_SUCCESS; | 95 | return MOBILE_IMAGE_MOUNTER_E_SUCCESS; |
96 | } | 96 | } |
97 | 97 | ||
98 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t * client, const char* label) | 98 | mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t * client, const char* label) |
99 | { | 99 | { |
100 | mobile_image_mounter_error_t err = MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; | 100 | mobile_image_mounter_error_t err = MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; |
101 | service_client_factory_start_service(device, MOBILE_IMAGE_MOUNTER_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobile_image_mounter_new), &err); | 101 | service_client_factory_start_service(device, MOBILE_IMAGE_MOUNTER_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobile_image_mounter_new), &err); |
102 | return err; | 102 | return err; |
103 | } | 103 | } |
104 | 104 | ||
105 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client) | 105 | mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client) |
106 | { | 106 | { |
107 | if (!client) | 107 | if (!client) |
108 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; | 108 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; |
@@ -115,7 +115,7 @@ LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_free(mobi | |||
115 | return MOBILE_IMAGE_MOUNTER_E_SUCCESS; | 115 | return MOBILE_IMAGE_MOUNTER_E_SUCCESS; |
116 | } | 116 | } |
117 | 117 | ||
118 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result) | 118 | mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result) |
119 | { | 119 | { |
120 | if (!client || !image_type || !result) { | 120 | if (!client || !image_type || !result) { |
121 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; | 121 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; |
@@ -181,7 +181,7 @@ static mobile_image_mounter_error_t process_result(plist_t result, const char *e | |||
181 | return res; | 181 | return res; |
182 | } | 182 | } |
183 | 183 | ||
184 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_upload_image(mobile_image_mounter_client_t client, const char *image_type, size_t image_size, const char *signature, uint16_t signature_size, mobile_image_mounter_upload_cb_t upload_cb, void* userdata) | 184 | mobile_image_mounter_error_t mobile_image_mounter_upload_image(mobile_image_mounter_client_t client, const char *image_type, size_t image_size, const char *signature, uint16_t signature_size, mobile_image_mounter_upload_cb_t upload_cb, void* userdata) |
185 | { | 185 | { |
186 | if (!client || !image_type || (image_size == 0) || !upload_cb) { | 186 | if (!client || !image_type || (image_size == 0) || !upload_cb) { |
187 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; | 187 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; |
@@ -260,7 +260,7 @@ leave_unlock: | |||
260 | 260 | ||
261 | } | 261 | } |
262 | 262 | ||
263 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mounter_client_t client, const char *image_path, const char *signature, uint16_t signature_size, const char *image_type, plist_t *result) | 263 | mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mounter_client_t client, const char *image_path, const char *signature, uint16_t signature_size, const char *image_type, plist_t *result) |
264 | { | 264 | { |
265 | if (!client || !image_path || !image_type || !result) { | 265 | if (!client || !image_path || !image_type || !result) { |
266 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; | 266 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; |
@@ -292,7 +292,7 @@ leave_unlock: | |||
292 | return res; | 292 | return res; |
293 | } | 293 | } |
294 | 294 | ||
295 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client) | 295 | mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client) |
296 | { | 296 | { |
297 | if (!client) { | 297 | if (!client) { |
298 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; | 298 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; |
diff --git a/src/mobile_image_mounter.h b/src/mobile_image_mounter.h index 55c9cf2..9a8fcdd 100644 --- a/src/mobile_image_mounter.h +++ b/src/mobile_image_mounter.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __MOBILE_IMAGE_MOUNTER_H | 22 | #ifndef __MOBILE_IMAGE_MOUNTER_H |
23 | #define __MOBILE_IMAGE_MOUNTER_H | 23 | #define __MOBILE_IMAGE_MOUNTER_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/mobile_image_mounter.h" | 26 | #include "libimobiledevice/mobile_image_mounter.h" |
26 | #include "property_list_service.h" | 27 | #include "property_list_service.h" |
27 | #include <libimobiledevice-glue/thread.h> | 28 | #include <libimobiledevice-glue/thread.h> |
diff --git a/src/mobileactivation.c b/src/mobileactivation.c index 79c7003..fce5f16 100644 --- a/src/mobileactivation.c +++ b/src/mobileactivation.c | |||
@@ -54,7 +54,7 @@ static mobileactivation_error_t mobileactivation_error(property_list_service_err | |||
54 | return MOBILEACTIVATION_E_UNKNOWN_ERROR; | 54 | return MOBILEACTIVATION_E_UNKNOWN_ERROR; |
55 | } | 55 | } |
56 | 56 | ||
57 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobileactivation_client_t *client) | 57 | mobileactivation_error_t mobileactivation_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobileactivation_client_t *client) |
58 | { | 58 | { |
59 | if (!device || !service || service->port == 0 || !client || *client) { | 59 | if (!device || !service || service->port == 0 || !client || *client) { |
60 | return MOBILEACTIVATION_E_INVALID_ARG; | 60 | return MOBILEACTIVATION_E_INVALID_ARG; |
@@ -74,14 +74,14 @@ LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_client_new(idevic | |||
74 | return MOBILEACTIVATION_E_SUCCESS; | 74 | return MOBILEACTIVATION_E_SUCCESS; |
75 | } | 75 | } |
76 | 76 | ||
77 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_client_start_service(idevice_t device, mobileactivation_client_t * client, const char* label) | 77 | mobileactivation_error_t mobileactivation_client_start_service(idevice_t device, mobileactivation_client_t * client, const char* label) |
78 | { | 78 | { |
79 | mobileactivation_error_t err = MOBILEACTIVATION_E_UNKNOWN_ERROR; | 79 | mobileactivation_error_t err = MOBILEACTIVATION_E_UNKNOWN_ERROR; |
80 | service_client_factory_start_service(device, MOBILEACTIVATION_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobileactivation_client_new), &err); | 80 | service_client_factory_start_service(device, MOBILEACTIVATION_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobileactivation_client_new), &err); |
81 | return err; | 81 | return err; |
82 | } | 82 | } |
83 | 83 | ||
84 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_client_free(mobileactivation_client_t client) | 84 | mobileactivation_error_t mobileactivation_client_free(mobileactivation_client_t client) |
85 | { | 85 | { |
86 | if (!client) | 86 | if (!client) |
87 | return MOBILEACTIVATION_E_INVALID_ARG; | 87 | return MOBILEACTIVATION_E_INVALID_ARG; |
@@ -176,7 +176,7 @@ static mobileactivation_error_t mobileactivation_send_command(mobileactivation_c | |||
176 | return ret; | 176 | return ret; |
177 | } | 177 | } |
178 | 178 | ||
179 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_get_activation_state(mobileactivation_client_t client, plist_t *state) | 179 | mobileactivation_error_t mobileactivation_get_activation_state(mobileactivation_client_t client, plist_t *state) |
180 | { | 180 | { |
181 | if (!client || !state) | 181 | if (!client || !state) |
182 | return MOBILEACTIVATION_E_INVALID_ARG; | 182 | return MOBILEACTIVATION_E_INVALID_ARG; |
@@ -198,7 +198,7 @@ LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_get_activation_st | |||
198 | return ret; | 198 | return ret; |
199 | } | 199 | } |
200 | 200 | ||
201 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation_session_info(mobileactivation_client_t client, plist_t *blob) | 201 | mobileactivation_error_t mobileactivation_create_activation_session_info(mobileactivation_client_t client, plist_t *blob) |
202 | { | 202 | { |
203 | if (!client || !blob) | 203 | if (!client || !blob) |
204 | return MOBILEACTIVATION_E_INVALID_ARG; | 204 | return MOBILEACTIVATION_E_INVALID_ARG; |
@@ -218,7 +218,7 @@ LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation | |||
218 | return ret; | 218 | return ret; |
219 | } | 219 | } |
220 | 220 | ||
221 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation_info(mobileactivation_client_t client, plist_t *info) | 221 | mobileactivation_error_t mobileactivation_create_activation_info(mobileactivation_client_t client, plist_t *info) |
222 | { | 222 | { |
223 | if (!client || !info) | 223 | if (!client || !info) |
224 | return MOBILEACTIVATION_E_INVALID_ARG; | 224 | return MOBILEACTIVATION_E_INVALID_ARG; |
@@ -240,7 +240,7 @@ LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation | |||
240 | return ret; | 240 | return ret; |
241 | } | 241 | } |
242 | 242 | ||
243 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation_info_with_session(mobileactivation_client_t client, plist_t handshake_response, plist_t *info) | 243 | mobileactivation_error_t mobileactivation_create_activation_info_with_session(mobileactivation_client_t client, plist_t handshake_response, plist_t *info) |
244 | { | 244 | { |
245 | if (!client || !info) | 245 | if (!client || !info) |
246 | return MOBILEACTIVATION_E_INVALID_ARG; | 246 | return MOBILEACTIVATION_E_INVALID_ARG; |
@@ -264,7 +264,7 @@ LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_create_activation | |||
264 | return ret; | 264 | return ret; |
265 | } | 265 | } |
266 | 266 | ||
267 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_activate(mobileactivation_client_t client, plist_t activation_record) | 267 | mobileactivation_error_t mobileactivation_activate(mobileactivation_client_t client, plist_t activation_record) |
268 | { | 268 | { |
269 | if (!client || !activation_record) | 269 | if (!client || !activation_record) |
270 | return MOBILEACTIVATION_E_INVALID_ARG; | 270 | return MOBILEACTIVATION_E_INVALID_ARG; |
@@ -277,7 +277,7 @@ LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_activate(mobileac | |||
277 | return ret; | 277 | return ret; |
278 | } | 278 | } |
279 | 279 | ||
280 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_activate_with_session(mobileactivation_client_t client, plist_t activation_record, plist_t headers) | 280 | mobileactivation_error_t mobileactivation_activate_with_session(mobileactivation_client_t client, plist_t activation_record, plist_t headers) |
281 | { | 281 | { |
282 | if (!client || !activation_record) | 282 | if (!client || !activation_record) |
283 | return MOBILEACTIVATION_E_INVALID_ARG; | 283 | return MOBILEACTIVATION_E_INVALID_ARG; |
@@ -300,7 +300,7 @@ LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_activate_with_ses | |||
300 | } | 300 | } |
301 | 301 | ||
302 | 302 | ||
303 | LIBIMOBILEDEVICE_API mobileactivation_error_t mobileactivation_deactivate(mobileactivation_client_t client) | 303 | mobileactivation_error_t mobileactivation_deactivate(mobileactivation_client_t client) |
304 | { | 304 | { |
305 | if (!client) | 305 | if (!client) |
306 | return MOBILEACTIVATION_E_INVALID_ARG; | 306 | return MOBILEACTIVATION_E_INVALID_ARG; |
diff --git a/src/mobileactivation.h b/src/mobileactivation.h index 49b9ebc..a8dff5d 100644 --- a/src/mobileactivation.h +++ b/src/mobileactivation.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __MOBILEACTIVATION_H | 22 | #ifndef __MOBILEACTIVATION_H |
23 | #define __MOBILEACTIVATION_H | 23 | #define __MOBILEACTIVATION_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/mobileactivation.h" | 26 | #include "libimobiledevice/mobileactivation.h" |
26 | #include "property_list_service.h" | 27 | #include "property_list_service.h" |
27 | 28 | ||
diff --git a/src/mobilebackup.c b/src/mobilebackup.c index f48f42a..36986a4 100644 --- a/src/mobilebackup.c +++ b/src/mobilebackup.c | |||
@@ -69,7 +69,7 @@ static mobilebackup_error_t mobilebackup_error(device_link_service_error_t err) | |||
69 | return MOBILEBACKUP_E_UNKNOWN_ERROR; | 69 | return MOBILEBACKUP_E_UNKNOWN_ERROR; |
70 | } | 70 | } |
71 | 71 | ||
72 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup_client_t * client) | 72 | mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup_client_t * client) |
73 | { | 73 | { |
74 | if (!device || !service || service->port == 0 || !client || *client) | 74 | if (!device || !service || service->port == 0 || !client || *client) |
75 | return MOBILEBACKUP_E_INVALID_ARG; | 75 | return MOBILEBACKUP_E_INVALID_ARG; |
@@ -96,14 +96,14 @@ LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_new(idevice_t devi | |||
96 | return ret; | 96 | return ret; |
97 | } | 97 | } |
98 | 98 | ||
99 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobilebackup_client_t * client, const char* label) | 99 | mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobilebackup_client_t * client, const char* label) |
100 | { | 100 | { |
101 | mobilebackup_error_t err = MOBILEBACKUP_E_UNKNOWN_ERROR; | 101 | mobilebackup_error_t err = MOBILEBACKUP_E_UNKNOWN_ERROR; |
102 | service_client_factory_start_service(device, MOBILEBACKUP_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilebackup_client_new), &err); | 102 | service_client_factory_start_service(device, MOBILEBACKUP_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilebackup_client_new), &err); |
103 | return err; | 103 | return err; |
104 | } | 104 | } |
105 | 105 | ||
106 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client) | 106 | mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client) |
107 | { | 107 | { |
108 | if (!client) | 108 | if (!client) |
109 | return MOBILEBACKUP_E_INVALID_ARG; | 109 | return MOBILEBACKUP_E_INVALID_ARG; |
@@ -116,7 +116,7 @@ LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_free(mobilebackup_ | |||
116 | return err; | 116 | return err; |
117 | } | 117 | } |
118 | 118 | ||
119 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t * plist) | 119 | mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t * plist) |
120 | { | 120 | { |
121 | if (!client) | 121 | if (!client) |
122 | return MOBILEBACKUP_E_INVALID_ARG; | 122 | return MOBILEBACKUP_E_INVALID_ARG; |
@@ -124,7 +124,7 @@ LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive(mobilebackup_clie | |||
124 | return ret; | 124 | return ret; |
125 | } | 125 | } |
126 | 126 | ||
127 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist) | 127 | mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist) |
128 | { | 128 | { |
129 | if (!client || !plist) | 129 | if (!client || !plist) |
130 | return MOBILEBACKUP_E_INVALID_ARG; | 130 | return MOBILEBACKUP_E_INVALID_ARG; |
@@ -241,7 +241,7 @@ leave: | |||
241 | return err; | 241 | return err; |
242 | } | 242 | } |
243 | 243 | ||
244 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, plist_t backup_manifest, const char *base_path, const char *proto_version) | 244 | mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, plist_t backup_manifest, const char *base_path, const char *proto_version) |
245 | { | 245 | { |
246 | if (!client || !client->parent || !base_path || !proto_version) | 246 | if (!client || !client->parent || !base_path || !proto_version) |
247 | return MOBILEBACKUP_E_INVALID_ARG; | 247 | return MOBILEBACKUP_E_INVALID_ARG; |
@@ -309,12 +309,12 @@ leave: | |||
309 | return err; | 309 | return err; |
310 | } | 310 | } |
311 | 311 | ||
312 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_t client) | 312 | mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_t client) |
313 | { | 313 | { |
314 | return mobilebackup_send_message(client, "kBackupMessageBackupFileReceived", NULL); | 314 | return mobilebackup_send_message(client, "kBackupMessageBackupFileReceived", NULL); |
315 | } | 315 | } |
316 | 316 | ||
317 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, plist_t backup_manifest, mobilebackup_flags_t flags, const char *proto_version) | 317 | mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, plist_t backup_manifest, mobilebackup_flags_t flags, const char *proto_version) |
318 | { | 318 | { |
319 | if (!client || !client->parent || !backup_manifest || !proto_version) | 319 | if (!client || !client->parent || !backup_manifest || !proto_version) |
320 | return MOBILEBACKUP_E_INVALID_ARG; | 320 | return MOBILEBACKUP_E_INVALID_ARG; |
@@ -376,17 +376,17 @@ leave: | |||
376 | return err; | 376 | return err; |
377 | } | 377 | } |
378 | 378 | ||
379 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_client_t client, plist_t *result) | 379 | mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_client_t client, plist_t *result) |
380 | { | 380 | { |
381 | return mobilebackup_receive_message(client, "BackupMessageRestoreFileReceived", result); | 381 | return mobilebackup_receive_message(client, "BackupMessageRestoreFileReceived", result); |
382 | } | 382 | } |
383 | 383 | ||
384 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebackup_client_t client, plist_t *result) | 384 | mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebackup_client_t client, plist_t *result) |
385 | { | 385 | { |
386 | return mobilebackup_receive_message(client, "BackupMessageRestoreApplicationReceived", result); | 386 | return mobilebackup_receive_message(client, "BackupMessageRestoreApplicationReceived", result); |
387 | } | 387 | } |
388 | 388 | ||
389 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t client) | 389 | mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t client) |
390 | { | 390 | { |
391 | mobilebackup_error_t err = mobilebackup_send_message(client, "BackupMessageRestoreComplete", NULL); | 391 | mobilebackup_error_t err = mobilebackup_send_message(client, "BackupMessageRestoreComplete", NULL); |
392 | if (err != MOBILEBACKUP_E_SUCCESS) { | 392 | if (err != MOBILEBACKUP_E_SUCCESS) { |
@@ -431,7 +431,7 @@ LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_restore_complete(mob | |||
431 | return err; | 431 | return err; |
432 | } | 432 | } |
433 | 433 | ||
434 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const char *reason) | 434 | mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const char *reason) |
435 | { | 435 | { |
436 | if (!client || !client->parent || !reason) | 436 | if (!client || !client->parent || !reason) |
437 | return MOBILEBACKUP_E_INVALID_ARG; | 437 | return MOBILEBACKUP_E_INVALID_ARG; |
diff --git a/src/mobilebackup.h b/src/mobilebackup.h index edda70f..04ec479 100644 --- a/src/mobilebackup.h +++ b/src/mobilebackup.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #ifndef __MOBILEBACKUP_H | 23 | #ifndef __MOBILEBACKUP_H |
24 | #define __MOBILEBACKUP_H | 24 | #define __MOBILEBACKUP_H |
25 | 25 | ||
26 | #include "idevice.h" | ||
26 | #include "libimobiledevice/mobilebackup.h" | 27 | #include "libimobiledevice/mobilebackup.h" |
27 | #include "device_link_service.h" | 28 | #include "device_link_service.h" |
28 | 29 | ||
diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c index 3726065..a8d673f 100644 --- a/src/mobilebackup2.c +++ b/src/mobilebackup2.c | |||
@@ -68,7 +68,7 @@ static mobilebackup2_error_t mobilebackup2_error(device_link_service_error_t err | |||
68 | return MOBILEBACKUP2_E_UNKNOWN_ERROR; | 68 | return MOBILEBACKUP2_E_UNKNOWN_ERROR; |
69 | } | 69 | } |
70 | 70 | ||
71 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, | 71 | mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, |
72 | mobilebackup2_client_t * client) | 72 | mobilebackup2_client_t * client) |
73 | { | 73 | { |
74 | if (!device || !service || service->port == 0 || !client || *client) | 74 | if (!device || !service || service->port == 0 || !client || *client) |
@@ -96,14 +96,14 @@ LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_new(idevice_t de | |||
96 | return ret; | 96 | return ret; |
97 | } | 97 | } |
98 | 98 | ||
99 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t * client, const char* label) | 99 | mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t * client, const char* label) |
100 | { | 100 | { |
101 | mobilebackup2_error_t err = MOBILEBACKUP2_E_UNKNOWN_ERROR; | 101 | mobilebackup2_error_t err = MOBILEBACKUP2_E_UNKNOWN_ERROR; |
102 | service_client_factory_start_service(device, MOBILEBACKUP2_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilebackup2_client_new), &err); | 102 | service_client_factory_start_service(device, MOBILEBACKUP2_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilebackup2_client_new), &err); |
103 | return err; | 103 | return err; |
104 | } | 104 | } |
105 | 105 | ||
106 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client) | 106 | mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client) |
107 | { | 107 | { |
108 | if (!client) | 108 | if (!client) |
109 | return MOBILEBACKUP2_E_INVALID_ARG; | 109 | return MOBILEBACKUP2_E_INVALID_ARG; |
@@ -116,7 +116,7 @@ LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_free(mobilebacku | |||
116 | return err; | 116 | return err; |
117 | } | 117 | } |
118 | 118 | ||
119 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options) | 119 | mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options) |
120 | { | 120 | { |
121 | if (!client || !client->parent || (!message && !options)) | 121 | if (!client || !client->parent || (!message && !options)) |
122 | return MOBILEBACKUP2_E_INVALID_ARG; | 122 | return MOBILEBACKUP2_E_INVALID_ARG; |
@@ -214,12 +214,12 @@ leave: | |||
214 | return err; | 214 | return err; |
215 | } | 215 | } |
216 | 216 | ||
217 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage) | 217 | mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage) |
218 | { | 218 | { |
219 | return mobilebackup2_error(device_link_service_receive_message(client->parent, msg_plist, dlmessage)); | 219 | return mobilebackup2_error(device_link_service_receive_message(client->parent, msg_plist, dlmessage)); |
220 | } | 220 | } |
221 | 221 | ||
222 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes) | 222 | mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes) |
223 | { | 223 | { |
224 | if (!client || !client->parent || !data || (length == 0) || !bytes) | 224 | if (!client || !client->parent || !data || (length == 0) || !bytes) |
225 | return MOBILEBACKUP2_E_INVALID_ARG; | 225 | return MOBILEBACKUP2_E_INVALID_ARG; |
@@ -244,7 +244,7 @@ LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_ | |||
244 | return MOBILEBACKUP2_E_MUX_ERROR; | 244 | return MOBILEBACKUP2_E_MUX_ERROR; |
245 | } | 245 | } |
246 | 246 | ||
247 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes) | 247 | mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes) |
248 | { | 248 | { |
249 | if (!client || !client->parent || !data || (length == 0) || !bytes) | 249 | if (!client || !client->parent || !data || (length == 0) || !bytes) |
250 | return MOBILEBACKUP2_E_INVALID_ARG; | 250 | return MOBILEBACKUP2_E_INVALID_ARG; |
@@ -271,7 +271,7 @@ LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_receive_raw(mobilebacku | |||
271 | return MOBILEBACKUP2_E_MUX_ERROR; | 271 | return MOBILEBACKUP2_E_MUX_ERROR; |
272 | } | 272 | } |
273 | 273 | ||
274 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client, double local_versions[], char count, double *remote_version) | 274 | mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client, double local_versions[], char count, double *remote_version) |
275 | { | 275 | { |
276 | int i; | 276 | int i; |
277 | 277 | ||
@@ -329,7 +329,7 @@ leave: | |||
329 | return err; | 329 | return err; |
330 | } | 330 | } |
331 | 331 | ||
332 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options) | 332 | mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options) |
333 | { | 333 | { |
334 | if (!client || !client->parent || !request || !target_identifier) | 334 | if (!client || !client->parent || !request || !target_identifier) |
335 | return MOBILEBACKUP2_E_INVALID_ARG; | 335 | return MOBILEBACKUP2_E_INVALID_ARG; |
@@ -360,7 +360,7 @@ LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_request(mobileback | |||
360 | return err; | 360 | return err; |
361 | } | 361 | } |
362 | 362 | ||
363 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2) | 363 | mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2) |
364 | { | 364 | { |
365 | if (!client || !client->parent) | 365 | if (!client || !client->parent) |
366 | return MOBILEBACKUP2_E_INVALID_ARG; | 366 | return MOBILEBACKUP2_E_INVALID_ARG; |
diff --git a/src/mobilebackup2.h b/src/mobilebackup2.h index 025b6bf..e232b97 100644 --- a/src/mobilebackup2.h +++ b/src/mobilebackup2.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __MOBILEBACKUP2_H | 22 | #ifndef __MOBILEBACKUP2_H |
23 | #define __MOBILEBACKUP2_H | 23 | #define __MOBILEBACKUP2_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/mobilebackup2.h" | 26 | #include "libimobiledevice/mobilebackup2.h" |
26 | #include "device_link_service.h" | 27 | #include "device_link_service.h" |
27 | 28 | ||
diff --git a/src/mobilesync.c b/src/mobilesync.c index e50226c..9b81a49 100644 --- a/src/mobilesync.c +++ b/src/mobilesync.c | |||
@@ -71,7 +71,7 @@ static mobilesync_error_t mobilesync_error(device_link_service_error_t err) | |||
71 | return MOBILESYNC_E_UNKNOWN_ERROR; | 71 | return MOBILESYNC_E_UNKNOWN_ERROR; |
72 | } | 72 | } |
73 | 73 | ||
74 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, | 74 | mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, |
75 | mobilesync_client_t * client) | 75 | mobilesync_client_t * client) |
76 | { | 76 | { |
77 | if (!device || !service || service->port == 0 || !client || *client) | 77 | if (!device || !service || service->port == 0 || !client || *client) |
@@ -101,14 +101,14 @@ LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_new(idevice_t device, | |||
101 | return ret; | 101 | return ret; |
102 | } | 102 | } |
103 | 103 | ||
104 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t * client, const char* label) | 104 | mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t * client, const char* label) |
105 | { | 105 | { |
106 | mobilesync_error_t err = MOBILESYNC_E_UNKNOWN_ERROR; | 106 | mobilesync_error_t err = MOBILESYNC_E_UNKNOWN_ERROR; |
107 | service_client_factory_start_service(device, MOBILESYNC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilesync_client_new), &err); | 107 | service_client_factory_start_service(device, MOBILESYNC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilesync_client_new), &err); |
108 | return err; | 108 | return err; |
109 | } | 109 | } |
110 | 110 | ||
111 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_free(mobilesync_client_t client) | 111 | mobilesync_error_t mobilesync_client_free(mobilesync_client_t client) |
112 | { | 112 | { |
113 | if (!client) | 113 | if (!client) |
114 | return MOBILESYNC_E_INVALID_ARG; | 114 | return MOBILESYNC_E_INVALID_ARG; |
@@ -118,7 +118,7 @@ LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_free(mobilesync_client | |||
118 | return err; | 118 | return err; |
119 | } | 119 | } |
120 | 120 | ||
121 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plist) | 121 | mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plist) |
122 | { | 122 | { |
123 | if (!client) | 123 | if (!client) |
124 | return MOBILESYNC_E_INVALID_ARG; | 124 | return MOBILESYNC_E_INVALID_ARG; |
@@ -126,14 +126,14 @@ LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive(mobilesync_client_t c | |||
126 | return ret; | 126 | return ret; |
127 | } | 127 | } |
128 | 128 | ||
129 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist) | 129 | mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist) |
130 | { | 130 | { |
131 | if (!client || !plist) | 131 | if (!client || !plist) |
132 | return MOBILESYNC_E_INVALID_ARG; | 132 | return MOBILESYNC_E_INVALID_ARG; |
133 | return mobilesync_error(device_link_service_send(client->parent, plist)); | 133 | return mobilesync_error(device_link_service_send(client->parent, plist)); |
134 | } | 134 | } |
135 | 135 | ||
136 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data_class, mobilesync_anchors_t anchors, uint64_t computer_data_class_version, mobilesync_sync_type_t *sync_type, uint64_t *device_data_class_version, char** error_description) | 136 | mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data_class, mobilesync_anchors_t anchors, uint64_t computer_data_class_version, mobilesync_sync_type_t *sync_type, uint64_t *device_data_class_version, char** error_description) |
137 | { | 137 | { |
138 | if (!client || client->data_class || !data_class || | 138 | if (!client || client->data_class || !data_class || |
139 | !anchors || !anchors->computer_anchor) { | 139 | !anchors || !anchors->computer_anchor) { |
@@ -259,7 +259,7 @@ LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_start(mobilesync_client_t cli | |||
259 | return err; | 259 | return err; |
260 | } | 260 | } |
261 | 261 | ||
262 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_finish(mobilesync_client_t client) | 262 | mobilesync_error_t mobilesync_finish(mobilesync_client_t client) |
263 | { | 263 | { |
264 | if (!client || !client->data_class) { | 264 | if (!client || !client->data_class) { |
265 | return MOBILESYNC_E_INVALID_ARG; | 265 | return MOBILESYNC_E_INVALID_ARG; |
@@ -344,17 +344,17 @@ static mobilesync_error_t mobilesync_get_records(mobilesync_client_t client, con | |||
344 | return err; | 344 | return err; |
345 | } | 345 | } |
346 | 346 | ||
347 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client) | 347 | mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client) |
348 | { | 348 | { |
349 | return mobilesync_get_records(client, "SDMessageGetAllRecordsFromDevice"); | 349 | return mobilesync_get_records(client, "SDMessageGetAllRecordsFromDevice"); |
350 | } | 350 | } |
351 | 351 | ||
352 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client) | 352 | mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client) |
353 | { | 353 | { |
354 | return mobilesync_get_records(client, "SDMessageGetChangesFromDevice"); | 354 | return mobilesync_get_records(client, "SDMessageGetChangesFromDevice"); |
355 | } | 355 | } |
356 | 356 | ||
357 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions) | 357 | mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions) |
358 | { | 358 | { |
359 | if (!client || !client->data_class) { | 359 | if (!client || !client->data_class) { |
360 | return MOBILESYNC_E_INVALID_ARG; | 360 | return MOBILESYNC_E_INVALID_ARG; |
@@ -421,7 +421,7 @@ LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive_changes(mobilesync_cl | |||
421 | return err; | 421 | return err; |
422 | } | 422 | } |
423 | 423 | ||
424 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client) | 424 | mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client) |
425 | { | 425 | { |
426 | if (!client || !client->data_class) { | 426 | if (!client || !client->data_class) { |
427 | return MOBILESYNC_E_INVALID_ARG; | 427 | return MOBILESYNC_E_INVALID_ARG; |
@@ -490,7 +490,7 @@ LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_clear_all_records_on_device(m | |||
490 | return err; | 490 | return err; |
491 | } | 491 | } |
492 | 492 | ||
493 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client) | 493 | mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client) |
494 | { | 494 | { |
495 | if (!client || !client->data_class) { | 495 | if (!client || !client->data_class) { |
496 | return MOBILESYNC_E_INVALID_ARG; | 496 | return MOBILESYNC_E_INVALID_ARG; |
@@ -524,7 +524,7 @@ static plist_t create_process_changes_message(const char *data_class, plist_t en | |||
524 | return msg; | 524 | return msg; |
525 | } | 525 | } |
526 | 526 | ||
527 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client) | 527 | mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client) |
528 | { | 528 | { |
529 | if (!client || !client->data_class) { | 529 | if (!client || !client->data_class) { |
530 | return MOBILESYNC_E_INVALID_ARG; | 530 | return MOBILESYNC_E_INVALID_ARG; |
@@ -591,7 +591,7 @@ LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_ready_to_send_changes_from_co | |||
591 | return err; | 591 | return err; |
592 | } | 592 | } |
593 | 593 | ||
594 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions) | 594 | mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions) |
595 | { | 595 | { |
596 | if (!client || !client->data_class || !entities) { | 596 | if (!client || !client->data_class || !entities) { |
597 | return MOBILESYNC_E_INVALID_ARG; | 597 | return MOBILESYNC_E_INVALID_ARG; |
@@ -619,7 +619,7 @@ LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send_changes(mobilesync_clien | |||
619 | return err; | 619 | return err; |
620 | } | 620 | } |
621 | 621 | ||
622 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping) | 622 | mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping) |
623 | { | 623 | { |
624 | if (!client || !client->data_class) { | 624 | if (!client || !client->data_class) { |
625 | return MOBILESYNC_E_INVALID_ARG; | 625 | return MOBILESYNC_E_INVALID_ARG; |
@@ -688,7 +688,7 @@ LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_remap_identifiers(mobilesync_ | |||
688 | return err; | 688 | return err; |
689 | } | 689 | } |
690 | 690 | ||
691 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason) | 691 | mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason) |
692 | { | 692 | { |
693 | if (!client || !client->data_class || !reason) { | 693 | if (!client || !client->data_class || !reason) { |
694 | return MOBILESYNC_E_INVALID_ARG; | 694 | return MOBILESYNC_E_INVALID_ARG; |
@@ -714,7 +714,7 @@ LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_cancel(mobilesync_client_t cl | |||
714 | return err; | 714 | return err; |
715 | } | 715 | } |
716 | 716 | ||
717 | LIBIMOBILEDEVICE_API mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor) | 717 | mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor) |
718 | { | 718 | { |
719 | mobilesync_anchors_t anchors = (mobilesync_anchors_t) malloc(sizeof(mobilesync_anchors)); | 719 | mobilesync_anchors_t anchors = (mobilesync_anchors_t) malloc(sizeof(mobilesync_anchors)); |
720 | if (device_anchor != NULL) { | 720 | if (device_anchor != NULL) { |
@@ -731,7 +731,7 @@ LIBIMOBILEDEVICE_API mobilesync_anchors_t mobilesync_anchors_new(const char *dev | |||
731 | return anchors; | 731 | return anchors; |
732 | } | 732 | } |
733 | 733 | ||
734 | LIBIMOBILEDEVICE_API void mobilesync_anchors_free(mobilesync_anchors_t anchors) | 734 | void mobilesync_anchors_free(mobilesync_anchors_t anchors) |
735 | { | 735 | { |
736 | if (anchors->device_anchor != NULL) { | 736 | if (anchors->device_anchor != NULL) { |
737 | free(anchors->device_anchor); | 737 | free(anchors->device_anchor); |
@@ -745,12 +745,12 @@ LIBIMOBILEDEVICE_API void mobilesync_anchors_free(mobilesync_anchors_t anchors) | |||
745 | anchors = NULL; | 745 | anchors = NULL; |
746 | } | 746 | } |
747 | 747 | ||
748 | LIBIMOBILEDEVICE_API plist_t mobilesync_actions_new(void) | 748 | plist_t mobilesync_actions_new(void) |
749 | { | 749 | { |
750 | return plist_new_dict(); | 750 | return plist_new_dict(); |
751 | } | 751 | } |
752 | 752 | ||
753 | LIBIMOBILEDEVICE_API void mobilesync_actions_add(plist_t actions, ...) | 753 | void mobilesync_actions_add(plist_t actions, ...) |
754 | { | 754 | { |
755 | if (!actions) | 755 | if (!actions) |
756 | return; | 756 | return; |
@@ -782,7 +782,7 @@ LIBIMOBILEDEVICE_API void mobilesync_actions_add(plist_t actions, ...) | |||
782 | va_end(args); | 782 | va_end(args); |
783 | } | 783 | } |
784 | 784 | ||
785 | LIBIMOBILEDEVICE_API void mobilesync_actions_free(plist_t actions) | 785 | void mobilesync_actions_free(plist_t actions) |
786 | { | 786 | { |
787 | if (actions) { | 787 | if (actions) { |
788 | plist_free(actions); | 788 | plist_free(actions); |
diff --git a/src/mobilesync.h b/src/mobilesync.h index f672252..3b5ece9 100644 --- a/src/mobilesync.h +++ b/src/mobilesync.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #ifndef __MOBILESYNC_H | 23 | #ifndef __MOBILESYNC_H |
24 | #define __MOBILESYNC_H | 24 | #define __MOBILESYNC_H |
25 | 25 | ||
26 | #include "idevice.h" | ||
26 | #include "libimobiledevice/mobilesync.h" | 27 | #include "libimobiledevice/mobilesync.h" |
27 | #include "device_link_service.h" | 28 | #include "device_link_service.h" |
28 | 29 | ||
diff --git a/src/notification_proxy.c b/src/notification_proxy.c index e17e2fe..60b2e03 100644 --- a/src/notification_proxy.c +++ b/src/notification_proxy.c | |||
@@ -89,7 +89,7 @@ static np_error_t np_error(property_list_service_error_t err) | |||
89 | return NP_E_UNKNOWN_ERROR; | 89 | return NP_E_UNKNOWN_ERROR; |
90 | } | 90 | } |
91 | 91 | ||
92 | LIBIMOBILEDEVICE_API np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t service, np_client_t *client) | 92 | np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t service, np_client_t *client) |
93 | { | 93 | { |
94 | property_list_service_client_t plistclient = NULL; | 94 | property_list_service_client_t plistclient = NULL; |
95 | np_error_t err = np_error(property_list_service_client_new(device, service, &plistclient)); | 95 | np_error_t err = np_error(property_list_service_client_new(device, service, &plistclient)); |
@@ -107,14 +107,14 @@ LIBIMOBILEDEVICE_API np_error_t np_client_new(idevice_t device, lockdownd_servic | |||
107 | return NP_E_SUCCESS; | 107 | return NP_E_SUCCESS; |
108 | } | 108 | } |
109 | 109 | ||
110 | LIBIMOBILEDEVICE_API np_error_t np_client_start_service(idevice_t device, np_client_t* client, const char* label) | 110 | np_error_t np_client_start_service(idevice_t device, np_client_t* client, const char* label) |
111 | { | 111 | { |
112 | np_error_t err = NP_E_UNKNOWN_ERROR; | 112 | np_error_t err = NP_E_UNKNOWN_ERROR; |
113 | service_client_factory_start_service(device, NP_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(np_client_new), &err); | 113 | service_client_factory_start_service(device, NP_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(np_client_new), &err); |
114 | return err; | 114 | return err; |
115 | } | 115 | } |
116 | 116 | ||
117 | LIBIMOBILEDEVICE_API np_error_t np_client_free(np_client_t client) | 117 | np_error_t np_client_free(np_client_t client) |
118 | { | 118 | { |
119 | plist_t dict; | 119 | plist_t dict; |
120 | property_list_service_client_t parent; | 120 | property_list_service_client_t parent; |
@@ -168,7 +168,7 @@ LIBIMOBILEDEVICE_API np_error_t np_client_free(np_client_t client) | |||
168 | return NP_E_SUCCESS; | 168 | return NP_E_SUCCESS; |
169 | } | 169 | } |
170 | 170 | ||
171 | LIBIMOBILEDEVICE_API np_error_t np_post_notification(np_client_t client, const char *notification) | 171 | np_error_t np_post_notification(np_client_t client, const char *notification) |
172 | { | 172 | { |
173 | if (!client || !notification) { | 173 | if (!client || !notification) { |
174 | return NP_E_INVALID_ARG; | 174 | return NP_E_INVALID_ARG; |
@@ -204,7 +204,7 @@ static np_error_t internal_np_observe_notification(np_client_t client, const cha | |||
204 | return res; | 204 | return res; |
205 | } | 205 | } |
206 | 206 | ||
207 | LIBIMOBILEDEVICE_API np_error_t np_observe_notification( np_client_t client, const char *notification ) | 207 | np_error_t np_observe_notification( np_client_t client, const char *notification ) |
208 | { | 208 | { |
209 | if (!client || !notification) { | 209 | if (!client || !notification) { |
210 | return NP_E_INVALID_ARG; | 210 | return NP_E_INVALID_ARG; |
@@ -215,7 +215,7 @@ LIBIMOBILEDEVICE_API np_error_t np_observe_notification( np_client_t client, con | |||
215 | return res; | 215 | return res; |
216 | } | 216 | } |
217 | 217 | ||
218 | LIBIMOBILEDEVICE_API np_error_t np_observe_notifications(np_client_t client, const char **notification_spec) | 218 | np_error_t np_observe_notifications(np_client_t client, const char **notification_spec) |
219 | { | 219 | { |
220 | int i = 0; | 220 | int i = 0; |
221 | np_error_t res = NP_E_UNKNOWN_ERROR; | 221 | np_error_t res = NP_E_UNKNOWN_ERROR; |
@@ -346,7 +346,7 @@ void* np_notifier( void* arg ) | |||
346 | return NULL; | 346 | return NULL; |
347 | } | 347 | } |
348 | 348 | ||
349 | LIBIMOBILEDEVICE_API np_error_t np_set_notify_callback( np_client_t client, np_notify_cb_t notify_cb, void *user_data ) | 349 | np_error_t np_set_notify_callback( np_client_t client, np_notify_cb_t notify_cb, void *user_data ) |
350 | { | 350 | { |
351 | if (!client) | 351 | if (!client) |
352 | return NP_E_INVALID_ARG; | 352 | return NP_E_INVALID_ARG; |
diff --git a/src/notification_proxy.h b/src/notification_proxy.h index ea85149..595cb01 100644 --- a/src/notification_proxy.h +++ b/src/notification_proxy.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __NOTIFICATION_PROXY_H | 22 | #ifndef __NOTIFICATION_PROXY_H |
23 | #define __NOTIFICATION_PROXY_H | 23 | #define __NOTIFICATION_PROXY_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/notification_proxy.h" | 26 | #include "libimobiledevice/notification_proxy.h" |
26 | #include "property_list_service.h" | 27 | #include "property_list_service.h" |
27 | #include <libimobiledevice-glue/thread.h> | 28 | #include <libimobiledevice-glue/thread.h> |
diff --git a/src/preboard.c b/src/preboard.c index 4b3b444..c3eff02 100644 --- a/src/preboard.c +++ b/src/preboard.c | |||
@@ -62,7 +62,7 @@ static preboard_error_t preboard_error(property_list_service_error_t err) | |||
62 | return PREBOARD_E_UNKNOWN_ERROR; | 62 | return PREBOARD_E_UNKNOWN_ERROR; |
63 | } | 63 | } |
64 | 64 | ||
65 | LIBIMOBILEDEVICE_API preboard_error_t preboard_client_new(idevice_t device, lockdownd_service_descriptor_t service, preboard_client_t * client) | 65 | preboard_error_t preboard_client_new(idevice_t device, lockdownd_service_descriptor_t service, preboard_client_t * client) |
66 | { | 66 | { |
67 | *client = NULL; | 67 | *client = NULL; |
68 | 68 | ||
@@ -90,14 +90,14 @@ LIBIMOBILEDEVICE_API preboard_error_t preboard_client_new(idevice_t device, lock | |||
90 | return 0; | 90 | return 0; |
91 | } | 91 | } |
92 | 92 | ||
93 | LIBIMOBILEDEVICE_API preboard_error_t preboard_client_start_service(idevice_t device, preboard_client_t * client, const char* label) | 93 | preboard_error_t preboard_client_start_service(idevice_t device, preboard_client_t * client, const char* label) |
94 | { | 94 | { |
95 | preboard_error_t err = PREBOARD_E_UNKNOWN_ERROR; | 95 | preboard_error_t err = PREBOARD_E_UNKNOWN_ERROR; |
96 | service_client_factory_start_service(device, PREBOARD_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(preboard_client_new), &err); | 96 | service_client_factory_start_service(device, PREBOARD_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(preboard_client_new), &err); |
97 | return err; | 97 | return err; |
98 | } | 98 | } |
99 | 99 | ||
100 | LIBIMOBILEDEVICE_API preboard_error_t preboard_client_free(preboard_client_t client) | 100 | preboard_error_t preboard_client_free(preboard_client_t client) |
101 | { | 101 | { |
102 | if (!client) | 102 | if (!client) |
103 | return PREBOARD_E_INVALID_ARG; | 103 | return PREBOARD_E_INVALID_ARG; |
@@ -116,7 +116,7 @@ LIBIMOBILEDEVICE_API preboard_error_t preboard_client_free(preboard_client_t cli | |||
116 | return err; | 116 | return err; |
117 | } | 117 | } |
118 | 118 | ||
119 | LIBIMOBILEDEVICE_API preboard_error_t preboard_send(preboard_client_t client, plist_t plist) | 119 | preboard_error_t preboard_send(preboard_client_t client, plist_t plist) |
120 | { | 120 | { |
121 | preboard_error_t res = PREBOARD_E_UNKNOWN_ERROR; | 121 | preboard_error_t res = PREBOARD_E_UNKNOWN_ERROR; |
122 | res = preboard_error(property_list_service_send_binary_plist(client->parent, plist)); | 122 | res = preboard_error(property_list_service_send_binary_plist(client->parent, plist)); |
@@ -127,7 +127,7 @@ LIBIMOBILEDEVICE_API preboard_error_t preboard_send(preboard_client_t client, pl | |||
127 | return res; | 127 | return res; |
128 | } | 128 | } |
129 | 129 | ||
130 | LIBIMOBILEDEVICE_API preboard_error_t preboard_receive_with_timeout(preboard_client_t client, plist_t * plist, uint32_t timeout_ms) | 130 | preboard_error_t preboard_receive_with_timeout(preboard_client_t client, plist_t * plist, uint32_t timeout_ms) |
131 | { | 131 | { |
132 | preboard_error_t res = PREBOARD_E_UNKNOWN_ERROR; | 132 | preboard_error_t res = PREBOARD_E_UNKNOWN_ERROR; |
133 | plist_t outplist = NULL; | 133 | plist_t outplist = NULL; |
@@ -141,7 +141,7 @@ LIBIMOBILEDEVICE_API preboard_error_t preboard_receive_with_timeout(preboard_cli | |||
141 | return res; | 141 | return res; |
142 | } | 142 | } |
143 | 143 | ||
144 | LIBIMOBILEDEVICE_API preboard_error_t preboard_receive(preboard_client_t client, plist_t * plist) | 144 | preboard_error_t preboard_receive(preboard_client_t client, plist_t * plist) |
145 | { | 145 | { |
146 | return preboard_receive_with_timeout(client, plist, 5000); | 146 | return preboard_receive_with_timeout(client, plist, 5000); |
147 | } | 147 | } |
@@ -209,7 +209,7 @@ static preboard_error_t preboard_receive_status_loop_with_callback(preboard_clie | |||
209 | return res; | 209 | return res; |
210 | } | 210 | } |
211 | 211 | ||
212 | LIBIMOBILEDEVICE_API preboard_error_t preboard_create_stashbag(preboard_client_t client, plist_t manifest, preboard_status_cb_t status_cb, void *user_data) | 212 | preboard_error_t preboard_create_stashbag(preboard_client_t client, plist_t manifest, preboard_status_cb_t status_cb, void *user_data) |
213 | { | 213 | { |
214 | if (!client) { | 214 | if (!client) { |
215 | return PREBOARD_E_INVALID_ARG; | 215 | return PREBOARD_E_INVALID_ARG; |
@@ -232,7 +232,7 @@ LIBIMOBILEDEVICE_API preboard_error_t preboard_create_stashbag(preboard_client_t | |||
232 | return preboard_receive_status_loop_with_callback(client, status_cb, user_data); | 232 | return preboard_receive_status_loop_with_callback(client, status_cb, user_data); |
233 | } | 233 | } |
234 | 234 | ||
235 | LIBIMOBILEDEVICE_API preboard_error_t preboard_commit_stashbag(preboard_client_t client, plist_t manifest, preboard_status_cb_t status_cb, void *user_data) | 235 | preboard_error_t preboard_commit_stashbag(preboard_client_t client, plist_t manifest, preboard_status_cb_t status_cb, void *user_data) |
236 | { | 236 | { |
237 | if (!client) { | 237 | if (!client) { |
238 | return PREBOARD_E_INVALID_ARG; | 238 | return PREBOARD_E_INVALID_ARG; |
diff --git a/src/preboard.h b/src/preboard.h index 61263fc..f8164eb 100644 --- a/src/preboard.h +++ b/src/preboard.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __PREBOARD_H | 22 | #ifndef __PREBOARD_H |
23 | #define __PREBOARD_H | 23 | #define __PREBOARD_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/preboard.h" | 26 | #include "libimobiledevice/preboard.h" |
26 | #include "property_list_service.h" | 27 | #include "property_list_service.h" |
27 | #include <libimobiledevice-glue/thread.h> | 28 | #include <libimobiledevice-glue/thread.h> |
diff --git a/src/property_list_service.c b/src/property_list_service.c index 4654b6e..2fca4e7 100644 --- a/src/property_list_service.c +++ b/src/property_list_service.c | |||
@@ -58,7 +58,7 @@ static property_list_service_error_t service_to_property_list_service_error(serv | |||
58 | return PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR; | 58 | return PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR; |
59 | } | 59 | } |
60 | 60 | ||
61 | 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) | 61 | property_list_service_error_t property_list_service_client_new(idevice_t device, lockdownd_service_descriptor_t service, property_list_service_client_t *client) |
62 | { | 62 | { |
63 | if (!device || !service || service->port == 0 || !client || *client) | 63 | if (!device || !service || service->port == 0 || !client || *client) |
64 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; | 64 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; |
@@ -78,7 +78,7 @@ LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_client_ | |||
78 | return PROPERTY_LIST_SERVICE_E_SUCCESS; | 78 | return PROPERTY_LIST_SERVICE_E_SUCCESS; |
79 | } | 79 | } |
80 | 80 | ||
81 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_client_free(property_list_service_client_t client) | 81 | property_list_service_error_t property_list_service_client_free(property_list_service_client_t client) |
82 | { | 82 | { |
83 | if (!client) | 83 | if (!client) |
84 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; | 84 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; |
@@ -152,12 +152,12 @@ static property_list_service_error_t internal_plist_send(property_list_service_c | |||
152 | return res; | 152 | return res; |
153 | } | 153 | } |
154 | 154 | ||
155 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_send_xml_plist(property_list_service_client_t client, plist_t plist) | 155 | property_list_service_error_t property_list_service_send_xml_plist(property_list_service_client_t client, plist_t plist) |
156 | { | 156 | { |
157 | return internal_plist_send(client, plist, 0); | 157 | return internal_plist_send(client, plist, 0); |
158 | } | 158 | } |
159 | 159 | ||
160 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_send_binary_plist(property_list_service_client_t client, plist_t plist) | 160 | property_list_service_error_t property_list_service_send_binary_plist(property_list_service_client_t client, plist_t plist) |
161 | { | 161 | { |
162 | return internal_plist_send(client, plist, 1); | 162 | return internal_plist_send(client, plist, 1); |
163 | } | 163 | } |
@@ -262,31 +262,31 @@ static property_list_service_error_t internal_plist_receive_timeout(property_lis | |||
262 | return res; | 262 | return res; |
263 | } | 263 | } |
264 | 264 | ||
265 | 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) | 265 | property_list_service_error_t property_list_service_receive_plist_with_timeout(property_list_service_client_t client, plist_t *plist, unsigned int timeout) |
266 | { | 266 | { |
267 | return internal_plist_receive_timeout(client, plist, timeout); | 267 | return internal_plist_receive_timeout(client, plist, timeout); |
268 | } | 268 | } |
269 | 269 | ||
270 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_receive_plist(property_list_service_client_t client, plist_t *plist) | 270 | property_list_service_error_t property_list_service_receive_plist(property_list_service_client_t client, plist_t *plist) |
271 | { | 271 | { |
272 | return internal_plist_receive_timeout(client, plist, 30000); | 272 | return internal_plist_receive_timeout(client, plist, 30000); |
273 | } | 273 | } |
274 | 274 | ||
275 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_enable_ssl(property_list_service_client_t client) | 275 | property_list_service_error_t property_list_service_enable_ssl(property_list_service_client_t client) |
276 | { | 276 | { |
277 | if (!client || !client->parent) | 277 | if (!client || !client->parent) |
278 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; | 278 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; |
279 | return service_to_property_list_service_error(service_enable_ssl(client->parent)); | 279 | return service_to_property_list_service_error(service_enable_ssl(client->parent)); |
280 | } | 280 | } |
281 | 281 | ||
282 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_disable_ssl(property_list_service_client_t client) | 282 | property_list_service_error_t property_list_service_disable_ssl(property_list_service_client_t client) |
283 | { | 283 | { |
284 | if (!client || !client->parent) | 284 | if (!client || !client->parent) |
285 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; | 285 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; |
286 | return service_to_property_list_service_error(service_disable_ssl(client->parent)); | 286 | return service_to_property_list_service_error(service_disable_ssl(client->parent)); |
287 | } | 287 | } |
288 | 288 | ||
289 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_get_service_client(property_list_service_client_t client, service_client_t *service_client) | 289 | property_list_service_error_t property_list_service_get_service_client(property_list_service_client_t client, service_client_t *service_client) |
290 | { | 290 | { |
291 | if (!client || !client->parent || !service_client) | 291 | if (!client || !client->parent || !service_client) |
292 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; | 292 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; |
diff --git a/src/property_list_service.h b/src/property_list_service.h index 3c9e14d..0e9e948 100644 --- a/src/property_list_service.h +++ b/src/property_list_service.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __PROPERTY_LIST_SERVICE_H | 22 | #ifndef __PROPERTY_LIST_SERVICE_H |
23 | #define __PROPERTY_LIST_SERVICE_H | 23 | #define __PROPERTY_LIST_SERVICE_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/property_list_service.h" | 26 | #include "libimobiledevice/property_list_service.h" |
26 | #include "service.h" | 27 | #include "service.h" |
27 | 28 | ||
diff --git a/src/restore.c b/src/restore.c index 41bfb9d..d13a28a 100644 --- a/src/restore.c +++ b/src/restore.c | |||
@@ -111,7 +111,7 @@ static restored_error_t restored_error(property_list_service_error_t err) | |||
111 | return RESTORE_E_UNKNOWN_ERROR; | 111 | return RESTORE_E_UNKNOWN_ERROR; |
112 | } | 112 | } |
113 | 113 | ||
114 | LIBIMOBILEDEVICE_API restored_error_t restored_client_free(restored_client_t client) | 114 | restored_error_t restored_client_free(restored_client_t client) |
115 | { | 115 | { |
116 | if (!client) | 116 | if (!client) |
117 | return RESTORE_E_INVALID_ARG; | 117 | return RESTORE_E_INVALID_ARG; |
@@ -139,7 +139,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_client_free(restored_client_t cli | |||
139 | return ret; | 139 | return ret; |
140 | } | 140 | } |
141 | 141 | ||
142 | LIBIMOBILEDEVICE_API void restored_client_set_label(restored_client_t client, const char *label) | 142 | void restored_client_set_label(restored_client_t client, const char *label) |
143 | { | 143 | { |
144 | if (client) { | 144 | if (client) { |
145 | if (client->label) | 145 | if (client->label) |
@@ -149,7 +149,7 @@ LIBIMOBILEDEVICE_API void restored_client_set_label(restored_client_t client, co | |||
149 | } | 149 | } |
150 | } | 150 | } |
151 | 151 | ||
152 | LIBIMOBILEDEVICE_API restored_error_t restored_receive(restored_client_t client, plist_t *plist) | 152 | restored_error_t restored_receive(restored_client_t client, plist_t *plist) |
153 | { | 153 | { |
154 | if (!client || !plist || (plist && *plist)) | 154 | if (!client || !plist || (plist && *plist)) |
155 | return RESTORE_E_INVALID_ARG; | 155 | return RESTORE_E_INVALID_ARG; |
@@ -157,7 +157,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_receive(restored_client_t client, | |||
157 | return restored_error(property_list_service_receive_plist(client->parent, plist)); | 157 | return restored_error(property_list_service_receive_plist(client->parent, plist)); |
158 | } | 158 | } |
159 | 159 | ||
160 | LIBIMOBILEDEVICE_API restored_error_t restored_send(restored_client_t client, plist_t plist) | 160 | restored_error_t restored_send(restored_client_t client, plist_t plist) |
161 | { | 161 | { |
162 | if (!client || !plist) | 162 | if (!client || !plist) |
163 | return RESTORE_E_INVALID_ARG; | 163 | return RESTORE_E_INVALID_ARG; |
@@ -165,7 +165,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_send(restored_client_t client, pl | |||
165 | return restored_error(property_list_service_send_xml_plist(client->parent, plist)); | 165 | return restored_error(property_list_service_send_xml_plist(client->parent, plist)); |
166 | } | 166 | } |
167 | 167 | ||
168 | LIBIMOBILEDEVICE_API restored_error_t restored_query_type(restored_client_t client, char **type, uint64_t *version) | 168 | restored_error_t restored_query_type(restored_client_t client, char **type, uint64_t *version) |
169 | { | 169 | { |
170 | if (!client) | 170 | if (!client) |
171 | return RESTORE_E_INVALID_ARG; | 171 | return RESTORE_E_INVALID_ARG; |
@@ -224,7 +224,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_query_type(restored_client_t clie | |||
224 | return ret; | 224 | return ret; |
225 | } | 225 | } |
226 | 226 | ||
227 | LIBIMOBILEDEVICE_API restored_error_t restored_query_value(restored_client_t client, const char *key, plist_t *value) | 227 | restored_error_t restored_query_value(restored_client_t client, const char *key, plist_t *value) |
228 | { | 228 | { |
229 | if (!client || !key) | 229 | if (!client || !key) |
230 | return RESTORE_E_INVALID_ARG; | 230 | return RESTORE_E_INVALID_ARG; |
@@ -266,7 +266,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_query_value(restored_client_t cli | |||
266 | return ret; | 266 | return ret; |
267 | } | 267 | } |
268 | 268 | ||
269 | LIBIMOBILEDEVICE_API restored_error_t restored_get_value(restored_client_t client, const char *key, plist_t *value) | 269 | restored_error_t restored_get_value(restored_client_t client, const char *key, plist_t *value) |
270 | { | 270 | { |
271 | plist_t item; | 271 | plist_t item; |
272 | 272 | ||
@@ -291,7 +291,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_get_value(restored_client_t clien | |||
291 | return RESTORE_E_SUCCESS; | 291 | return RESTORE_E_SUCCESS; |
292 | } | 292 | } |
293 | 293 | ||
294 | LIBIMOBILEDEVICE_API restored_error_t restored_client_new(idevice_t device, restored_client_t *client, const char *label) | 294 | restored_error_t restored_client_new(idevice_t device, restored_client_t *client, const char *label) |
295 | { | 295 | { |
296 | if (!client) | 296 | if (!client) |
297 | return RESTORE_E_INVALID_ARG; | 297 | return RESTORE_E_INVALID_ARG; |
@@ -335,7 +335,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_client_new(idevice_t device, rest | |||
335 | return ret; | 335 | return ret; |
336 | } | 336 | } |
337 | 337 | ||
338 | LIBIMOBILEDEVICE_API restored_error_t restored_goodbye(restored_client_t client) | 338 | restored_error_t restored_goodbye(restored_client_t client) |
339 | { | 339 | { |
340 | if (!client) | 340 | if (!client) |
341 | return RESTORE_E_INVALID_ARG; | 341 | return RESTORE_E_INVALID_ARG; |
@@ -367,7 +367,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_goodbye(restored_client_t client) | |||
367 | return ret; | 367 | return ret; |
368 | } | 368 | } |
369 | 369 | ||
370 | LIBIMOBILEDEVICE_API restored_error_t restored_start_restore(restored_client_t client, plist_t options, uint64_t version) | 370 | restored_error_t restored_start_restore(restored_client_t client, plist_t options, uint64_t version) |
371 | { | 371 | { |
372 | if (!client) | 372 | if (!client) |
373 | return RESTORE_E_INVALID_ARG; | 373 | return RESTORE_E_INVALID_ARG; |
@@ -391,7 +391,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_start_restore(restored_client_t c | |||
391 | return ret; | 391 | return ret; |
392 | } | 392 | } |
393 | 393 | ||
394 | LIBIMOBILEDEVICE_API restored_error_t restored_reboot(restored_client_t client) | 394 | restored_error_t restored_reboot(restored_client_t client) |
395 | { | 395 | { |
396 | if (!client) | 396 | if (!client) |
397 | return RESTORE_E_INVALID_ARG; | 397 | return RESTORE_E_INVALID_ARG; |
diff --git a/src/restore.h b/src/restore.h index 646d1d1..ec6fa04 100644 --- a/src/restore.h +++ b/src/restore.h | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <string.h> | 25 | #include <string.h> |
26 | 26 | ||
27 | #include "idevice.h" | ||
27 | #include "libimobiledevice/restore.h" | 28 | #include "libimobiledevice/restore.h" |
28 | #include "property_list_service.h" | 29 | #include "property_list_service.h" |
29 | 30 | ||
diff --git a/src/reverse_proxy.c b/src/reverse_proxy.c index bca0a13..2fcfdd1 100644 --- a/src/reverse_proxy.c +++ b/src/reverse_proxy.c | |||
@@ -528,7 +528,7 @@ static void* _reverse_proxy_control_thread(void *cdata) | |||
528 | return NULL; | 528 | return NULL; |
529 | } | 529 | } |
530 | 530 | ||
531 | LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_start_proxy(reverse_proxy_client_t client, int control_protocol_version) | 531 | reverse_proxy_error_t reverse_proxy_client_start_proxy(reverse_proxy_client_t client, int control_protocol_version) |
532 | { | 532 | { |
533 | char buf[16] = {0, }; | 533 | char buf[16] = {0, }; |
534 | uint32_t bytes = 0; | 534 | uint32_t bytes = 0; |
@@ -607,7 +607,7 @@ LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_start_proxy(reve | |||
607 | return err; | 607 | return err; |
608 | } | 608 | } |
609 | 609 | ||
610 | LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_create_with_service(idevice_t device, reverse_proxy_client_t* client, const char* label) | 610 | reverse_proxy_error_t reverse_proxy_client_create_with_service(idevice_t device, reverse_proxy_client_t* client, const char* label) |
611 | { | 611 | { |
612 | reverse_proxy_error_t err = REVERSE_PROXY_E_UNKNOWN_ERROR; | 612 | reverse_proxy_error_t err = REVERSE_PROXY_E_UNKNOWN_ERROR; |
613 | service_client_factory_start_service(device, "com.apple.PurpleReverseProxy.Ctrl", (void**)client, label, SERVICE_CONSTRUCTOR(reverse_proxy_client_new), &err); | 613 | service_client_factory_start_service(device, "com.apple.PurpleReverseProxy.Ctrl", (void**)client, label, SERVICE_CONSTRUCTOR(reverse_proxy_client_new), &err); |
@@ -620,7 +620,7 @@ LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_create_with_serv | |||
620 | return REVERSE_PROXY_E_SUCCESS; | 620 | return REVERSE_PROXY_E_SUCCESS; |
621 | } | 621 | } |
622 | 622 | ||
623 | LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_create_with_port(idevice_t device, reverse_proxy_client_t* client, uint16_t device_port) | 623 | reverse_proxy_error_t reverse_proxy_client_create_with_port(idevice_t device, reverse_proxy_client_t* client, uint16_t device_port) |
624 | { | 624 | { |
625 | reverse_proxy_client_t client_loc = NULL; | 625 | reverse_proxy_client_t client_loc = NULL; |
626 | reverse_proxy_error_t err; | 626 | reverse_proxy_error_t err; |
@@ -641,7 +641,7 @@ LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_create_with_port | |||
641 | return REVERSE_PROXY_E_SUCCESS; | 641 | return REVERSE_PROXY_E_SUCCESS; |
642 | } | 642 | } |
643 | 643 | ||
644 | LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_free(reverse_proxy_client_t client) | 644 | reverse_proxy_error_t reverse_proxy_client_free(reverse_proxy_client_t client) |
645 | { | 645 | { |
646 | if (!client) | 646 | if (!client) |
647 | return REVERSE_PROXY_E_INVALID_ARG; | 647 | return REVERSE_PROXY_E_INVALID_ARG; |
@@ -660,14 +660,14 @@ LIBIMOBILEDEVICE_API reverse_proxy_error_t reverse_proxy_client_free(reverse_pro | |||
660 | return err; | 660 | return err; |
661 | } | 661 | } |
662 | 662 | ||
663 | LIBIMOBILEDEVICE_API reverse_proxy_client_type_t reverse_proxy_get_type(reverse_proxy_client_t client) | 663 | reverse_proxy_client_type_t reverse_proxy_get_type(reverse_proxy_client_t client) |
664 | { | 664 | { |
665 | if (!client) | 665 | if (!client) |
666 | return 0; | 666 | return 0; |
667 | return client->type; | 667 | return client->type; |
668 | } | 668 | } |
669 | 669 | ||
670 | LIBIMOBILEDEVICE_API void reverse_proxy_client_set_status_callback(reverse_proxy_client_t client, reverse_proxy_status_cb_t status_callback, void* user_data) | 670 | void reverse_proxy_client_set_status_callback(reverse_proxy_client_t client, reverse_proxy_status_cb_t status_callback, void* user_data) |
671 | { | 671 | { |
672 | if (!client) { | 672 | if (!client) { |
673 | return; | 673 | return; |
@@ -676,7 +676,7 @@ LIBIMOBILEDEVICE_API void reverse_proxy_client_set_status_callback(reverse_proxy | |||
676 | client->status_cb_user_data = user_data; | 676 | client->status_cb_user_data = user_data; |
677 | } | 677 | } |
678 | 678 | ||
679 | LIBIMOBILEDEVICE_API void reverse_proxy_client_set_log_callback(reverse_proxy_client_t client, reverse_proxy_log_cb_t log_callback, void* user_data) | 679 | void reverse_proxy_client_set_log_callback(reverse_proxy_client_t client, reverse_proxy_log_cb_t log_callback, void* user_data) |
680 | { | 680 | { |
681 | if (!client) { | 681 | if (!client) { |
682 | return; | 682 | return; |
@@ -685,7 +685,7 @@ LIBIMOBILEDEVICE_API void reverse_proxy_client_set_log_callback(reverse_proxy_cl | |||
685 | client->log_cb_user_data = user_data; | 685 | client->log_cb_user_data = user_data; |
686 | } | 686 | } |
687 | 687 | ||
688 | LIBIMOBILEDEVICE_API void reverse_proxy_client_set_data_callback(reverse_proxy_client_t client, reverse_proxy_data_cb_t data_callback, void* user_data) | 688 | void reverse_proxy_client_set_data_callback(reverse_proxy_client_t client, reverse_proxy_data_cb_t data_callback, void* user_data) |
689 | { | 689 | { |
690 | if (!client) { | 690 | if (!client) { |
691 | return; | 691 | return; |
diff --git a/src/reverse_proxy.h b/src/reverse_proxy.h index 17eabac..7f441bd 100644 --- a/src/reverse_proxy.h +++ b/src/reverse_proxy.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __REVERSE_PROXY_H | 22 | #ifndef __REVERSE_PROXY_H |
23 | #define __REVERSE_PROXY_H | 23 | #define __REVERSE_PROXY_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/reverse_proxy.h" | 26 | #include "libimobiledevice/reverse_proxy.h" |
26 | #include "service.h" | 27 | #include "service.h" |
27 | 28 | ||
diff --git a/src/sbservices.c b/src/sbservices.c index c7ee911..365e130 100644 --- a/src/sbservices.c +++ b/src/sbservices.c | |||
@@ -79,7 +79,7 @@ static sbservices_error_t sbservices_error(property_list_service_error_t err) | |||
79 | return SBSERVICES_E_UNKNOWN_ERROR; | 79 | return SBSERVICES_E_UNKNOWN_ERROR; |
80 | } | 80 | } |
81 | 81 | ||
82 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_descriptor_t service, sbservices_client_t *client) | 82 | sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_descriptor_t service, sbservices_client_t *client) |
83 | { | 83 | { |
84 | property_list_service_client_t plistclient = NULL; | 84 | property_list_service_client_t plistclient = NULL; |
85 | sbservices_error_t err = sbservices_error(property_list_service_client_new(device, service, &plistclient)); | 85 | sbservices_error_t err = sbservices_error(property_list_service_client_new(device, service, &plistclient)); |
@@ -95,14 +95,14 @@ LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_new(idevice_t device, | |||
95 | return SBSERVICES_E_SUCCESS; | 95 | return SBSERVICES_E_SUCCESS; |
96 | } | 96 | } |
97 | 97 | ||
98 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_client_t * client, const char* label) | 98 | sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_client_t * client, const char* label) |
99 | { | 99 | { |
100 | sbservices_error_t err = SBSERVICES_E_UNKNOWN_ERROR; | 100 | sbservices_error_t err = SBSERVICES_E_UNKNOWN_ERROR; |
101 | service_client_factory_start_service(device, SBSERVICES_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(sbservices_client_new), &err); | 101 | service_client_factory_start_service(device, SBSERVICES_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(sbservices_client_new), &err); |
102 | return err; | 102 | return err; |
103 | } | 103 | } |
104 | 104 | ||
105 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_free(sbservices_client_t client) | 105 | sbservices_error_t sbservices_client_free(sbservices_client_t client) |
106 | { | 106 | { |
107 | if (!client) | 107 | if (!client) |
108 | return SBSERVICES_E_INVALID_ARG; | 108 | return SBSERVICES_E_INVALID_ARG; |
@@ -115,7 +115,7 @@ LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_free(sbservices_client | |||
115 | return err; | 115 | return err; |
116 | } | 116 | } |
117 | 117 | ||
118 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version) | 118 | sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version) |
119 | { | 119 | { |
120 | if (!client || !client->parent || !state) | 120 | if (!client || !client->parent || !state) |
121 | return SBSERVICES_E_INVALID_ARG; | 121 | return SBSERVICES_E_INVALID_ARG; |
@@ -155,7 +155,7 @@ leave_unlock: | |||
155 | return res; | 155 | return res; |
156 | } | 156 | } |
157 | 157 | ||
158 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate) | 158 | sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate) |
159 | { | 159 | { |
160 | if (!client || !client->parent || !newstate) | 160 | if (!client || !client->parent || !newstate) |
161 | return SBSERVICES_E_INVALID_ARG; | 161 | return SBSERVICES_E_INVALID_ARG; |
@@ -184,7 +184,7 @@ LIBIMOBILEDEVICE_API sbservices_error_t sbservices_set_icon_state(sbservices_cli | |||
184 | return res; | 184 | return res; |
185 | } | 185 | } |
186 | 186 | ||
187 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize) | 187 | sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize) |
188 | { | 188 | { |
189 | if (!client || !client->parent || !bundleId || !pngdata) | 189 | if (!client || !client->parent || !bundleId || !pngdata) |
190 | return SBSERVICES_E_INVALID_ARG; | 190 | return SBSERVICES_E_INVALID_ARG; |
@@ -221,7 +221,7 @@ leave_unlock: | |||
221 | return res; | 221 | return res; |
222 | } | 222 | } |
223 | 223 | ||
224 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t client, sbservices_interface_orientation_t* interface_orientation) | 224 | sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t client, sbservices_interface_orientation_t* interface_orientation) |
225 | { | 225 | { |
226 | if (!client || !client->parent || !interface_orientation) | 226 | if (!client || !client->parent || !interface_orientation) |
227 | return SBSERVICES_E_INVALID_ARG; | 227 | return SBSERVICES_E_INVALID_ARG; |
@@ -259,7 +259,7 @@ leave_unlock: | |||
259 | return res; | 259 | return res; |
260 | } | 260 | } |
261 | 261 | ||
262 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_home_screen_wallpaper_pngdata(sbservices_client_t client, char **pngdata, uint64_t *pngsize) | 262 | sbservices_error_t sbservices_get_home_screen_wallpaper_pngdata(sbservices_client_t client, char **pngdata, uint64_t *pngsize) |
263 | { | 263 | { |
264 | if (!client || !client->parent || !pngdata) | 264 | if (!client || !client->parent || !pngdata) |
265 | return SBSERVICES_E_INVALID_ARG; | 265 | return SBSERVICES_E_INVALID_ARG; |
diff --git a/src/sbservices.h b/src/sbservices.h index 39d822c..b67281e 100644 --- a/src/sbservices.h +++ b/src/sbservices.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __SBSERVICES_H | 22 | #ifndef __SBSERVICES_H |
23 | #define __SBSERVICES_H | 23 | #define __SBSERVICES_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/sbservices.h" | 26 | #include "libimobiledevice/sbservices.h" |
26 | #include "property_list_service.h" | 27 | #include "property_list_service.h" |
27 | #include <libimobiledevice-glue/thread.h> | 28 | #include <libimobiledevice-glue/thread.h> |
diff --git a/src/screenshotr.c b/src/screenshotr.c index 77835da..c3cc9ba 100644 --- a/src/screenshotr.c +++ b/src/screenshotr.c | |||
@@ -65,7 +65,7 @@ static screenshotr_error_t screenshotr_error(device_link_service_error_t err) | |||
65 | return SCREENSHOTR_E_UNKNOWN_ERROR; | 65 | return SCREENSHOTR_E_UNKNOWN_ERROR; |
66 | } | 66 | } |
67 | 67 | ||
68 | LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_descriptor_t service, | 68 | screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_descriptor_t service, |
69 | screenshotr_client_t * client) | 69 | screenshotr_client_t * client) |
70 | { | 70 | { |
71 | if (!device || !service || service->port == 0 || !client || *client) | 71 | if (!device || !service || service->port == 0 || !client || *client) |
@@ -93,14 +93,14 @@ LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_new(idevice_t device | |||
93 | return ret; | 93 | return ret; |
94 | } | 94 | } |
95 | 95 | ||
96 | LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_start_service(idevice_t device, screenshotr_client_t * client, const char* label) | 96 | screenshotr_error_t screenshotr_client_start_service(idevice_t device, screenshotr_client_t * client, const char* label) |
97 | { | 97 | { |
98 | screenshotr_error_t err = SCREENSHOTR_E_UNKNOWN_ERROR; | 98 | screenshotr_error_t err = SCREENSHOTR_E_UNKNOWN_ERROR; |
99 | service_client_factory_start_service(device, SCREENSHOTR_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(screenshotr_client_new), &err); | 99 | service_client_factory_start_service(device, SCREENSHOTR_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(screenshotr_client_new), &err); |
100 | return err; | 100 | return err; |
101 | } | 101 | } |
102 | 102 | ||
103 | LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_free(screenshotr_client_t client) | 103 | screenshotr_error_t screenshotr_client_free(screenshotr_client_t client) |
104 | { | 104 | { |
105 | if (!client) | 105 | if (!client) |
106 | return SCREENSHOTR_E_INVALID_ARG; | 106 | return SCREENSHOTR_E_INVALID_ARG; |
@@ -110,7 +110,7 @@ LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_free(screenshotr_cli | |||
110 | return err; | 110 | return err; |
111 | } | 111 | } |
112 | 112 | ||
113 | LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize) | 113 | screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize) |
114 | { | 114 | { |
115 | if (!client || !client->parent || !imgdata) | 115 | if (!client || !client->parent || !imgdata) |
116 | return SCREENSHOTR_E_INVALID_ARG; | 116 | return SCREENSHOTR_E_INVALID_ARG; |
diff --git a/src/screenshotr.h b/src/screenshotr.h index 47d4e42..1319ec0 100644 --- a/src/screenshotr.h +++ b/src/screenshotr.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __SCREENSHOTR_H | 22 | #ifndef __SCREENSHOTR_H |
23 | #define __SCREENSHOTR_H | 23 | #define __SCREENSHOTR_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/screenshotr.h" | 26 | #include "libimobiledevice/screenshotr.h" |
26 | #include "device_link_service.h" | 27 | #include "device_link_service.h" |
27 | 28 | ||
diff --git a/src/service.c b/src/service.c index 6c9d109..9474021 100644 --- a/src/service.c +++ b/src/service.c | |||
@@ -56,7 +56,7 @@ static service_error_t idevice_to_service_error(idevice_error_t err) | |||
56 | return SERVICE_E_UNKNOWN_ERROR; | 56 | return SERVICE_E_UNKNOWN_ERROR; |
57 | } | 57 | } |
58 | 58 | ||
59 | LIBIMOBILEDEVICE_API service_error_t service_client_new(idevice_t device, lockdownd_service_descriptor_t service, service_client_t *client) | 59 | service_error_t service_client_new(idevice_t device, lockdownd_service_descriptor_t service, service_client_t *client) |
60 | { | 60 | { |
61 | if (!device || !service || service->port == 0 || !client || *client) | 61 | if (!device || !service || service->port == 0 || !client || *client) |
62 | return SERVICE_E_INVALID_ARG; | 62 | return SERVICE_E_INVALID_ARG; |
@@ -80,7 +80,7 @@ LIBIMOBILEDEVICE_API service_error_t service_client_new(idevice_t device, lockdo | |||
80 | return SERVICE_E_SUCCESS; | 80 | return SERVICE_E_SUCCESS; |
81 | } | 81 | } |
82 | 82 | ||
83 | 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) | 83 | 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) |
84 | { | 84 | { |
85 | *client = NULL; | 85 | *client = NULL; |
86 | 86 | ||
@@ -119,7 +119,7 @@ LIBIMOBILEDEVICE_API service_error_t service_client_factory_start_service(idevic | |||
119 | return (ec == SERVICE_E_SUCCESS) ? SERVICE_E_SUCCESS : SERVICE_E_START_SERVICE_ERROR; | 119 | return (ec == SERVICE_E_SUCCESS) ? SERVICE_E_SUCCESS : SERVICE_E_START_SERVICE_ERROR; |
120 | } | 120 | } |
121 | 121 | ||
122 | LIBIMOBILEDEVICE_API service_error_t service_client_free(service_client_t client) | 122 | service_error_t service_client_free(service_client_t client) |
123 | { | 123 | { |
124 | if (!client) | 124 | if (!client) |
125 | return SERVICE_E_INVALID_ARG; | 125 | return SERVICE_E_INVALID_ARG; |
@@ -132,7 +132,7 @@ LIBIMOBILEDEVICE_API service_error_t service_client_free(service_client_t client | |||
132 | return err; | 132 | return err; |
133 | } | 133 | } |
134 | 134 | ||
135 | LIBIMOBILEDEVICE_API service_error_t service_send(service_client_t client, const char* data, uint32_t size, uint32_t *sent) | 135 | service_error_t service_send(service_client_t client, const char* data, uint32_t size, uint32_t *sent) |
136 | { | 136 | { |
137 | service_error_t res = SERVICE_E_UNKNOWN_ERROR; | 137 | service_error_t res = SERVICE_E_UNKNOWN_ERROR; |
138 | uint32_t bytes = 0; | 138 | uint32_t bytes = 0; |
@@ -153,7 +153,7 @@ LIBIMOBILEDEVICE_API service_error_t service_send(service_client_t client, const | |||
153 | return res; | 153 | return res; |
154 | } | 154 | } |
155 | 155 | ||
156 | LIBIMOBILEDEVICE_API service_error_t service_receive_with_timeout(service_client_t client, char* data, uint32_t size, uint32_t *received, unsigned int timeout) | 156 | service_error_t service_receive_with_timeout(service_client_t client, char* data, uint32_t size, uint32_t *received, unsigned int timeout) |
157 | { | 157 | { |
158 | service_error_t res = SERVICE_E_UNKNOWN_ERROR; | 158 | service_error_t res = SERVICE_E_UNKNOWN_ERROR; |
159 | uint32_t bytes = 0; | 159 | uint32_t bytes = 0; |
@@ -174,31 +174,31 @@ LIBIMOBILEDEVICE_API service_error_t service_receive_with_timeout(service_client | |||
174 | return res; | 174 | return res; |
175 | } | 175 | } |
176 | 176 | ||
177 | LIBIMOBILEDEVICE_API service_error_t service_receive(service_client_t client, char* data, uint32_t size, uint32_t *received) | 177 | service_error_t service_receive(service_client_t client, char* data, uint32_t size, uint32_t *received) |
178 | { | 178 | { |
179 | return service_receive_with_timeout(client, data, size, received, 30000); | 179 | return service_receive_with_timeout(client, data, size, received, 30000); |
180 | } | 180 | } |
181 | 181 | ||
182 | LIBIMOBILEDEVICE_API service_error_t service_enable_ssl(service_client_t client) | 182 | service_error_t service_enable_ssl(service_client_t client) |
183 | { | 183 | { |
184 | if (!client || !client->connection) | 184 | if (!client || !client->connection) |
185 | return SERVICE_E_INVALID_ARG; | 185 | return SERVICE_E_INVALID_ARG; |
186 | return idevice_to_service_error(idevice_connection_enable_ssl(client->connection)); | 186 | return idevice_to_service_error(idevice_connection_enable_ssl(client->connection)); |
187 | } | 187 | } |
188 | 188 | ||
189 | LIBIMOBILEDEVICE_API service_error_t service_disable_ssl(service_client_t client) | 189 | service_error_t service_disable_ssl(service_client_t client) |
190 | { | 190 | { |
191 | return service_disable_bypass_ssl(client, 0); | 191 | return service_disable_bypass_ssl(client, 0); |
192 | } | 192 | } |
193 | 193 | ||
194 | LIBIMOBILEDEVICE_API service_error_t service_disable_bypass_ssl(service_client_t client, uint8_t sslBypass) | 194 | service_error_t service_disable_bypass_ssl(service_client_t client, uint8_t sslBypass) |
195 | { | 195 | { |
196 | if (!client || !client->connection) | 196 | if (!client || !client->connection) |
197 | return SERVICE_E_INVALID_ARG; | 197 | return SERVICE_E_INVALID_ARG; |
198 | return idevice_to_service_error(idevice_connection_disable_bypass_ssl(client->connection, sslBypass)); | 198 | return idevice_to_service_error(idevice_connection_disable_bypass_ssl(client->connection, sslBypass)); |
199 | } | 199 | } |
200 | 200 | ||
201 | LIBIMOBILEDEVICE_API service_error_t service_get_connection(service_client_t client, idevice_connection_t *connection) | 201 | service_error_t service_get_connection(service_client_t client, idevice_connection_t *connection) |
202 | { | 202 | { |
203 | if (!client || !client->connection || !connection) | 203 | if (!client || !client->connection || !connection) |
204 | return SERVICE_E_INVALID_ARG; | 204 | return SERVICE_E_INVALID_ARG; |
diff --git a/src/service.h b/src/service.h index 3fc3077..071fe3f 100644 --- a/src/service.h +++ b/src/service.h | |||
@@ -21,9 +21,9 @@ | |||
21 | #ifndef SERVICE_H | 21 | #ifndef SERVICE_H |
22 | #define SERVICE_H | 22 | #define SERVICE_H |
23 | 23 | ||
24 | #include "idevice.h" | ||
24 | #include "libimobiledevice/service.h" | 25 | #include "libimobiledevice/service.h" |
25 | #include "libimobiledevice/lockdown.h" | 26 | #include "libimobiledevice/lockdown.h" |
26 | #include "idevice.h" | ||
27 | 27 | ||
28 | struct service_client_private { | 28 | struct service_client_private { |
29 | idevice_connection_t connection; | 29 | idevice_connection_t connection; |
diff --git a/src/syslog_relay.c b/src/syslog_relay.c index ec9eca5..9f4296e 100644 --- a/src/syslog_relay.c +++ b/src/syslog_relay.c | |||
@@ -67,7 +67,7 @@ static syslog_relay_error_t syslog_relay_error(service_error_t err) | |||
67 | return SYSLOG_RELAY_E_UNKNOWN_ERROR; | 67 | return SYSLOG_RELAY_E_UNKNOWN_ERROR; |
68 | } | 68 | } |
69 | 69 | ||
70 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, syslog_relay_client_t * client) | 70 | syslog_relay_error_t syslog_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, syslog_relay_client_t * client) |
71 | { | 71 | { |
72 | *client = NULL; | 72 | *client = NULL; |
73 | 73 | ||
@@ -95,14 +95,14 @@ LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_new(idevice_t devi | |||
95 | return 0; | 95 | return 0; |
96 | } | 96 | } |
97 | 97 | ||
98 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_start_service(idevice_t device, syslog_relay_client_t * client, const char* label) | 98 | syslog_relay_error_t syslog_relay_client_start_service(idevice_t device, syslog_relay_client_t * client, const char* label) |
99 | { | 99 | { |
100 | syslog_relay_error_t err = SYSLOG_RELAY_E_UNKNOWN_ERROR; | 100 | syslog_relay_error_t err = SYSLOG_RELAY_E_UNKNOWN_ERROR; |
101 | service_client_factory_start_service(device, SYSLOG_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(syslog_relay_client_new), &err); | 101 | service_client_factory_start_service(device, SYSLOG_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(syslog_relay_client_new), &err); |
102 | return err; | 102 | return err; |
103 | } | 103 | } |
104 | 104 | ||
105 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client) | 105 | syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client) |
106 | { | 106 | { |
107 | if (!client) | 107 | if (!client) |
108 | return SYSLOG_RELAY_E_INVALID_ARG; | 108 | return SYSLOG_RELAY_E_INVALID_ARG; |
@@ -113,12 +113,12 @@ LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_free(syslog_relay_ | |||
113 | return err; | 113 | return err; |
114 | } | 114 | } |
115 | 115 | ||
116 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_receive(syslog_relay_client_t client, char* data, uint32_t size, uint32_t *received) | 116 | syslog_relay_error_t syslog_relay_receive(syslog_relay_client_t client, char* data, uint32_t size, uint32_t *received) |
117 | { | 117 | { |
118 | return syslog_relay_receive_with_timeout(client, data, size, received, 1000); | 118 | return syslog_relay_receive_with_timeout(client, data, size, received, 1000); |
119 | } | 119 | } |
120 | 120 | ||
121 | 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) | 121 | 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) |
122 | { | 122 | { |
123 | syslog_relay_error_t res = SYSLOG_RELAY_E_UNKNOWN_ERROR; | 123 | syslog_relay_error_t res = SYSLOG_RELAY_E_UNKNOWN_ERROR; |
124 | int bytes = 0; | 124 | int bytes = 0; |
@@ -175,7 +175,7 @@ void *syslog_relay_worker(void *arg) | |||
175 | return NULL; | 175 | return NULL; |
176 | } | 176 | } |
177 | 177 | ||
178 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data) | 178 | syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data) |
179 | { | 179 | { |
180 | if (!client || !callback) | 180 | if (!client || !callback) |
181 | return SYSLOG_RELAY_E_INVALID_ARG; | 181 | return SYSLOG_RELAY_E_INVALID_ARG; |
@@ -203,7 +203,7 @@ LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_start_capture(syslog_rela | |||
203 | return res; | 203 | return res; |
204 | } | 204 | } |
205 | 205 | ||
206 | 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) | 206 | syslog_relay_error_t syslog_relay_start_capture_raw(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data) |
207 | { | 207 | { |
208 | if (!client || !callback) | 208 | if (!client || !callback) |
209 | return SYSLOG_RELAY_E_INVALID_ARG; | 209 | return SYSLOG_RELAY_E_INVALID_ARG; |
@@ -231,7 +231,7 @@ LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_start_capture_raw(syslog_ | |||
231 | return res; | 231 | return res; |
232 | } | 232 | } |
233 | 233 | ||
234 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client) | 234 | syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client) |
235 | { | 235 | { |
236 | if (client->worker) { | 236 | if (client->worker) { |
237 | /* notify thread to finish */ | 237 | /* notify thread to finish */ |
diff --git a/src/syslog_relay.h b/src/syslog_relay.h index 86d798e..d5263e2 100644 --- a/src/syslog_relay.h +++ b/src/syslog_relay.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef _SYSLOG_RELAY_H | 22 | #ifndef _SYSLOG_RELAY_H |
23 | #define _SYSLOG_RELAY_H | 23 | #define _SYSLOG_RELAY_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/syslog_relay.h" | 26 | #include "libimobiledevice/syslog_relay.h" |
26 | #include "service.h" | 27 | #include "service.h" |
27 | #include <libimobiledevice-glue/thread.h> | 28 | #include <libimobiledevice-glue/thread.h> |
diff --git a/src/webinspector.c b/src/webinspector.c index 3360597..f960fcc 100644 --- a/src/webinspector.c +++ b/src/webinspector.c | |||
@@ -62,7 +62,7 @@ static webinspector_error_t webinspector_error(property_list_service_error_t err | |||
62 | return WEBINSPECTOR_E_UNKNOWN_ERROR; | 62 | return WEBINSPECTOR_E_UNKNOWN_ERROR; |
63 | } | 63 | } |
64 | 64 | ||
65 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service_descriptor_t service, webinspector_client_t * client) | 65 | webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service_descriptor_t service, webinspector_client_t * client) |
66 | { | 66 | { |
67 | *client = NULL; | 67 | *client = NULL; |
68 | 68 | ||
@@ -89,14 +89,14 @@ LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_new(idevice_t devi | |||
89 | return 0; | 89 | return 0; |
90 | } | 90 | } |
91 | 91 | ||
92 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client, const char* label) | 92 | webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client, const char* label) |
93 | { | 93 | { |
94 | webinspector_error_t err = WEBINSPECTOR_E_UNKNOWN_ERROR; | 94 | webinspector_error_t err = WEBINSPECTOR_E_UNKNOWN_ERROR; |
95 | service_client_factory_start_service(device, WEBINSPECTOR_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(webinspector_client_new), &err); | 95 | service_client_factory_start_service(device, WEBINSPECTOR_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(webinspector_client_new), &err); |
96 | return err; | 96 | return err; |
97 | } | 97 | } |
98 | 98 | ||
99 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_free(webinspector_client_t client) | 99 | webinspector_error_t webinspector_client_free(webinspector_client_t client) |
100 | { | 100 | { |
101 | if (!client) | 101 | if (!client) |
102 | return WEBINSPECTOR_E_INVALID_ARG; | 102 | return WEBINSPECTOR_E_INVALID_ARG; |
@@ -107,7 +107,7 @@ LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_free(webinspector_ | |||
107 | return err; | 107 | return err; |
108 | } | 108 | } |
109 | 109 | ||
110 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_send(webinspector_client_t client, plist_t plist) | 110 | webinspector_error_t webinspector_send(webinspector_client_t client, plist_t plist) |
111 | { | 111 | { |
112 | webinspector_error_t res = WEBINSPECTOR_E_UNKNOWN_ERROR; | 112 | webinspector_error_t res = WEBINSPECTOR_E_UNKNOWN_ERROR; |
113 | 113 | ||
@@ -164,12 +164,12 @@ LIBIMOBILEDEVICE_API webinspector_error_t webinspector_send(webinspector_client_ | |||
164 | return res; | 164 | return res; |
165 | } | 165 | } |
166 | 166 | ||
167 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_receive(webinspector_client_t client, plist_t * plist) | 167 | webinspector_error_t webinspector_receive(webinspector_client_t client, plist_t * plist) |
168 | { | 168 | { |
169 | return webinspector_receive_with_timeout(client, plist, 5000); | 169 | return webinspector_receive_with_timeout(client, plist, 5000); |
170 | } | 170 | } |
171 | 171 | ||
172 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_receive_with_timeout(webinspector_client_t client, plist_t * plist, uint32_t timeout_ms) | 172 | webinspector_error_t webinspector_receive_with_timeout(webinspector_client_t client, plist_t * plist, uint32_t timeout_ms) |
173 | { | 173 | { |
174 | webinspector_error_t res = WEBINSPECTOR_E_UNKNOWN_ERROR; | 174 | webinspector_error_t res = WEBINSPECTOR_E_UNKNOWN_ERROR; |
175 | plist_t message = NULL; | 175 | plist_t message = NULL; |
diff --git a/src/webinspector.h b/src/webinspector.h index 67421bc..d249c58 100644 --- a/src/webinspector.h +++ b/src/webinspector.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __WEBINSPECTOR_H | 22 | #ifndef __WEBINSPECTOR_H |
23 | #define __WEBINSPECTOR_H | 23 | #define __WEBINSPECTOR_H |
24 | 24 | ||
25 | #include "idevice.h" | ||
25 | #include "libimobiledevice/webinspector.h" | 26 | #include "libimobiledevice/webinspector.h" |
26 | #include "property_list_service.h" | 27 | #include "property_list_service.h" |
27 | 28 | ||