diff options
| author | 2014-10-03 15:51:43 +0200 | |
|---|---|---|
| committer | 2014-10-03 16:29:42 +0200 | |
| commit | 4c4bbd31f52845de70f5b828121eeea62f8b4514 (patch) | |
| tree | 6655c2eeba4a9865752523e68d73e982e8a0d515 | |
| parent | d335f9350eef7b0140a249f92b791dc88b2900e5 (diff) | |
| download | libimobiledevice-4c4bbd31f52845de70f5b828121eeea62f8b4514.tar.gz libimobiledevice-4c4bbd31f52845de70f5b828121eeea62f8b4514.tar.bz2 | |
Avoid exporting non-public symbols
| -rw-r--r-- | common/Makefile.am | 2 | ||||
| -rw-r--r-- | common/debug.c | 3 | ||||
| -rw-r--r-- | common/debug.h | 16 | ||||
| -rw-r--r-- | configure.ac | 7 | ||||
| -rw-r--r-- | dev/Makefile.am | 2 | ||||
| -rw-r--r-- | src/afc.c | 48 | ||||
| -rw-r--r-- | src/debugserver.c | 28 | ||||
| -rw-r--r-- | src/diagnostics_relay.c | 22 | ||||
| -rw-r--r-- | src/file_relay.c | 10 | ||||
| -rw-r--r-- | src/heartbeat.c | 12 | ||||
| -rw-r--r-- | src/house_arrest.c | 14 | ||||
| -rw-r--r-- | src/idevice.c | 31 | ||||
| -rw-r--r-- | src/idevice.h | 10 | ||||
| -rw-r--r-- | src/installation_proxy.c | 30 | ||||
| -rw-r--r-- | src/lockdown.c | 53 | ||||
| -rw-r--r-- | src/misagent.c | 14 | ||||
| -rw-r--r-- | src/mobile_image_mounter.c | 14 | ||||
| -rw-r--r-- | src/mobilebackup.c | 24 | ||||
| -rw-r--r-- | src/mobilebackup2.c | 20 | ||||
| -rw-r--r-- | src/mobilesync.c | 42 | ||||
| -rw-r--r-- | src/notification_proxy.c | 14 | ||||
| -rw-r--r-- | src/property_list_service.c | 16 | ||||
| -rw-r--r-- | src/restore.c | 23 | ||||
| -rw-r--r-- | src/sbservices.c | 16 | ||||
| -rw-r--r-- | src/screenshotr.c | 8 | ||||
| -rw-r--r-- | src/service.c | 16 | ||||
| -rw-r--r-- | src/syslog_relay.c | 14 | ||||
| -rw-r--r-- | src/webinspector.c | 12 |
28 files changed, 263 insertions, 258 deletions
diff --git a/common/Makefile.am b/common/Makefile.am index b5ea6c1..eb1db28 100644 --- a/common/Makefile.am +++ b/common/Makefile.am | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | AM_CPPFLAGS = -I$(top_srcdir)/include | 1 | AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src |
| 2 | 2 | ||
| 3 | AM_CFLAGS = $(GLOBAL_CFLAGS) $(libusbmuxd_CFLAGS) $(libplist_CFLAGS) $(LFS_CFLAGS) | 3 | AM_CFLAGS = $(GLOBAL_CFLAGS) $(libusbmuxd_CFLAGS) $(libplist_CFLAGS) $(LFS_CFLAGS) |
| 4 | AM_LDFLAGS = $(libusbmuxd_LIBS) $(libplist_LIBS) ${libpthread_LIBS} | 4 | AM_LDFLAGS = $(libusbmuxd_LIBS) $(libplist_LIBS) ${libpthread_LIBS} |
diff --git a/common/debug.c b/common/debug.c index 2cc9db1..a7e33df 100644 --- a/common/debug.c +++ b/common/debug.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <time.h> | 32 | #include <time.h> |
| 33 | 33 | ||
| 34 | #include "debug.h" | 34 | #include "debug.h" |
| 35 | #include "idevice.h" | ||
| 35 | #include "libimobiledevice/libimobiledevice.h" | 36 | #include "libimobiledevice/libimobiledevice.h" |
| 36 | 37 | ||
| 37 | #ifndef STRIP_DEBUG_CODE | 38 | #ifndef STRIP_DEBUG_CODE |
| @@ -46,7 +47,7 @@ int debug_level = 0; | |||
| 46 | * | 47 | * |
| 47 | * @param level Set to 0 for no debugging or 1 for debugging. | 48 | * @param level Set to 0 for no debugging or 1 for debugging. |
| 48 | */ | 49 | */ |
| 49 | void idevice_set_debug_level(int level) | 50 | LIBIMOBILEDEVICE_API void idevice_set_debug_level(int level) |
| 50 | { | 51 | { |
| 51 | debug_level = level; | 52 | debug_level = level; |
| 52 | } | 53 | } |
diff --git a/common/debug.h b/common/debug.h index 3a66ee4..99a94b7 100644 --- a/common/debug.h +++ b/common/debug.h | |||
| @@ -25,14 +25,6 @@ | |||
| 25 | 25 | ||
| 26 | #include <plist/plist.h> | 26 | #include <plist/plist.h> |
| 27 | 27 | ||
| 28 | #ifndef LIBIMOBILEDEVICE_INTERNAL | ||
| 29 | #ifdef WIN32 | ||
| 30 | #define LIBIMOBILEDEVICE_INTERNAL | ||
| 31 | #else | ||
| 32 | #define LIBIMOBILEDEVICE_INTERNAL __attribute__((visibility("hidden"))) | ||
| 33 | #endif | ||
| 34 | #endif | ||
| 35 | |||
| 36 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && !defined(STRIP_DEBUG_CODE) | 28 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && !defined(STRIP_DEBUG_CODE) |
| 37 | #define debug_info(...) debug_info_real (__func__, __FILE__, __LINE__, __VA_ARGS__) | 29 | #define debug_info(...) debug_info_real (__func__, __FILE__, __LINE__, __VA_ARGS__) |
| 38 | #define debug_plist(a) debug_plist_real (__func__, __FILE__, __LINE__, a) | 30 | #define debug_plist(a) debug_plist_real (__func__, __FILE__, __LINE__, a) |
| @@ -44,14 +36,14 @@ | |||
| 44 | #define debug_plist(a) | 36 | #define debug_plist(a) |
| 45 | #endif | 37 | #endif |
| 46 | 38 | ||
| 47 | LIBIMOBILEDEVICE_INTERNAL void debug_info_real(const char *func, | 39 | void debug_info_real(const char *func, |
| 48 | const char *file, | 40 | const char *file, |
| 49 | int line, | 41 | int line, |
| 50 | const char *format, ...); | 42 | const char *format, ...); |
| 51 | 43 | ||
| 52 | LIBIMOBILEDEVICE_INTERNAL void debug_buffer(const char *data, const int length); | 44 | void debug_buffer(const char *data, const int length); |
| 53 | LIBIMOBILEDEVICE_INTERNAL void debug_buffer_to_file(const char *file, const char *data, const int length); | 45 | void debug_buffer_to_file(const char *file, const char *data, const int length); |
| 54 | LIBIMOBILEDEVICE_INTERNAL void debug_plist_real(const char *func, | 46 | void debug_plist_real(const char *func, |
| 55 | const char *file, | 47 | const char *file, |
| 56 | int line, | 48 | int line, |
| 57 | plist_t plist); | 49 | plist_t plist); |
diff --git a/configure.ac b/configure.ac index 6e3e058..0e335f6 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -188,9 +188,14 @@ else | |||
| 188 | building_debug_code=yes | 188 | building_debug_code=yes |
| 189 | fi | 189 | fi |
| 190 | 190 | ||
| 191 | AS_COMPILER_FLAGS(GLOBAL_CFLAGS, "-Wall -Wextra -Wmissing-declarations -Wredundant-decls -Wshadow -Wpointer-arith -Wwrite-strings -Wswitch-default -Wno-unused-parameter -fsigned-char") | 191 | 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") |
| 192 | AC_SUBST(GLOBAL_CFLAGS) | 192 | AC_SUBST(GLOBAL_CFLAGS) |
| 193 | 193 | ||
| 194 | case "$GLOBAL_CFLAGS" in | ||
| 195 | *-fvisibility=hidden*) | ||
| 196 | AC_DEFINE([HAVE_FVISIBILITY], [1], [Define if compiled with -fvisibility=hidden]) | ||
| 197 | esac | ||
| 198 | |||
| 194 | # check for large file support | 199 | # check for large file support |
| 195 | AC_SYS_LARGEFILE | 200 | AC_SYS_LARGEFILE |
| 196 | LFS_CFLAGS='' | 201 | LFS_CFLAGS='' |
diff --git a/dev/Makefile.am b/dev/Makefile.am index 3815af6..89ef75b 100644 --- a/dev/Makefile.am +++ b/dev/Makefile.am | |||
| @@ -18,7 +18,7 @@ lckd_client_LDADD = $(top_builddir)/src/libimobiledevice.la | |||
| 18 | 18 | ||
| 19 | afccheck_SOURCES = afccheck.c | 19 | afccheck_SOURCES = afccheck.c |
| 20 | afccheck_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS) | 20 | afccheck_CFLAGS = -I$(top_srcdir) $(AM_CFLAGS) |
| 21 | afccheck_LDFLAGS = $(AM_LDFLAGS) | 21 | afccheck_LDFLAGS = $(top_builddir)/common/libinternalcommon.la $(AM_LDFLAGS) |
| 22 | afccheck_LDADD = $(top_builddir)/src/libimobiledevice.la | 22 | afccheck_LDADD = $(top_builddir)/src/libimobiledevice.la |
| 23 | 23 | ||
| 24 | filerelaytest_SOURCES = filerelaytest.c | 24 | filerelaytest_SOURCES = filerelaytest.c |
| @@ -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 | afc_error_t afc_client_new_with_service_client(service_client_t service_client, afc_client_t *client) | 71 | LIBIMOBILEDEVICE_API 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; |
| @@ -96,7 +96,7 @@ afc_error_t afc_client_new_with_service_client(service_client_t service_client, | |||
| 96 | return AFC_E_SUCCESS; | 96 | return AFC_E_SUCCESS; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t service, afc_client_t * client) | 99 | LIBIMOBILEDEVICE_API afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t service, afc_client_t * client) |
| 100 | { | 100 | { |
| 101 | if (!device || !service || service->port == 0) | 101 | if (!device || !service || service->port == 0) |
| 102 | return AFC_E_INVALID_ARG; | 102 | return AFC_E_INVALID_ARG; |
| @@ -115,14 +115,14 @@ afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t serv | |||
| 115 | return err; | 115 | return err; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | afc_error_t afc_client_start_service(idevice_t device, afc_client_t * client, const char* label) | 118 | LIBIMOBILEDEVICE_API afc_error_t afc_client_start_service(idevice_t device, afc_client_t * client, const char* label) |
| 119 | { | 119 | { |
| 120 | afc_error_t err = AFC_E_UNKNOWN_ERROR; | 120 | afc_error_t err = AFC_E_UNKNOWN_ERROR; |
| 121 | service_client_factory_start_service(device, AFC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(afc_client_new), &err); | 121 | service_client_factory_start_service(device, AFC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(afc_client_new), &err); |
| 122 | return err; | 122 | return err; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | afc_error_t afc_client_free(afc_client_t client) | 125 | LIBIMOBILEDEVICE_API afc_error_t afc_client_free(afc_client_t client) |
| 126 | { | 126 | { |
| 127 | if (!client || !client->afc_packet) | 127 | if (!client || !client->afc_packet) |
| 128 | return AFC_E_INVALID_ARG; | 128 | return AFC_E_INVALID_ARG; |
| @@ -402,7 +402,7 @@ static char **make_strings_list(char *tokens, uint32_t length) | |||
| 402 | return list; | 402 | return list; |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***directory_information) | 405 | LIBIMOBILEDEVICE_API afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***directory_information) |
| 406 | { | 406 | { |
| 407 | uint32_t bytes = 0; | 407 | uint32_t bytes = 0; |
| 408 | char *data = NULL, **list_loc = NULL; | 408 | char *data = NULL, **list_loc = NULL; |
| @@ -438,7 +438,7 @@ afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***di | |||
| 438 | return ret; | 438 | return ret; |
| 439 | } | 439 | } |
| 440 | 440 | ||
| 441 | afc_error_t afc_get_device_info(afc_client_t client, char ***device_information) | 441 | LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info(afc_client_t client, char ***device_information) |
| 442 | { | 442 | { |
| 443 | uint32_t bytes = 0; | 443 | uint32_t bytes = 0; |
| 444 | char *data = NULL, **list = NULL; | 444 | char *data = NULL, **list = NULL; |
| @@ -475,7 +475,7 @@ afc_error_t afc_get_device_info(afc_client_t client, char ***device_information) | |||
| 475 | return ret; | 475 | return ret; |
| 476 | } | 476 | } |
| 477 | 477 | ||
| 478 | afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char **value) | 478 | LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char **value) |
| 479 | { | 479 | { |
| 480 | afc_error_t ret = AFC_E_INTERNAL_ERROR; | 480 | afc_error_t ret = AFC_E_INTERNAL_ERROR; |
| 481 | char **kvps, **ptr; | 481 | char **kvps, **ptr; |
| @@ -502,7 +502,7 @@ afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char * | |||
| 502 | return ret; | 502 | return ret; |
| 503 | } | 503 | } |
| 504 | 504 | ||
| 505 | afc_error_t afc_remove_path(afc_client_t client, const char *path) | 505 | LIBIMOBILEDEVICE_API afc_error_t afc_remove_path(afc_client_t client, const char *path) |
| 506 | { | 506 | { |
| 507 | uint32_t bytes = 0; | 507 | uint32_t bytes = 0; |
| 508 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; | 508 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; |
| @@ -530,7 +530,7 @@ afc_error_t afc_remove_path(afc_client_t client, const char *path) | |||
| 530 | return ret; | 530 | return ret; |
| 531 | } | 531 | } |
| 532 | 532 | ||
| 533 | afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *to) | 533 | LIBIMOBILEDEVICE_API afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *to) |
| 534 | { | 534 | { |
| 535 | if (!client || !from || !to || !client->afc_packet || !client->parent) | 535 | if (!client || !from || !to || !client->afc_packet || !client->parent) |
| 536 | return AFC_E_INVALID_ARG; | 536 | return AFC_E_INVALID_ARG; |
| @@ -559,7 +559,7 @@ afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *t | |||
| 559 | return ret; | 559 | return ret; |
| 560 | } | 560 | } |
| 561 | 561 | ||
| 562 | afc_error_t afc_make_directory(afc_client_t client, const char *path) | 562 | LIBIMOBILEDEVICE_API afc_error_t afc_make_directory(afc_client_t client, const char *path) |
| 563 | { | 563 | { |
| 564 | uint32_t bytes = 0; | 564 | uint32_t bytes = 0; |
| 565 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; | 565 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; |
| @@ -583,7 +583,7 @@ afc_error_t afc_make_directory(afc_client_t client, const char *path) | |||
| 583 | return ret; | 583 | return ret; |
| 584 | } | 584 | } |
| 585 | 585 | ||
| 586 | afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***file_information) | 586 | LIBIMOBILEDEVICE_API afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***file_information) |
| 587 | { | 587 | { |
| 588 | char *received = NULL; | 588 | char *received = NULL; |
| 589 | uint32_t bytes = 0; | 589 | uint32_t bytes = 0; |
| @@ -613,7 +613,7 @@ afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***fil | |||
| 613 | return ret; | 613 | return ret; |
| 614 | } | 614 | } |
| 615 | 615 | ||
| 616 | afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mode_t file_mode, uint64_t *handle) | 616 | LIBIMOBILEDEVICE_API afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mode_t file_mode, uint64_t *handle) |
| 617 | { | 617 | { |
| 618 | if (!client || !client->parent || !client->afc_packet) | 618 | if (!client || !client->parent || !client->afc_packet) |
| 619 | return AFC_E_INVALID_ARG; | 619 | return AFC_E_INVALID_ARG; |
| @@ -661,7 +661,7 @@ afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mo | |||
| 661 | return ret; | 661 | return ret; |
| 662 | } | 662 | } |
| 663 | 663 | ||
| 664 | afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint32_t length, uint32_t *bytes_read) | 664 | LIBIMOBILEDEVICE_API afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint32_t length, uint32_t *bytes_read) |
| 665 | { | 665 | { |
| 666 | char *input = NULL; | 666 | char *input = NULL; |
| 667 | uint32_t current_count = 0, bytes_loc = 0; | 667 | uint32_t current_count = 0, bytes_loc = 0; |
| @@ -714,7 +714,7 @@ afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint | |||
| 714 | return ret; | 714 | return ret; |
| 715 | } | 715 | } |
| 716 | 716 | ||
| 717 | afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *data, uint32_t length, uint32_t *bytes_written) | 717 | 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) |
| 718 | { | 718 | { |
| 719 | uint32_t current_count = 0; | 719 | uint32_t current_count = 0; |
| 720 | uint32_t bytes_loc = 0; | 720 | uint32_t bytes_loc = 0; |
| @@ -746,7 +746,7 @@ afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *dat | |||
| 746 | return ret; | 746 | return ret; |
| 747 | } | 747 | } |
| 748 | 748 | ||
| 749 | afc_error_t afc_file_close(afc_client_t client, uint64_t handle) | 749 | LIBIMOBILEDEVICE_API afc_error_t afc_file_close(afc_client_t client, uint64_t handle) |
| 750 | { | 750 | { |
| 751 | uint32_t bytes = 0; | 751 | uint32_t bytes = 0; |
| 752 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; | 752 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; |
| @@ -774,7 +774,7 @@ afc_error_t afc_file_close(afc_client_t client, uint64_t handle) | |||
| 774 | return ret; | 774 | return ret; |
| 775 | } | 775 | } |
| 776 | 776 | ||
| 777 | afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t operation) | 777 | LIBIMOBILEDEVICE_API afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t operation) |
| 778 | { | 778 | { |
| 779 | uint32_t bytes = 0; | 779 | uint32_t bytes = 0; |
| 780 | struct { | 780 | struct { |
| @@ -808,7 +808,7 @@ afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t op | |||
| 808 | return ret; | 808 | return ret; |
| 809 | } | 809 | } |
| 810 | 810 | ||
| 811 | afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, int whence) | 811 | LIBIMOBILEDEVICE_API afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, int whence) |
| 812 | { | 812 | { |
| 813 | uint32_t bytes = 0; | 813 | uint32_t bytes = 0; |
| 814 | struct { | 814 | struct { |
| @@ -841,7 +841,7 @@ afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, | |||
| 841 | return ret; | 841 | return ret; |
| 842 | } | 842 | } |
| 843 | 843 | ||
| 844 | afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *position) | 844 | LIBIMOBILEDEVICE_API afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *position) |
| 845 | { | 845 | { |
| 846 | char *buffer = NULL; | 846 | char *buffer = NULL; |
| 847 | uint32_t bytes = 0; | 847 | uint32_t bytes = 0; |
| @@ -874,7 +874,7 @@ afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *positi | |||
| 874 | return ret; | 874 | return ret; |
| 875 | } | 875 | } |
| 876 | 876 | ||
| 877 | afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t newsize) | 877 | LIBIMOBILEDEVICE_API afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t newsize) |
| 878 | { | 878 | { |
| 879 | uint32_t bytes = 0; | 879 | uint32_t bytes = 0; |
| 880 | struct { | 880 | struct { |
| @@ -905,7 +905,7 @@ afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t new | |||
| 905 | return ret; | 905 | return ret; |
| 906 | } | 906 | } |
| 907 | 907 | ||
| 908 | afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize) | 908 | LIBIMOBILEDEVICE_API afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize) |
| 909 | { | 909 | { |
| 910 | if (!client || !path || !client->afc_packet || !client->parent) | 910 | if (!client || !path || !client->afc_packet || !client->parent) |
| 911 | return AFC_E_INVALID_ARG; | 911 | return AFC_E_INVALID_ARG; |
| @@ -935,7 +935,7 @@ afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize | |||
| 935 | return ret; | 935 | return ret; |
| 936 | } | 936 | } |
| 937 | 937 | ||
| 938 | afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const char *target, const char *linkname) | 938 | LIBIMOBILEDEVICE_API afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const char *target, const char *linkname) |
| 939 | { | 939 | { |
| 940 | if (!client || !target || !linkname || !client->afc_packet || !client->parent) | 940 | if (!client || !target || !linkname || !client->afc_packet || !client->parent) |
| 941 | return AFC_E_INVALID_ARG; | 941 | return AFC_E_INVALID_ARG; |
| @@ -969,7 +969,7 @@ afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const c | |||
| 969 | return ret; | 969 | return ret; |
| 970 | } | 970 | } |
| 971 | 971 | ||
| 972 | afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mtime) | 972 | LIBIMOBILEDEVICE_API afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mtime) |
| 973 | { | 973 | { |
| 974 | if (!client || !path || !client->afc_packet || !client->parent) | 974 | if (!client || !path || !client->afc_packet || !client->parent) |
| 975 | return AFC_E_INVALID_ARG; | 975 | return AFC_E_INVALID_ARG; |
| @@ -998,7 +998,7 @@ afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mt | |||
| 998 | return ret; | 998 | return ret; |
| 999 | } | 999 | } |
| 1000 | 1000 | ||
| 1001 | afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path) | 1001 | LIBIMOBILEDEVICE_API afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path) |
| 1002 | { | 1002 | { |
| 1003 | uint32_t bytes = 0; | 1003 | uint32_t bytes = 0; |
| 1004 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; | 1004 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; |
| @@ -1022,7 +1022,7 @@ afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path) | |||
| 1022 | return ret; | 1022 | return ret; |
| 1023 | } | 1023 | } |
| 1024 | 1024 | ||
| 1025 | afc_error_t afc_dictionary_free(char **dictionary) | 1025 | LIBIMOBILEDEVICE_API afc_error_t afc_dictionary_free(char **dictionary) |
| 1026 | { | 1026 | { |
| 1027 | int i = 0; | 1027 | int i = 0; |
| 1028 | 1028 | ||
diff --git a/src/debugserver.c b/src/debugserver.c index 1e38698..b5ba9e1 100644 --- a/src/debugserver.c +++ b/src/debugserver.c | |||
| @@ -60,7 +60,7 @@ static debugserver_error_t debugserver_error(service_error_t err) | |||
| 60 | return DEBUGSERVER_E_UNKNOWN_ERROR; | 60 | return DEBUGSERVER_E_UNKNOWN_ERROR; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | debugserver_error_t debugserver_client_new(idevice_t device, lockdownd_service_descriptor_t service, debugserver_client_t* client) | 63 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_new(idevice_t device, lockdownd_service_descriptor_t service, debugserver_client_t* client) |
| 64 | { | 64 | { |
| 65 | *client = NULL; | 65 | *client = NULL; |
| 66 | 66 | ||
| @@ -88,14 +88,14 @@ debugserver_error_t debugserver_client_new(idevice_t device, lockdownd_service_d | |||
| 88 | return 0; | 88 | return 0; |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | debugserver_error_t debugserver_client_start_service(idevice_t device, debugserver_client_t * client, const char* label) | 91 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_start_service(idevice_t device, debugserver_client_t * client, const char* label) |
| 92 | { | 92 | { |
| 93 | debugserver_error_t err = DEBUGSERVER_E_UNKNOWN_ERROR; | 93 | debugserver_error_t err = DEBUGSERVER_E_UNKNOWN_ERROR; |
| 94 | service_client_factory_start_service(device, DEBUGSERVER_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(debugserver_client_new), &err); | 94 | service_client_factory_start_service(device, DEBUGSERVER_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(debugserver_client_new), &err); |
| 95 | return err; | 95 | return err; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | debugserver_error_t debugserver_client_free(debugserver_client_t client) | 98 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_free(debugserver_client_t client) |
| 99 | { | 99 | { |
| 100 | if (!client) | 100 | if (!client) |
| 101 | return DEBUGSERVER_E_INVALID_ARG; | 101 | return DEBUGSERVER_E_INVALID_ARG; |
| @@ -107,7 +107,7 @@ debugserver_error_t debugserver_client_free(debugserver_client_t client) | |||
| 107 | return err; | 107 | return err; |
| 108 | } | 108 | } |
| 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 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; | 112 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; |
| 113 | int bytes = 0; | 113 | int bytes = 0; |
| @@ -128,7 +128,7 @@ debugserver_error_t debugserver_client_send(debugserver_client_t client, const c | |||
| 128 | return res; | 128 | return res; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | debugserver_error_t debugserver_client_receive_with_timeout(debugserver_client_t client, char* data, uint32_t size, uint32_t *received, unsigned int timeout) | 131 | 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) |
| 132 | { | 132 | { |
| 133 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; | 133 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; |
| 134 | int bytes = 0; | 134 | int bytes = 0; |
| @@ -148,12 +148,12 @@ debugserver_error_t debugserver_client_receive_with_timeout(debugserver_client_t | |||
| 148 | return res; | 148 | return res; |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | debugserver_error_t debugserver_client_receive(debugserver_client_t client, char* data, uint32_t size, uint32_t *received) | 151 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive(debugserver_client_t client, char* data, uint32_t size, uint32_t *received) |
| 152 | { | 152 | { |
| 153 | return debugserver_client_receive_with_timeout(client, data, size, received, 1000); | 153 | return debugserver_client_receive_with_timeout(client, data, size, received, 1000); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | debugserver_error_t debugserver_command_new(const char* name, int argc, const char* argv[], debugserver_command_t* command) | 156 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_command_new(const char* name, int argc, const char* argv[], debugserver_command_t* command) |
| 157 | { | 157 | { |
| 158 | int i; | 158 | int i; |
| 159 | debugserver_command_t tmp = (debugserver_command_t) malloc(sizeof(struct debugserver_command_private)); | 159 | debugserver_command_t tmp = (debugserver_command_t) malloc(sizeof(struct debugserver_command_private)); |
| @@ -178,7 +178,7 @@ debugserver_error_t debugserver_command_new(const char* name, int argc, const ch | |||
| 178 | return DEBUGSERVER_E_SUCCESS; | 178 | return DEBUGSERVER_E_SUCCESS; |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | debugserver_error_t debugserver_command_free(debugserver_command_t command) | 181 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_command_free(debugserver_command_t command) |
| 182 | { | 182 | { |
| 183 | int i; | 183 | int i; |
| 184 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; | 184 | debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR; |
| @@ -256,7 +256,7 @@ static int debugserver_response_is_checksum_valid(const char* response, uint32_t | |||
| 256 | return 1; | 256 | return 1; |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | void debugserver_encode_string(const char* buffer, char** encoded_buffer, uint32_t* encoded_length) | 259 | LIBIMOBILEDEVICE_API void debugserver_encode_string(const char* buffer, char** encoded_buffer, uint32_t* encoded_length) |
| 260 | { | 260 | { |
| 261 | uint32_t position; | 261 | uint32_t position; |
| 262 | uint32_t index; | 262 | uint32_t index; |
| @@ -272,7 +272,7 @@ void debugserver_encode_string(const char* buffer, char** encoded_buffer, uint32 | |||
| 272 | } | 272 | } |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | void debugserver_decode_string(const char *encoded_buffer, size_t encoded_length, char** buffer) | 275 | LIBIMOBILEDEVICE_API void debugserver_decode_string(const char *encoded_buffer, size_t encoded_length, char** buffer) |
| 276 | { | 276 | { |
| 277 | *buffer = malloc(sizeof(char) * ((encoded_length / 2)+1)); | 277 | *buffer = malloc(sizeof(char) * ((encoded_length / 2)+1)); |
| 278 | char* t = *buffer; | 278 | char* t = *buffer; |
| @@ -367,7 +367,7 @@ static int debugserver_client_receive_internal_check(debugserver_client_t client | |||
| 367 | return did_receive_char; | 367 | return did_receive_char; |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | debugserver_error_t debugserver_client_receive_response(debugserver_client_t client, char** response) | 370 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive_response(debugserver_client_t client, char** response) |
| 371 | { | 371 | { |
| 372 | debugserver_error_t res = DEBUGSERVER_E_SUCCESS; | 372 | debugserver_error_t res = DEBUGSERVER_E_SUCCESS; |
| 373 | 373 | ||
| @@ -468,7 +468,7 @@ debugserver_error_t debugserver_client_receive_response(debugserver_client_t cli | |||
| 468 | return res; | 468 | return res; |
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | debugserver_error_t debugserver_client_send_command(debugserver_client_t client, debugserver_command_t command, char** response) | 471 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_send_command(debugserver_client_t client, debugserver_command_t command, char** response) |
| 472 | { | 472 | { |
| 473 | debugserver_error_t res = DEBUGSERVER_E_SUCCESS; | 473 | debugserver_error_t res = DEBUGSERVER_E_SUCCESS; |
| 474 | int i; | 474 | int i; |
| @@ -533,7 +533,7 @@ cleanup: | |||
| 533 | return res; | 533 | return res; |
| 534 | } | 534 | } |
| 535 | 535 | ||
| 536 | debugserver_error_t debugserver_client_set_environment_hex_encoded(debugserver_client_t client, const char* env, char** response) | 536 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_environment_hex_encoded(debugserver_client_t client, const char* env, char** response) |
| 537 | { | 537 | { |
| 538 | if (!client || !env) | 538 | if (!client || !env) |
| 539 | return DEBUGSERVER_E_INVALID_ARG; | 539 | return DEBUGSERVER_E_INVALID_ARG; |
| @@ -549,7 +549,7 @@ debugserver_error_t debugserver_client_set_environment_hex_encoded(debugserver_c | |||
| 549 | return result; | 549 | return result; |
| 550 | } | 550 | } |
| 551 | 551 | ||
| 552 | debugserver_error_t debugserver_client_set_argv(debugserver_client_t client, int argc, char* argv[], char** response) | 552 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_argv(debugserver_client_t client, int argc, char* argv[], char** response) |
| 553 | { | 553 | { |
| 554 | if (!client || !argc) | 554 | if (!client || !argc) |
| 555 | return DEBUGSERVER_E_INVALID_ARG; | 555 | return DEBUGSERVER_E_INVALID_ARG; |
diff --git a/src/diagnostics_relay.c b/src/diagnostics_relay.c index cc9c645..055f60a 100644 --- a/src/diagnostics_relay.c +++ b/src/diagnostics_relay.c | |||
| @@ -69,7 +69,7 @@ static int diagnostics_relay_check_result(plist_t dict) | |||
| 69 | return ret; | 69 | return ret; |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | diagnostics_relay_error_t diagnostics_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, diagnostics_relay_client_t *client) | 72 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, diagnostics_relay_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 DIAGNOSTICS_RELAY_E_INVALID_ARG; | 75 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
| @@ -89,14 +89,14 @@ diagnostics_relay_error_t diagnostics_relay_client_new(idevice_t device, lockdow | |||
| 89 | return DIAGNOSTICS_RELAY_E_SUCCESS; | 89 | return DIAGNOSTICS_RELAY_E_SUCCESS; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | diagnostics_relay_error_t diagnostics_relay_client_start_service(idevice_t device, diagnostics_relay_client_t * client, const char* label) | 92 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_client_start_service(idevice_t device, diagnostics_relay_client_t * client, const char* label) |
| 93 | { | 93 | { |
| 94 | diagnostics_relay_error_t err = DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR; | 94 | diagnostics_relay_error_t err = DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR; |
| 95 | service_client_factory_start_service(device, DIAGNOSTICS_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(diagnostics_relay_client_new), &err); | 95 | service_client_factory_start_service(device, DIAGNOSTICS_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(diagnostics_relay_client_new), &err); |
| 96 | return err; | 96 | return err; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | diagnostics_relay_error_t diagnostics_relay_client_free(diagnostics_relay_client_t client) | 99 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_client_free(diagnostics_relay_client_t client) |
| 100 | { | 100 | { |
| 101 | if (!client) | 101 | if (!client) |
| 102 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 102 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
| @@ -162,7 +162,7 @@ static diagnostics_relay_error_t diagnostics_relay_send(diagnostics_relay_client | |||
| 162 | return ret; | 162 | return ret; |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | diagnostics_relay_error_t diagnostics_relay_goodbye(diagnostics_relay_client_t client) | 165 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_goodbye(diagnostics_relay_client_t client) |
| 166 | { | 166 | { |
| 167 | if (!client) | 167 | if (!client) |
| 168 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 168 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
| @@ -196,7 +196,7 @@ diagnostics_relay_error_t diagnostics_relay_goodbye(diagnostics_relay_client_t c | |||
| 196 | return ret; | 196 | return ret; |
| 197 | } | 197 | } |
| 198 | 198 | ||
| 199 | diagnostics_relay_error_t diagnostics_relay_sleep(diagnostics_relay_client_t client) | 199 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_sleep(diagnostics_relay_client_t client) |
| 200 | { | 200 | { |
| 201 | if (!client) | 201 | if (!client) |
| 202 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 202 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
| @@ -272,17 +272,17 @@ static diagnostics_relay_error_t internal_diagnostics_relay_action(diagnostics_r | |||
| 272 | return ret; | 272 | return ret; |
| 273 | } | 273 | } |
| 274 | 274 | ||
| 275 | diagnostics_relay_error_t diagnostics_relay_restart(diagnostics_relay_client_t client, int flags) | 275 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_restart(diagnostics_relay_client_t client, int flags) |
| 276 | { | 276 | { |
| 277 | return internal_diagnostics_relay_action(client, "Restart", flags); | 277 | return internal_diagnostics_relay_action(client, "Restart", flags); |
| 278 | } | 278 | } |
| 279 | 279 | ||
| 280 | diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t client, int flags) | 280 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_shutdown(diagnostics_relay_client_t client, int flags) |
| 281 | { | 281 | { |
| 282 | return internal_diagnostics_relay_action(client, "Shutdown", flags); | 282 | return internal_diagnostics_relay_action(client, "Shutdown", flags); |
| 283 | } | 283 | } |
| 284 | 284 | ||
| 285 | diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_relay_client_t client, const char* type, plist_t* diagnostics) | 285 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_relay_client_t client, const char* type, plist_t* diagnostics) |
| 286 | { | 286 | { |
| 287 | if (!client || diagnostics == NULL) | 287 | if (!client || diagnostics == NULL) |
| 288 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 288 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
| @@ -323,7 +323,7 @@ diagnostics_relay_error_t diagnostics_relay_request_diagnostics(diagnostics_rela | |||
| 323 | return ret; | 323 | return ret; |
| 324 | } | 324 | } |
| 325 | 325 | ||
| 326 | diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_relay_client_t client, plist_t keys, plist_t* result) | 326 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_relay_client_t client, plist_t keys, plist_t* result) |
| 327 | { | 327 | { |
| 328 | if (!client || plist_get_node_type(keys) != PLIST_ARRAY || result == NULL) | 328 | if (!client || plist_get_node_type(keys) != PLIST_ARRAY || result == NULL) |
| 329 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 329 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
| @@ -365,7 +365,7 @@ diagnostics_relay_error_t diagnostics_relay_query_mobilegestalt(diagnostics_rela | |||
| 365 | return ret; | 365 | return ret; |
| 366 | } | 366 | } |
| 367 | 367 | ||
| 368 | diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_relay_client_t client, const char* name, const char* class, plist_t* result) | 368 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_relay_client_t client, const char* name, const char* class, plist_t* result) |
| 369 | { | 369 | { |
| 370 | if (!client || (name == NULL && class == NULL) || result == NULL) | 370 | if (!client || (name == NULL && class == NULL) || result == NULL) |
| 371 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 371 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
| @@ -410,7 +410,7 @@ diagnostics_relay_error_t diagnostics_relay_query_ioregistry_entry(diagnostics_r | |||
| 410 | return ret; | 410 | return ret; |
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | diagnostics_relay_error_t diagnostics_relay_query_ioregistry_plane(diagnostics_relay_client_t client, const char* plane, plist_t* result) | 413 | LIBIMOBILEDEVICE_API diagnostics_relay_error_t diagnostics_relay_query_ioregistry_plane(diagnostics_relay_client_t client, const char* plane, plist_t* result) |
| 414 | { | 414 | { |
| 415 | if (!client || plane == NULL || result == NULL) | 415 | if (!client || plane == NULL || result == NULL) |
| 416 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; | 416 | return DIAGNOSTICS_RELAY_E_INVALID_ARG; |
diff --git a/src/file_relay.c b/src/file_relay.c index 9508c2a..64b04ad 100644 --- a/src/file_relay.c +++ b/src/file_relay.c | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | #include "property_list_service.h" | 24 | #include "property_list_service.h" |
| 25 | #include "common/debug.h" | 25 | #include "common/debug.h" |
| 26 | 26 | ||
| 27 | file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, file_relay_client_t *client) | 27 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, file_relay_client_t *client) |
| 28 | { | 28 | { |
| 29 | if (!device || !service || service->port == 0 || !client || *client) { | 29 | if (!device || !service || service->port == 0 || !client || *client) { |
| 30 | return FILE_RELAY_E_INVALID_ARG; | 30 | return FILE_RELAY_E_INVALID_ARG; |
| @@ -44,14 +44,14 @@ file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_des | |||
| 44 | return FILE_RELAY_E_SUCCESS; | 44 | return FILE_RELAY_E_SUCCESS; |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | file_relay_error_t file_relay_client_start_service(idevice_t device, file_relay_client_t * client, const char* label) | 47 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_client_start_service(idevice_t device, file_relay_client_t * client, const char* label) |
| 48 | { | 48 | { |
| 49 | file_relay_error_t err = FILE_RELAY_E_UNKNOWN_ERROR; | 49 | file_relay_error_t err = FILE_RELAY_E_UNKNOWN_ERROR; |
| 50 | service_client_factory_start_service(device, FILE_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(file_relay_client_new), &err); | 50 | service_client_factory_start_service(device, FILE_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(file_relay_client_new), &err); |
| 51 | return err; | 51 | return err; |
| 52 | } | 52 | } |
| 53 | 53 | ||
| 54 | file_relay_error_t file_relay_client_free(file_relay_client_t client) | 54 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_client_free(file_relay_client_t client) |
| 55 | { | 55 | { |
| 56 | if (!client) | 56 | if (!client) |
| 57 | return FILE_RELAY_E_INVALID_ARG; | 57 | return FILE_RELAY_E_INVALID_ARG; |
| @@ -62,7 +62,7 @@ file_relay_error_t file_relay_client_free(file_relay_client_t client) | |||
| 62 | return FILE_RELAY_E_SUCCESS; | 62 | return FILE_RELAY_E_SUCCESS; |
| 63 | } | 63 | } |
| 64 | 64 | ||
| 65 | file_relay_error_t file_relay_request_sources_timeout(file_relay_client_t client, const char **sources, idevice_connection_t *connection, unsigned int timeout) | 65 | 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) |
| 66 | { | 66 | { |
| 67 | if (!client || !client->parent || !sources || !sources[0]) { | 67 | if (!client || !client->parent || !sources || !sources[0]) { |
| 68 | return FILE_RELAY_E_INVALID_ARG; | 68 | return FILE_RELAY_E_INVALID_ARG; |
| @@ -154,7 +154,7 @@ leave: | |||
| 154 | return err; | 154 | return err; |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, idevice_connection_t *connection) | 157 | LIBIMOBILEDEVICE_API file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, idevice_connection_t *connection) |
| 158 | { | 158 | { |
| 159 | return file_relay_request_sources_timeout(client, sources, connection, 60000); | 159 | return file_relay_request_sources_timeout(client, sources, connection, 60000); |
| 160 | } | 160 | } |
diff --git a/src/heartbeat.c b/src/heartbeat.c index 7654dd0..a6e70ef 100644 --- a/src/heartbeat.c +++ b/src/heartbeat.c | |||
| @@ -58,7 +58,7 @@ static heartbeat_error_t heartbeat_error(property_list_service_error_t err) | |||
| 58 | return HEARTBEAT_E_UNKNOWN_ERROR; | 58 | return HEARTBEAT_E_UNKNOWN_ERROR; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descriptor_t service, heartbeat_client_t * client) | 61 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descriptor_t service, heartbeat_client_t * client) |
| 62 | { | 62 | { |
| 63 | *client = NULL; | 63 | *client = NULL; |
| 64 | 64 | ||
| @@ -85,14 +85,14 @@ heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descr | |||
| 85 | return 0; | 85 | return 0; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client, const char* label) | 88 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client, const char* label) |
| 89 | { | 89 | { |
| 90 | heartbeat_error_t err = HEARTBEAT_E_UNKNOWN_ERROR; | 90 | heartbeat_error_t err = HEARTBEAT_E_UNKNOWN_ERROR; |
| 91 | service_client_factory_start_service(device, HEARTBEAT_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(heartbeat_client_new), &err); | 91 | service_client_factory_start_service(device, HEARTBEAT_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(heartbeat_client_new), &err); |
| 92 | return err; | 92 | return err; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | heartbeat_error_t heartbeat_client_free(heartbeat_client_t client) | 95 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_client_free(heartbeat_client_t client) |
| 96 | { | 96 | { |
| 97 | if (!client) | 97 | if (!client) |
| 98 | return HEARTBEAT_E_INVALID_ARG; | 98 | return HEARTBEAT_E_INVALID_ARG; |
| @@ -103,7 +103,7 @@ heartbeat_error_t heartbeat_client_free(heartbeat_client_t client) | |||
| 103 | return err; | 103 | return err; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | heartbeat_error_t heartbeat_send(heartbeat_client_t client, plist_t plist) | 106 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_send(heartbeat_client_t client, plist_t plist) |
| 107 | { | 107 | { |
| 108 | heartbeat_error_t res = HEARTBEAT_E_UNKNOWN_ERROR; | 108 | heartbeat_error_t res = HEARTBEAT_E_UNKNOWN_ERROR; |
| 109 | 109 | ||
| @@ -118,12 +118,12 @@ heartbeat_error_t heartbeat_send(heartbeat_client_t client, plist_t plist) | |||
| 118 | return res; | 118 | return res; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | heartbeat_error_t heartbeat_receive(heartbeat_client_t client, plist_t * plist) | 121 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_receive(heartbeat_client_t client, plist_t * plist) |
| 122 | { | 122 | { |
| 123 | return heartbeat_receive_with_timeout(client, plist, 1000); | 123 | return heartbeat_receive_with_timeout(client, plist, 1000); |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | heartbeat_error_t heartbeat_receive_with_timeout(heartbeat_client_t client, plist_t * plist, uint32_t timeout_ms) | 126 | LIBIMOBILEDEVICE_API heartbeat_error_t heartbeat_receive_with_timeout(heartbeat_client_t client, plist_t * plist, uint32_t timeout_ms) |
| 127 | { | 127 | { |
| 128 | heartbeat_error_t res = HEARTBEAT_E_UNKNOWN_ERROR; | 128 | heartbeat_error_t res = HEARTBEAT_E_UNKNOWN_ERROR; |
| 129 | plist_t outplist = NULL; | 129 | plist_t outplist = NULL; |
diff --git a/src/house_arrest.c b/src/house_arrest.c index 4158368..b719d6f 100644 --- a/src/house_arrest.c +++ b/src/house_arrest.c | |||
| @@ -55,7 +55,7 @@ static house_arrest_error_t house_arrest_error(property_list_service_error_t err | |||
| 55 | return HOUSE_ARREST_E_UNKNOWN_ERROR; | 55 | return HOUSE_ARREST_E_UNKNOWN_ERROR; |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | house_arrest_error_t house_arrest_client_new(idevice_t device, lockdownd_service_descriptor_t service, house_arrest_client_t *client) | 58 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_client_new(idevice_t device, lockdownd_service_descriptor_t service, house_arrest_client_t *client) |
| 59 | { | 59 | { |
| 60 | property_list_service_client_t plistclient = NULL; | 60 | property_list_service_client_t plistclient = NULL; |
| 61 | house_arrest_error_t err = house_arrest_error(property_list_service_client_new(device, service, &plistclient)); | 61 | house_arrest_error_t err = house_arrest_error(property_list_service_client_new(device, service, &plistclient)); |
| @@ -71,14 +71,14 @@ house_arrest_error_t house_arrest_client_new(idevice_t device, lockdownd_service | |||
| 71 | return HOUSE_ARREST_E_SUCCESS; | 71 | return HOUSE_ARREST_E_SUCCESS; |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | house_arrest_error_t house_arrest_client_start_service(idevice_t device, house_arrest_client_t * client, const char* label) | 74 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_client_start_service(idevice_t device, house_arrest_client_t * client, const char* label) |
| 75 | { | 75 | { |
| 76 | house_arrest_error_t err = HOUSE_ARREST_E_UNKNOWN_ERROR; | 76 | house_arrest_error_t err = HOUSE_ARREST_E_UNKNOWN_ERROR; |
| 77 | service_client_factory_start_service(device, HOUSE_ARREST_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(house_arrest_client_new), &err); | 77 | service_client_factory_start_service(device, HOUSE_ARREST_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(house_arrest_client_new), &err); |
| 78 | return err; | 78 | return err; |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | house_arrest_error_t house_arrest_client_free(house_arrest_client_t client) | 81 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_client_free(house_arrest_client_t client) |
| 82 | { | 82 | { |
| 83 | if (!client) | 83 | if (!client) |
| 84 | return HOUSE_ARREST_E_INVALID_ARG; | 84 | return HOUSE_ARREST_E_INVALID_ARG; |
| @@ -93,7 +93,7 @@ house_arrest_error_t house_arrest_client_free(house_arrest_client_t client) | |||
| 93 | return err; | 93 | return err; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | house_arrest_error_t house_arrest_send_request(house_arrest_client_t client, plist_t dict) | 96 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_send_request(house_arrest_client_t client, plist_t dict) |
| 97 | { | 97 | { |
| 98 | if (!client || !client->parent || !dict) | 98 | if (!client || !client->parent || !dict) |
| 99 | return HOUSE_ARREST_E_INVALID_ARG; | 99 | return HOUSE_ARREST_E_INVALID_ARG; |
| @@ -109,7 +109,7 @@ house_arrest_error_t house_arrest_send_request(house_arrest_client_t client, pli | |||
| 109 | return res; | 109 | return res; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | house_arrest_error_t house_arrest_send_command(house_arrest_client_t client, const char *command, const char *appid) | 112 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_send_command(house_arrest_client_t client, const char *command, const char *appid) |
| 113 | { | 113 | { |
| 114 | if (!client || !client->parent || !command || !appid) | 114 | if (!client || !client->parent || !command || !appid) |
| 115 | return HOUSE_ARREST_E_INVALID_ARG; | 115 | return HOUSE_ARREST_E_INVALID_ARG; |
| @@ -129,7 +129,7 @@ house_arrest_error_t house_arrest_send_command(house_arrest_client_t client, con | |||
| 129 | return res; | 129 | return res; |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | house_arrest_error_t house_arrest_get_result(house_arrest_client_t client, plist_t *dict) | 132 | LIBIMOBILEDEVICE_API house_arrest_error_t house_arrest_get_result(house_arrest_client_t client, plist_t *dict) |
| 133 | { | 133 | { |
| 134 | if (!client || !client->parent) | 134 | if (!client || !client->parent) |
| 135 | return HOUSE_ARREST_E_INVALID_ARG; | 135 | return HOUSE_ARREST_E_INVALID_ARG; |
| @@ -147,7 +147,7 @@ house_arrest_error_t house_arrest_get_result(house_arrest_client_t client, plist | |||
| 147 | return res; | 147 | return res; |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | afc_error_t afc_client_new_from_house_arrest_client(house_arrest_client_t client, afc_client_t *afc_client) | 150 | LIBIMOBILEDEVICE_API afc_error_t afc_client_new_from_house_arrest_client(house_arrest_client_t client, afc_client_t *afc_client) |
| 151 | { | 151 | { |
| 152 | if (!client || !client->parent || (client->mode == HOUSE_ARREST_CLIENT_MODE_AFC)) { | 152 | if (!client || !client->parent || (client->mode == HOUSE_ARREST_CLIENT_MODE_AFC)) { |
| 153 | return AFC_E_INVALID_ARG; | 153 | return AFC_E_INVALID_ARG; |
diff --git a/src/idevice.c b/src/idevice.c index 8cacf4c..4fae693 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
| @@ -147,7 +147,7 @@ static void usbmux_event_cb(const usbmuxd_event_t *event, void *user_data) | |||
| 147 | } | 147 | } |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data) | 150 | LIBIMOBILEDEVICE_API idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data) |
| 151 | { | 151 | { |
| 152 | event_cb = callback; | 152 | event_cb = callback; |
| 153 | int res = usbmuxd_subscribe(usbmux_event_cb, user_data); | 153 | int res = usbmuxd_subscribe(usbmux_event_cb, user_data); |
| @@ -159,7 +159,7 @@ idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_ | |||
| 159 | return IDEVICE_E_SUCCESS; | 159 | return IDEVICE_E_SUCCESS; |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | idevice_error_t idevice_event_unsubscribe() | 162 | LIBIMOBILEDEVICE_API idevice_error_t idevice_event_unsubscribe() |
| 163 | { | 163 | { |
| 164 | event_cb = NULL; | 164 | event_cb = NULL; |
| 165 | int res = usbmuxd_unsubscribe(); | 165 | int res = usbmuxd_unsubscribe(); |
| @@ -170,7 +170,7 @@ idevice_error_t idevice_event_unsubscribe() | |||
| 170 | return IDEVICE_E_SUCCESS; | 170 | return IDEVICE_E_SUCCESS; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | idevice_error_t idevice_get_device_list(char ***devices, int *count) | 173 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_device_list(char ***devices, int *count) |
| 174 | { | 174 | { |
| 175 | usbmuxd_device_info_t *dev_list; | 175 | usbmuxd_device_info_t *dev_list; |
| 176 | 176 | ||
| @@ -200,7 +200,7 @@ idevice_error_t idevice_get_device_list(char ***devices, int *count) | |||
| 200 | return IDEVICE_E_SUCCESS; | 200 | return IDEVICE_E_SUCCESS; |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | idevice_error_t idevice_device_list_free(char **devices) | 203 | LIBIMOBILEDEVICE_API idevice_error_t idevice_device_list_free(char **devices) |
| 204 | { | 204 | { |
| 205 | if (devices) { | 205 | if (devices) { |
| 206 | int i = 0; | 206 | int i = 0; |
| @@ -213,7 +213,7 @@ idevice_error_t idevice_device_list_free(char **devices) | |||
| 213 | return IDEVICE_E_SUCCESS; | 213 | return IDEVICE_E_SUCCESS; |
| 214 | } | 214 | } |
| 215 | 215 | ||
| 216 | idevice_error_t idevice_new(idevice_t * device, const char *udid) | 216 | LIBIMOBILEDEVICE_API idevice_error_t idevice_new(idevice_t * device, const char *udid) |
| 217 | { | 217 | { |
| 218 | usbmuxd_device_info_t muxdev; | 218 | usbmuxd_device_info_t muxdev; |
| 219 | int res = usbmuxd_get_device_by_udid(udid, &muxdev); | 219 | int res = usbmuxd_get_device_by_udid(udid, &muxdev); |
| @@ -230,7 +230,7 @@ idevice_error_t idevice_new(idevice_t * device, const char *udid) | |||
| 230 | return IDEVICE_E_NO_DEVICE; | 230 | return IDEVICE_E_NO_DEVICE; |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | idevice_error_t idevice_free(idevice_t device) | 233 | LIBIMOBILEDEVICE_API idevice_error_t idevice_free(idevice_t device) |
| 234 | { | 234 | { |
| 235 | if (!device) | 235 | if (!device) |
| 236 | return IDEVICE_E_INVALID_ARG; | 236 | return IDEVICE_E_INVALID_ARG; |
| @@ -250,7 +250,7 @@ idevice_error_t idevice_free(idevice_t device) | |||
| 250 | return ret; | 250 | return ret; |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connection_t *connection) | 253 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connection_t *connection) |
| 254 | { | 254 | { |
| 255 | if (!device) { | 255 | if (!device) { |
| 256 | return IDEVICE_E_INVALID_ARG; | 256 | return IDEVICE_E_INVALID_ARG; |
| @@ -276,7 +276,7 @@ idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connect | |||
| 276 | return IDEVICE_E_UNKNOWN_ERROR; | 276 | return IDEVICE_E_UNKNOWN_ERROR; |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | idevice_error_t idevice_disconnect(idevice_connection_t connection) | 279 | LIBIMOBILEDEVICE_API idevice_error_t idevice_disconnect(idevice_connection_t connection) |
| 280 | { | 280 | { |
| 281 | if (!connection) { | 281 | if (!connection) { |
| 282 | return IDEVICE_E_INVALID_ARG; | 282 | return IDEVICE_E_INVALID_ARG; |
| @@ -326,7 +326,7 @@ static idevice_error_t internal_connection_send(idevice_connection_t connection, | |||
| 326 | 326 | ||
| 327 | } | 327 | } |
| 328 | 328 | ||
| 329 | idevice_error_t idevice_connection_send(idevice_connection_t connection, const char *data, uint32_t len, uint32_t *sent_bytes) | 329 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_send(idevice_connection_t connection, const char *data, uint32_t len, uint32_t *sent_bytes) |
| 330 | { | 330 | { |
| 331 | if (!connection || !data || (connection->ssl_data && !connection->ssl_data->session)) { | 331 | if (!connection || !data || (connection->ssl_data && !connection->ssl_data->session)) { |
| 332 | return IDEVICE_E_INVALID_ARG; | 332 | return IDEVICE_E_INVALID_ARG; |
| @@ -372,7 +372,7 @@ static idevice_error_t internal_connection_receive_timeout(idevice_connection_t | |||
| 372 | return IDEVICE_E_UNKNOWN_ERROR; | 372 | return IDEVICE_E_UNKNOWN_ERROR; |
| 373 | } | 373 | } |
| 374 | 374 | ||
| 375 | idevice_error_t idevice_connection_receive_timeout(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout) | 375 | 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) |
| 376 | { | 376 | { |
| 377 | if (!connection || (connection->ssl_data && !connection->ssl_data->session)) { | 377 | if (!connection || (connection->ssl_data && !connection->ssl_data->session)) { |
| 378 | return IDEVICE_E_INVALID_ARG; | 378 | return IDEVICE_E_INVALID_ARG; |
| @@ -426,7 +426,7 @@ static idevice_error_t internal_connection_receive(idevice_connection_t connecti | |||
| 426 | return IDEVICE_E_UNKNOWN_ERROR; | 426 | return IDEVICE_E_UNKNOWN_ERROR; |
| 427 | } | 427 | } |
| 428 | 428 | ||
| 429 | idevice_error_t idevice_connection_receive(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes) | 429 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_receive(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes) |
| 430 | { | 430 | { |
| 431 | if (!connection || (connection->ssl_data && !connection->ssl_data->session)) { | 431 | if (!connection || (connection->ssl_data && !connection->ssl_data->session)) { |
| 432 | return IDEVICE_E_INVALID_ARG; | 432 | return IDEVICE_E_INVALID_ARG; |
| @@ -449,7 +449,7 @@ idevice_error_t idevice_connection_receive(idevice_connection_t connection, char | |||
| 449 | return internal_connection_receive(connection, data, len, recv_bytes); | 449 | return internal_connection_receive(connection, data, len, recv_bytes); |
| 450 | } | 450 | } |
| 451 | 451 | ||
| 452 | idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle) | 452 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle) |
| 453 | { | 453 | { |
| 454 | if (!device) | 454 | if (!device) |
| 455 | return IDEVICE_E_INVALID_ARG; | 455 | return IDEVICE_E_INVALID_ARG; |
| @@ -463,7 +463,7 @@ idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle) | |||
| 463 | return IDEVICE_E_UNKNOWN_ERROR; | 463 | return IDEVICE_E_UNKNOWN_ERROR; |
| 464 | } | 464 | } |
| 465 | 465 | ||
| 466 | idevice_error_t idevice_get_udid(idevice_t device, char **udid) | 466 | LIBIMOBILEDEVICE_API idevice_error_t idevice_get_udid(idevice_t device, char **udid) |
| 467 | { | 467 | { |
| 468 | if (!device || !udid) | 468 | if (!device || !udid) |
| 469 | return IDEVICE_E_INVALID_ARG; | 469 | return IDEVICE_E_INVALID_ARG; |
| @@ -632,7 +632,7 @@ static int internal_cert_callback(gnutls_session_t session, const gnutls_datum_t | |||
| 632 | } | 632 | } |
| 633 | #endif | 633 | #endif |
| 634 | 634 | ||
| 635 | idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection) | 635 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection) |
| 636 | { | 636 | { |
| 637 | if (!connection || connection->ssl_data) | 637 | if (!connection || connection->ssl_data) |
| 638 | return IDEVICE_E_INVALID_ARG; | 638 | return IDEVICE_E_INVALID_ARG; |
| @@ -772,7 +772,7 @@ idevice_error_t idevice_connection_enable_ssl(idevice_connection_t connection) | |||
| 772 | return ret; | 772 | return ret; |
| 773 | } | 773 | } |
| 774 | 774 | ||
| 775 | idevice_error_t idevice_connection_disable_ssl(idevice_connection_t connection) | 775 | LIBIMOBILEDEVICE_API idevice_error_t idevice_connection_disable_ssl(idevice_connection_t connection) |
| 776 | { | 776 | { |
| 777 | if (!connection) | 777 | if (!connection) |
| 778 | return IDEVICE_E_INVALID_ARG; | 778 | return IDEVICE_E_INVALID_ARG; |
| @@ -801,4 +801,3 @@ idevice_error_t idevice_connection_disable_ssl(idevice_connection_t connection) | |||
| 801 | 801 | ||
| 802 | return IDEVICE_E_SUCCESS; | 802 | return IDEVICE_E_SUCCESS; |
| 803 | } | 803 | } |
| 804 | |||
diff --git a/src/idevice.h b/src/idevice.h index 13616ef..575e313 100644 --- a/src/idevice.h +++ b/src/idevice.h | |||
| @@ -33,6 +33,16 @@ | |||
| 33 | #include <gnutls/x509.h> | 33 | #include <gnutls/x509.h> |
| 34 | #endif | 34 | #endif |
| 35 | 35 | ||
| 36 | #ifdef WIN32 | ||
| 37 | #define LIBIMOBILEDEVICE_API __declspec( dllexport ) | ||
| 38 | #else | ||
| 39 | #ifdef HAVE_FVISIBILITY | ||
| 40 | #define LIBIMOBILEDEVICE_API __attribute__((visibility("default"))) | ||
| 41 | #else | ||
| 42 | #define LIBIMOBILEDEVICE_API | ||
| 43 | #endif | ||
| 44 | #endif | ||
| 45 | |||
| 36 | #include "common/userpref.h" | 46 | #include "common/userpref.h" |
| 37 | 47 | ||
| 38 | #include "libimobiledevice/libimobiledevice.h" | 48 | #include "libimobiledevice/libimobiledevice.h" |
diff --git a/src/installation_proxy.c b/src/installation_proxy.c index e3a8103..578756e 100644 --- a/src/installation_proxy.c +++ b/src/installation_proxy.c | |||
| @@ -86,7 +86,7 @@ static instproxy_error_t instproxy_error(property_list_service_error_t err) | |||
| 86 | return INSTPROXY_E_UNKNOWN_ERROR; | 86 | return INSTPROXY_E_UNKNOWN_ERROR; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client) | 89 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client) |
| 90 | { | 90 | { |
| 91 | property_list_service_client_t plistclient = NULL; | 91 | property_list_service_client_t plistclient = NULL; |
| 92 | instproxy_error_t err = instproxy_error(property_list_service_client_new(device, service, &plistclient)); | 92 | instproxy_error_t err = instproxy_error(property_list_service_client_new(device, service, &plistclient)); |
| @@ -103,14 +103,14 @@ instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descr | |||
| 103 | return INSTPROXY_E_SUCCESS; | 103 | return INSTPROXY_E_SUCCESS; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label) | 106 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label) |
| 107 | { | 107 | { |
| 108 | instproxy_error_t err = INSTPROXY_E_UNKNOWN_ERROR; | 108 | instproxy_error_t err = INSTPROXY_E_UNKNOWN_ERROR; |
| 109 | service_client_factory_start_service(device, INSTPROXY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(instproxy_client_new), &err); | 109 | service_client_factory_start_service(device, INSTPROXY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(instproxy_client_new), &err); |
| 110 | return err; | 110 | return err; |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | instproxy_error_t instproxy_client_free(instproxy_client_t client) | 113 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_free(instproxy_client_t client) |
| 114 | { | 114 | { |
| 115 | if (!client) | 115 | if (!client) |
| 116 | return INSTPROXY_E_INVALID_ARG; | 116 | return INSTPROXY_E_INVALID_ARG; |
| @@ -162,7 +162,7 @@ static instproxy_error_t instproxy_send_command(instproxy_client_t client, const | |||
| 162 | return err; | 162 | return err; |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result) | 165 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result) |
| 166 | { | 166 | { |
| 167 | if (!client || !client->parent || !result) | 167 | if (!client || !client->parent || !result) |
| 168 | return INSTPROXY_E_INVALID_ARG; | 168 | return INSTPROXY_E_INVALID_ARG; |
| @@ -414,17 +414,17 @@ static instproxy_error_t instproxy_install_or_upgrade(instproxy_client_t client, | |||
| 414 | return instproxy_create_status_updater(client, status_cb, command, user_data); | 414 | return instproxy_create_status_updater(client, status_cb, command, user_data); |
| 415 | } | 415 | } |
| 416 | 416 | ||
| 417 | 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) | 417 | 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) |
| 418 | { | 418 | { |
| 419 | return instproxy_install_or_upgrade(client, pkg_path, client_options, status_cb, "Install", user_data); | 419 | return instproxy_install_or_upgrade(client, pkg_path, client_options, status_cb, "Install", user_data); |
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | 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) | 422 | 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) |
| 423 | { | 423 | { |
| 424 | return instproxy_install_or_upgrade(client, pkg_path, client_options, status_cb, "Upgrade", user_data); | 424 | return instproxy_install_or_upgrade(client, pkg_path, client_options, status_cb, "Upgrade", user_data); |
| 425 | } | 425 | } |
| 426 | 426 | ||
| 427 | 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) | 427 | 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) |
| 428 | { | 428 | { |
| 429 | if (!client || !client->parent || !appid) { | 429 | if (!client || !client->parent || !appid) { |
| 430 | return INSTPROXY_E_INVALID_ARG; | 430 | return INSTPROXY_E_INVALID_ARG; |
| @@ -448,7 +448,7 @@ instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *app | |||
| 448 | return instproxy_create_status_updater(client, status_cb, "Uninstall", user_data); | 448 | return instproxy_create_status_updater(client, status_cb, "Uninstall", user_data); |
| 449 | } | 449 | } |
| 450 | 450 | ||
| 451 | instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result) | 451 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result) |
| 452 | { | 452 | { |
| 453 | if (!client || !client->parent || !result) | 453 | if (!client || !client->parent || !result) |
| 454 | return INSTPROXY_E_INVALID_ARG; | 454 | return INSTPROXY_E_INVALID_ARG; |
| @@ -474,7 +474,7 @@ leave_unlock: | |||
| 474 | return res; | 474 | return res; |
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | 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) | 477 | 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) |
| 478 | { | 478 | { |
| 479 | if (!client || !client->parent || !appid) | 479 | if (!client || !client->parent || !appid) |
| 480 | return INSTPROXY_E_INVALID_ARG; | 480 | return INSTPROXY_E_INVALID_ARG; |
| @@ -494,7 +494,7 @@ instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid | |||
| 494 | return instproxy_create_status_updater(client, status_cb, "Archive", user_data); | 494 | return instproxy_create_status_updater(client, status_cb, "Archive", user_data); |
| 495 | } | 495 | } |
| 496 | 496 | ||
| 497 | 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) | 497 | 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) |
| 498 | { | 498 | { |
| 499 | if (!client || !client->parent || !appid) | 499 | if (!client || !client->parent || !appid) |
| 500 | return INSTPROXY_E_INVALID_ARG; | 500 | return INSTPROXY_E_INVALID_ARG; |
| @@ -514,7 +514,7 @@ instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid | |||
| 514 | return instproxy_create_status_updater(client, status_cb, "Restore", user_data); | 514 | return instproxy_create_status_updater(client, status_cb, "Restore", user_data); |
| 515 | } | 515 | } |
| 516 | 516 | ||
| 517 | 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) | 517 | 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) |
| 518 | { | 518 | { |
| 519 | if (!client || !client->parent || !appid) | 519 | if (!client || !client->parent || !appid) |
| 520 | return INSTPROXY_E_INVALID_ARG; | 520 | return INSTPROXY_E_INVALID_ARG; |
| @@ -534,12 +534,12 @@ instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char | |||
| 534 | return instproxy_create_status_updater(client, status_cb, "RemoveArchive", user_data); | 534 | return instproxy_create_status_updater(client, status_cb, "RemoveArchive", user_data); |
| 535 | } | 535 | } |
| 536 | 536 | ||
| 537 | plist_t instproxy_client_options_new() | 537 | LIBIMOBILEDEVICE_API plist_t instproxy_client_options_new() |
| 538 | { | 538 | { |
| 539 | return plist_new_dict(); | 539 | return plist_new_dict(); |
| 540 | } | 540 | } |
| 541 | 541 | ||
| 542 | void instproxy_client_options_add(plist_t client_options, ...) | 542 | LIBIMOBILEDEVICE_API void instproxy_client_options_add(plist_t client_options, ...) |
| 543 | { | 543 | { |
| 544 | if (!client_options) | 544 | if (!client_options) |
| 545 | return; | 545 | return; |
| @@ -572,14 +572,14 @@ void instproxy_client_options_add(plist_t client_options, ...) | |||
| 572 | va_end(args); | 572 | va_end(args); |
| 573 | } | 573 | } |
| 574 | 574 | ||
| 575 | void instproxy_client_options_free(plist_t client_options) | 575 | LIBIMOBILEDEVICE_API void instproxy_client_options_free(plist_t client_options) |
| 576 | { | 576 | { |
| 577 | if (client_options) { | 577 | if (client_options) { |
| 578 | plist_free(client_options); | 578 | plist_free(client_options); |
| 579 | } | 579 | } |
| 580 | } | 580 | } |
| 581 | 581 | ||
| 582 | instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* appid, char** path) | 582 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* appid, char** path) |
| 583 | { | 583 | { |
| 584 | if (!client || !client->parent || !appid) | 584 | if (!client || !client->parent || !appid) |
| 585 | return INSTPROXY_E_INVALID_ARG; | 585 | return INSTPROXY_E_INVALID_ARG; |
diff --git a/src/lockdown.c b/src/lockdown.c index 5c07bcc..8dc1644 100644 --- a/src/lockdown.c +++ b/src/lockdown.c | |||
| @@ -154,7 +154,7 @@ static void plist_dict_add_label(plist_t plist, const char *label) | |||
| 154 | } | 154 | } |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id) | 157 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id) |
| 158 | { | 158 | { |
| 159 | if (!client) | 159 | if (!client) |
| 160 | return LOCKDOWN_E_INVALID_ARG; | 160 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -237,7 +237,7 @@ static lockdownd_error_t lockdownd_client_free_simple(lockdownd_client_t client) | |||
| 237 | return ret; | 237 | return ret; |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | lockdownd_error_t lockdownd_client_free(lockdownd_client_t client) | 240 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_client_free(lockdownd_client_t client) |
| 241 | { | 241 | { |
| 242 | if (!client) | 242 | if (!client) |
| 243 | return LOCKDOWN_E_INVALID_ARG; | 243 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -253,7 +253,7 @@ lockdownd_error_t lockdownd_client_free(lockdownd_client_t client) | |||
| 253 | return ret; | 253 | return ret; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | void lockdownd_client_set_label(lockdownd_client_t client, const char *label) | 256 | LIBIMOBILEDEVICE_API void lockdownd_client_set_label(lockdownd_client_t client, const char *label) |
| 257 | { | 257 | { |
| 258 | if (client) { | 258 | if (client) { |
| 259 | if (client->label) | 259 | if (client->label) |
| @@ -263,7 +263,7 @@ void lockdownd_client_set_label(lockdownd_client_t client, const char *label) | |||
| 263 | } | 263 | } |
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist_t *plist) | 266 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist_t *plist) |
| 267 | { | 267 | { |
| 268 | if (!client || !plist || (plist && *plist)) | 268 | if (!client || !plist || (plist && *plist)) |
| 269 | return LOCKDOWN_E_INVALID_ARG; | 269 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -281,7 +281,7 @@ lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist_t *plist) | |||
| 281 | return ret; | 281 | return ret; |
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist) | 284 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist) |
| 285 | { | 285 | { |
| 286 | if (!client || !plist) | 286 | if (!client || !plist) |
| 287 | return LOCKDOWN_E_INVALID_ARG; | 287 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -296,7 +296,7 @@ lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist) | |||
| 296 | return ret; | 296 | return ret; |
| 297 | } | 297 | } |
| 298 | 298 | ||
| 299 | lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type) | 299 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type) |
| 300 | { | 300 | { |
| 301 | if (!client) | 301 | if (!client) |
| 302 | return LOCKDOWN_E_INVALID_ARG; | 302 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -341,7 +341,7 @@ lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type) | |||
| 341 | return ret; | 341 | return ret; |
| 342 | } | 342 | } |
| 343 | 343 | ||
| 344 | lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *domain, const char *key, plist_t *value) | 344 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *domain, const char *key, plist_t *value) |
| 345 | { | 345 | { |
| 346 | if (!client) | 346 | if (!client) |
| 347 | return LOCKDOWN_E_INVALID_ARG; | 347 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -396,7 +396,7 @@ lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *dom | |||
| 396 | return ret; | 396 | return ret; |
| 397 | } | 397 | } |
| 398 | 398 | ||
| 399 | lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value) | 399 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value) |
| 400 | { | 400 | { |
| 401 | if (!client || !value) | 401 | if (!client || !value) |
| 402 | return LOCKDOWN_E_INVALID_ARG; | 402 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -444,7 +444,7 @@ lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *dom | |||
| 444 | return ret; | 444 | return ret; |
| 445 | } | 445 | } |
| 446 | 446 | ||
| 447 | lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key) | 447 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key) |
| 448 | { | 448 | { |
| 449 | if (!client) | 449 | if (!client) |
| 450 | return LOCKDOWN_E_INVALID_ARG; | 450 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -491,7 +491,7 @@ lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char * | |||
| 491 | return ret; | 491 | return ret; |
| 492 | } | 492 | } |
| 493 | 493 | ||
| 494 | lockdownd_error_t lockdownd_get_device_udid(lockdownd_client_t client, char **udid) | 494 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_device_udid(lockdownd_client_t client, char **udid) |
| 495 | { | 495 | { |
| 496 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; | 496 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; |
| 497 | plist_t value = NULL; | 497 | plist_t value = NULL; |
| @@ -537,7 +537,7 @@ static lockdownd_error_t lockdownd_get_device_public_key_as_key_data(lockdownd_c | |||
| 537 | return ret; | 537 | return ret; |
| 538 | } | 538 | } |
| 539 | 539 | ||
| 540 | lockdownd_error_t lockdownd_get_device_name(lockdownd_client_t client, char **device_name) | 540 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_device_name(lockdownd_client_t client, char **device_name) |
| 541 | { | 541 | { |
| 542 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; | 542 | lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; |
| 543 | plist_t value = NULL; | 543 | plist_t value = NULL; |
| @@ -554,7 +554,7 @@ lockdownd_error_t lockdownd_get_device_name(lockdownd_client_t client, char **de | |||
| 554 | return ret; | 554 | return ret; |
| 555 | } | 555 | } |
| 556 | 556 | ||
| 557 | lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *client, const char *label) | 557 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *client, const char *label) |
| 558 | { | 558 | { |
| 559 | if (!client) | 559 | if (!client) |
| 560 | return LOCKDOWN_E_INVALID_ARG; | 560 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -587,7 +587,7 @@ lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *cli | |||
| 587 | return LOCKDOWN_E_SUCCESS; | 587 | return LOCKDOWN_E_SUCCESS; |
| 588 | } | 588 | } |
| 589 | 589 | ||
| 590 | lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdownd_client_t *client, const char *label) | 590 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdownd_client_t *client, const char *label) |
| 591 | { | 591 | { |
| 592 | if (!client) | 592 | if (!client) |
| 593 | return LOCKDOWN_E_INVALID_ARG; | 593 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -952,22 +952,22 @@ static lockdownd_error_t lockdownd_do_pair(lockdownd_client_t client, lockdownd_ | |||
| 952 | return ret; | 952 | return ret; |
| 953 | } | 953 | } |
| 954 | 954 | ||
| 955 | lockdownd_error_t lockdownd_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record) | 955 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record) |
| 956 | { | 956 | { |
| 957 | return lockdownd_do_pair(client, pair_record, "Pair"); | 957 | return lockdownd_do_pair(client, pair_record, "Pair"); |
| 958 | } | 958 | } |
| 959 | 959 | ||
| 960 | lockdownd_error_t lockdownd_validate_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record) | 960 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_validate_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record) |
| 961 | { | 961 | { |
| 962 | return lockdownd_do_pair(client, pair_record, "ValidatePair"); | 962 | return lockdownd_do_pair(client, pair_record, "ValidatePair"); |
| 963 | } | 963 | } |
| 964 | 964 | ||
| 965 | lockdownd_error_t lockdownd_unpair(lockdownd_client_t client, lockdownd_pair_record_t pair_record) | 965 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_unpair(lockdownd_client_t client, lockdownd_pair_record_t pair_record) |
| 966 | { | 966 | { |
| 967 | return lockdownd_do_pair(client, pair_record, "Unpair"); | 967 | return lockdownd_do_pair(client, pair_record, "Unpair"); |
| 968 | } | 968 | } |
| 969 | 969 | ||
| 970 | lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client) | 970 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client) |
| 971 | { | 971 | { |
| 972 | if (!client) | 972 | if (!client) |
| 973 | return LOCKDOWN_E_INVALID_ARG; | 973 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -995,7 +995,7 @@ lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client) | |||
| 995 | return ret; | 995 | return ret; |
| 996 | } | 996 | } |
| 997 | 997 | ||
| 998 | lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client) | 998 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client) |
| 999 | { | 999 | { |
| 1000 | if (!client) | 1000 | if (!client) |
| 1001 | return LOCKDOWN_E_INVALID_ARG; | 1001 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -1028,7 +1028,7 @@ lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client) | |||
| 1028 | return ret; | 1028 | return ret; |
| 1029 | } | 1029 | } |
| 1030 | 1030 | ||
| 1031 | lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled) | 1031 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled) |
| 1032 | { | 1032 | { |
| 1033 | lockdownd_error_t ret = LOCKDOWN_E_SUCCESS; | 1033 | lockdownd_error_t ret = LOCKDOWN_E_SUCCESS; |
| 1034 | plist_t dict = NULL; | 1034 | plist_t dict = NULL; |
| @@ -1281,17 +1281,17 @@ static lockdownd_error_t lockdownd_do_start_service(lockdownd_client_t client, c | |||
| 1281 | return ret; | 1281 | return ret; |
| 1282 | } | 1282 | } |
| 1283 | 1283 | ||
| 1284 | lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *identifier, lockdownd_service_descriptor_t *service) | 1284 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *identifier, lockdownd_service_descriptor_t *service) |
| 1285 | { | 1285 | { |
| 1286 | return lockdownd_do_start_service(client, identifier, 0, service); | 1286 | return lockdownd_do_start_service(client, identifier, 0, service); |
| 1287 | } | 1287 | } |
| 1288 | 1288 | ||
| 1289 | lockdownd_error_t lockdownd_start_service_with_escrow_bag(lockdownd_client_t client, const char *identifier, lockdownd_service_descriptor_t *service) | 1289 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_service_with_escrow_bag(lockdownd_client_t client, const char *identifier, lockdownd_service_descriptor_t *service) |
| 1290 | { | 1290 | { |
| 1291 | return lockdownd_do_start_service(client, identifier, 1, service); | 1291 | return lockdownd_do_start_service(client, identifier, 1, service); |
| 1292 | } | 1292 | } |
| 1293 | 1293 | ||
| 1294 | lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activation_record) | 1294 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activation_record) |
| 1295 | { | 1295 | { |
| 1296 | if (!client) | 1296 | if (!client) |
| 1297 | return LOCKDOWN_E_INVALID_ARG; | 1297 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -1342,7 +1342,7 @@ lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activati | |||
| 1342 | return ret; | 1342 | return ret; |
| 1343 | } | 1343 | } |
| 1344 | 1344 | ||
| 1345 | lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client) | 1345 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client) |
| 1346 | { | 1346 | { |
| 1347 | if (!client) | 1347 | if (!client) |
| 1348 | return LOCKDOWN_E_INVALID_ARG; | 1348 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -1389,7 +1389,7 @@ static void str_remove_spaces(char *source) | |||
| 1389 | *dest = 0; | 1389 | *dest = 0; |
| 1390 | } | 1390 | } |
| 1391 | 1391 | ||
| 1392 | lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, char ***classes, int *count) | 1392 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, char ***classes, int *count) |
| 1393 | { | 1393 | { |
| 1394 | if (!client) | 1394 | if (!client) |
| 1395 | return LOCKDOWN_E_INVALID_ARG; | 1395 | return LOCKDOWN_E_INVALID_ARG; |
| @@ -1444,8 +1444,7 @@ lockdownd_error_t lockdownd_get_sync_data_classes(lockdownd_client_t client, cha | |||
| 1444 | return LOCKDOWN_E_SUCCESS; | 1444 | return LOCKDOWN_E_SUCCESS; |
| 1445 | } | 1445 | } |
| 1446 | 1446 | ||
| 1447 | 1447 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_data_classes_free(char **classes) | |
| 1448 | lockdownd_error_t lockdownd_data_classes_free(char **classes) | ||
| 1449 | { | 1448 | { |
| 1450 | if (classes) { | 1449 | if (classes) { |
| 1451 | int i = 0; | 1450 | int i = 0; |
| @@ -1457,7 +1456,7 @@ lockdownd_error_t lockdownd_data_classes_free(char **classes) | |||
| 1457 | return LOCKDOWN_E_SUCCESS; | 1456 | return LOCKDOWN_E_SUCCESS; |
| 1458 | } | 1457 | } |
| 1459 | 1458 | ||
| 1460 | lockdownd_error_t lockdownd_service_descriptor_free(lockdownd_service_descriptor_t service) | 1459 | LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_service_descriptor_free(lockdownd_service_descriptor_t service) |
| 1461 | { | 1460 | { |
| 1462 | if (service) | 1461 | if (service) |
| 1463 | free(service); | 1462 | free(service); |
diff --git a/src/misagent.c b/src/misagent.c index 96dddba..e00fb17 100644 --- a/src/misagent.c +++ b/src/misagent.c | |||
| @@ -87,7 +87,7 @@ static misagent_error_t misagent_check_result(plist_t response, int* status_code | |||
| 87 | } | 87 | } |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client) | 90 | LIBIMOBILEDEVICE_API misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client) |
| 91 | { | 91 | { |
| 92 | property_list_service_client_t plistclient = NULL; | 92 | property_list_service_client_t plistclient = NULL; |
| 93 | misagent_error_t err = misagent_error(property_list_service_client_new(device, service, &plistclient)); | 93 | misagent_error_t err = misagent_error(property_list_service_client_new(device, service, &plistclient)); |
| @@ -103,14 +103,14 @@ misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descrip | |||
| 103 | return MISAGENT_E_SUCCESS; | 103 | return MISAGENT_E_SUCCESS; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | misagent_error_t misagent_client_start_service(idevice_t device, misagent_client_t * client, const char* label) | 106 | LIBIMOBILEDEVICE_API misagent_error_t misagent_client_start_service(idevice_t device, misagent_client_t * client, const char* label) |
| 107 | { | 107 | { |
| 108 | misagent_error_t err = MISAGENT_E_UNKNOWN_ERROR; | 108 | misagent_error_t err = MISAGENT_E_UNKNOWN_ERROR; |
| 109 | service_client_factory_start_service(device, MISAGENT_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(misagent_client_new), &err); | 109 | service_client_factory_start_service(device, MISAGENT_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(misagent_client_new), &err); |
| 110 | return err; | 110 | return err; |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | misagent_error_t misagent_client_free(misagent_client_t client) | 113 | LIBIMOBILEDEVICE_API misagent_error_t misagent_client_free(misagent_client_t client) |
| 114 | { | 114 | { |
| 115 | if (!client) | 115 | if (!client) |
| 116 | return MISAGENT_E_INVALID_ARG; | 116 | return MISAGENT_E_INVALID_ARG; |
| @@ -125,7 +125,7 @@ misagent_error_t misagent_client_free(misagent_client_t client) | |||
| 125 | return err; | 125 | return err; |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | misagent_error_t misagent_install(misagent_client_t client, plist_t profile) | 128 | LIBIMOBILEDEVICE_API misagent_error_t misagent_install(misagent_client_t client, plist_t profile) |
| 129 | { | 129 | { |
| 130 | if (!client || !client->parent || !profile || (plist_get_node_type(profile) != PLIST_DATA)) | 130 | if (!client || !client->parent || !profile || (plist_get_node_type(profile) != PLIST_DATA)) |
| 131 | return MISAGENT_E_INVALID_ARG; | 131 | return MISAGENT_E_INVALID_ARG; |
| @@ -162,7 +162,7 @@ misagent_error_t misagent_install(misagent_client_t client, plist_t profile) | |||
| 162 | return res; | 162 | return res; |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles) | 165 | LIBIMOBILEDEVICE_API misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles) |
| 166 | { | 166 | { |
| 167 | if (!client || !client->parent || !profiles) | 167 | if (!client || !client->parent || !profiles) |
| 168 | return MISAGENT_E_INVALID_ARG; | 168 | return MISAGENT_E_INVALID_ARG; |
| @@ -202,7 +202,7 @@ misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles) | |||
| 202 | 202 | ||
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | misagent_error_t misagent_remove(misagent_client_t client, const char* profileID) | 205 | LIBIMOBILEDEVICE_API misagent_error_t misagent_remove(misagent_client_t client, const char* profileID) |
| 206 | { | 206 | { |
| 207 | if (!client || !client->parent || !profileID) | 207 | if (!client || !client->parent || !profileID) |
| 208 | return MISAGENT_E_INVALID_ARG; | 208 | return MISAGENT_E_INVALID_ARG; |
| @@ -239,7 +239,7 @@ misagent_error_t misagent_remove(misagent_client_t client, const char* profileID | |||
| 239 | return res; | 239 | return res; |
| 240 | } | 240 | } |
| 241 | 241 | ||
| 242 | int misagent_get_status_code(misagent_client_t client) | 242 | LIBIMOBILEDEVICE_API int misagent_get_status_code(misagent_client_t client) |
| 243 | { | 243 | { |
| 244 | if (!client) { | 244 | if (!client) { |
| 245 | return -1; | 245 | return -1; |
diff --git a/src/mobile_image_mounter.c b/src/mobile_image_mounter.c index ab32cac..9696b8c 100644 --- a/src/mobile_image_mounter.c +++ b/src/mobile_image_mounter.c | |||
| @@ -75,7 +75,7 @@ static mobile_image_mounter_error_t mobile_image_mounter_error(property_list_ser | |||
| 75 | return MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; | 75 | return MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdownd_service_descriptor_t service, mobile_image_mounter_client_t *client) | 78 | 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) |
| 79 | { | 79 | { |
| 80 | property_list_service_client_t plistclient = NULL; | 80 | property_list_service_client_t plistclient = NULL; |
| 81 | mobile_image_mounter_error_t err = mobile_image_mounter_error(property_list_service_client_new(device, service, &plistclient)); | 81 | mobile_image_mounter_error_t err = mobile_image_mounter_error(property_list_service_client_new(device, service, &plistclient)); |
| @@ -92,14 +92,14 @@ mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdown | |||
| 92 | return MOBILE_IMAGE_MOUNTER_E_SUCCESS; | 92 | return MOBILE_IMAGE_MOUNTER_E_SUCCESS; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t * client, const char* label) | 95 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t * client, const char* label) |
| 96 | { | 96 | { |
| 97 | mobile_image_mounter_error_t err = MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; | 97 | mobile_image_mounter_error_t err = MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; |
| 98 | service_client_factory_start_service(device, MOBILE_IMAGE_MOUNTER_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobile_image_mounter_new), &err); | 98 | service_client_factory_start_service(device, MOBILE_IMAGE_MOUNTER_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobile_image_mounter_new), &err); |
| 99 | return err; | 99 | return err; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client) | 102 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client) |
| 103 | { | 103 | { |
| 104 | if (!client) | 104 | if (!client) |
| 105 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; | 105 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; |
| @@ -112,7 +112,7 @@ mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_clie | |||
| 112 | return MOBILE_IMAGE_MOUNTER_E_SUCCESS; | 112 | return MOBILE_IMAGE_MOUNTER_E_SUCCESS; |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result) | 115 | 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) |
| 116 | { | 116 | { |
| 117 | if (!client || !image_type || !result) { | 117 | if (!client || !image_type || !result) { |
| 118 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; | 118 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; |
| @@ -141,7 +141,7 @@ leave_unlock: | |||
| 141 | return res; | 141 | return res; |
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | 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) | 144 | 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) |
| 145 | { | 145 | { |
| 146 | if (!client || !image_type || (image_size == 0) || !upload_cb) { | 146 | if (!client || !image_type || (image_size == 0) || !upload_cb) { |
| 147 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; | 147 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; |
| @@ -252,7 +252,7 @@ leave_unlock: | |||
| 252 | 252 | ||
| 253 | } | 253 | } |
| 254 | 254 | ||
| 255 | 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) | 255 | 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) |
| 256 | { | 256 | { |
| 257 | if (!client || !image_path || !image_type || !result) { | 257 | if (!client || !image_path || !image_type || !result) { |
| 258 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; | 258 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; |
| @@ -284,7 +284,7 @@ leave_unlock: | |||
| 284 | return res; | 284 | return res; |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client) | 287 | LIBIMOBILEDEVICE_API mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client) |
| 288 | { | 288 | { |
| 289 | if (!client) { | 289 | if (!client) { |
| 290 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; | 290 | return MOBILE_IMAGE_MOUNTER_E_INVALID_ARG; |
diff --git a/src/mobilebackup.c b/src/mobilebackup.c index 7107d12..eefaef3 100644 --- a/src/mobilebackup.c +++ b/src/mobilebackup.c | |||
| @@ -60,7 +60,7 @@ static mobilebackup_error_t mobilebackup_error(device_link_service_error_t err) | |||
| 60 | return MOBILEBACKUP_E_UNKNOWN_ERROR; | 60 | return MOBILEBACKUP_E_UNKNOWN_ERROR; |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup_client_t * client) | 63 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup_client_t * client) |
| 64 | { | 64 | { |
| 65 | if (!device || !service || service->port == 0 || !client || *client) | 65 | if (!device || !service || service->port == 0 || !client || *client) |
| 66 | return MOBILEBACKUP_E_INVALID_ARG; | 66 | return MOBILEBACKUP_E_INVALID_ARG; |
| @@ -87,14 +87,14 @@ mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service | |||
| 87 | return ret; | 87 | return ret; |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobilebackup_client_t * client, const char* label) | 90 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobilebackup_client_t * client, const char* label) |
| 91 | { | 91 | { |
| 92 | mobilebackup_error_t err = MOBILEBACKUP_E_UNKNOWN_ERROR; | 92 | mobilebackup_error_t err = MOBILEBACKUP_E_UNKNOWN_ERROR; |
| 93 | service_client_factory_start_service(device, MOBILEBACKUP_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilebackup_client_new), &err); | 93 | service_client_factory_start_service(device, MOBILEBACKUP_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilebackup_client_new), &err); |
| 94 | return err; | 94 | return err; |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client) | 97 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client) |
| 98 | { | 98 | { |
| 99 | if (!client) | 99 | if (!client) |
| 100 | return MOBILEBACKUP_E_INVALID_ARG; | 100 | return MOBILEBACKUP_E_INVALID_ARG; |
| @@ -107,7 +107,7 @@ mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client) | |||
| 107 | return err; | 107 | return err; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t * plist) | 110 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t * plist) |
| 111 | { | 111 | { |
| 112 | if (!client) | 112 | if (!client) |
| 113 | return MOBILEBACKUP_E_INVALID_ARG; | 113 | return MOBILEBACKUP_E_INVALID_ARG; |
| @@ -115,7 +115,7 @@ mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t | |||
| 115 | return ret; | 115 | return ret; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist) | 118 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist) |
| 119 | { | 119 | { |
| 120 | if (!client || !plist) | 120 | if (!client || !plist) |
| 121 | return MOBILEBACKUP_E_INVALID_ARG; | 121 | return MOBILEBACKUP_E_INVALID_ARG; |
| @@ -232,7 +232,7 @@ leave: | |||
| 232 | return err; | 232 | return err; |
| 233 | } | 233 | } |
| 234 | 234 | ||
| 235 | mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, plist_t backup_manifest, const char *base_path, const char *proto_version) | 235 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, plist_t backup_manifest, const char *base_path, const char *proto_version) |
| 236 | { | 236 | { |
| 237 | if (!client || !client->parent || !base_path || !proto_version) | 237 | if (!client || !client->parent || !base_path || !proto_version) |
| 238 | return MOBILEBACKUP_E_INVALID_ARG; | 238 | return MOBILEBACKUP_E_INVALID_ARG; |
| @@ -292,12 +292,12 @@ leave: | |||
| 292 | return err; | 292 | return err; |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_t client) | 295 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_t client) |
| 296 | { | 296 | { |
| 297 | return mobilebackup_send_message(client, "kBackupMessageBackupFileReceived", NULL); | 297 | return mobilebackup_send_message(client, "kBackupMessageBackupFileReceived", NULL); |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, plist_t backup_manifest, mobilebackup_flags_t flags, const char *proto_version) | 300 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, plist_t backup_manifest, mobilebackup_flags_t flags, const char *proto_version) |
| 301 | { | 301 | { |
| 302 | if (!client || !client->parent || !backup_manifest || !proto_version) | 302 | if (!client || !client->parent || !backup_manifest || !proto_version) |
| 303 | return MOBILEBACKUP_E_INVALID_ARG; | 303 | return MOBILEBACKUP_E_INVALID_ARG; |
| @@ -351,17 +351,17 @@ leave: | |||
| 351 | return err; | 351 | return err; |
| 352 | } | 352 | } |
| 353 | 353 | ||
| 354 | mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_client_t client, plist_t *result) | 354 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_client_t client, plist_t *result) |
| 355 | { | 355 | { |
| 356 | return mobilebackup_receive_message(client, "BackupMessageRestoreFileReceived", result); | 356 | return mobilebackup_receive_message(client, "BackupMessageRestoreFileReceived", result); |
| 357 | } | 357 | } |
| 358 | 358 | ||
| 359 | mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebackup_client_t client, plist_t *result) | 359 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebackup_client_t client, plist_t *result) |
| 360 | { | 360 | { |
| 361 | return mobilebackup_receive_message(client, "BackupMessageRestoreApplicationReceived", result); | 361 | return mobilebackup_receive_message(client, "BackupMessageRestoreApplicationReceived", result); |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t client) | 364 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t client) |
| 365 | { | 365 | { |
| 366 | mobilebackup_error_t err = mobilebackup_send_message(client, "BackupMessageRestoreComplete", NULL); | 366 | mobilebackup_error_t err = mobilebackup_send_message(client, "BackupMessageRestoreComplete", NULL); |
| 367 | if (err != MOBILEBACKUP_E_SUCCESS) { | 367 | if (err != MOBILEBACKUP_E_SUCCESS) { |
| @@ -406,7 +406,7 @@ mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t cl | |||
| 406 | return err; | 406 | return err; |
| 407 | } | 407 | } |
| 408 | 408 | ||
| 409 | mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const char *reason) | 409 | LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const char *reason) |
| 410 | { | 410 | { |
| 411 | if (!client || !client->parent || !reason) | 411 | if (!client || !client->parent || !reason) |
| 412 | return MOBILEBACKUP_E_INVALID_ARG; | 412 | return MOBILEBACKUP_E_INVALID_ARG; |
diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c index 41fe5d3..38b4069 100644 --- a/src/mobilebackup2.c +++ b/src/mobilebackup2.c | |||
| @@ -61,7 +61,7 @@ static mobilebackup2_error_t mobilebackup2_error(device_link_service_error_t err | |||
| 61 | return MOBILEBACKUP2_E_UNKNOWN_ERROR; | 61 | return MOBILEBACKUP2_E_UNKNOWN_ERROR; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, | 64 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, |
| 65 | mobilebackup2_client_t * client) | 65 | mobilebackup2_client_t * client) |
| 66 | { | 66 | { |
| 67 | if (!device || !service || service->port == 0 || !client || *client) | 67 | if (!device || !service || service->port == 0 || !client || *client) |
| @@ -89,14 +89,14 @@ mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_servi | |||
| 89 | return ret; | 89 | return ret; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t * client, const char* label) | 92 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t * client, const char* label) |
| 93 | { | 93 | { |
| 94 | mobilebackup2_error_t err = MOBILEBACKUP2_E_UNKNOWN_ERROR; | 94 | mobilebackup2_error_t err = MOBILEBACKUP2_E_UNKNOWN_ERROR; |
| 95 | service_client_factory_start_service(device, MOBILEBACKUP2_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilebackup2_client_new), &err); | 95 | service_client_factory_start_service(device, MOBILEBACKUP2_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilebackup2_client_new), &err); |
| 96 | return err; | 96 | return err; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client) | 99 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client) |
| 100 | { | 100 | { |
| 101 | if (!client) | 101 | if (!client) |
| 102 | return MOBILEBACKUP2_E_INVALID_ARG; | 102 | return MOBILEBACKUP2_E_INVALID_ARG; |
| @@ -109,7 +109,7 @@ mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client) | |||
| 109 | return err; | 109 | return err; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options) | 112 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options) |
| 113 | { | 113 | { |
| 114 | if (!client || !client->parent || (!message && !options)) | 114 | if (!client || !client->parent || (!message && !options)) |
| 115 | return MOBILEBACKUP2_E_INVALID_ARG; | 115 | return MOBILEBACKUP2_E_INVALID_ARG; |
| @@ -207,12 +207,12 @@ leave: | |||
| 207 | return err; | 207 | return err; |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage) | 210 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage) |
| 211 | { | 211 | { |
| 212 | return mobilebackup2_error(device_link_service_receive_message(client->parent, msg_plist, dlmessage)); | 212 | return mobilebackup2_error(device_link_service_receive_message(client->parent, msg_plist, dlmessage)); |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes) | 215 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes) |
| 216 | { | 216 | { |
| 217 | if (!client || !client->parent || !data || (length == 0) || !bytes) | 217 | if (!client || !client->parent || !data || (length == 0) || !bytes) |
| 218 | return MOBILEBACKUP2_E_INVALID_ARG; | 218 | return MOBILEBACKUP2_E_INVALID_ARG; |
| @@ -238,7 +238,7 @@ mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, cons | |||
| 238 | } | 238 | } |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes) | 241 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes) |
| 242 | { | 242 | { |
| 243 | if (!client || !client->parent || !data || (length == 0) || !bytes) | 243 | if (!client || !client->parent || !data || (length == 0) || !bytes) |
| 244 | return MOBILEBACKUP2_E_INVALID_ARG; | 244 | return MOBILEBACKUP2_E_INVALID_ARG; |
| @@ -265,7 +265,7 @@ mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, c | |||
| 265 | } | 265 | } |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client, double local_versions[], char count, double *remote_version) | 268 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client, double local_versions[], char count, double *remote_version) |
| 269 | { | 269 | { |
| 270 | int i; | 270 | int i; |
| 271 | 271 | ||
| @@ -323,7 +323,7 @@ leave: | |||
| 323 | return err; | 323 | return err; |
| 324 | } | 324 | } |
| 325 | 325 | ||
| 326 | mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options) | 326 | 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) |
| 327 | { | 327 | { |
| 328 | if (!client || !client->parent || !request || !target_identifier) | 328 | if (!client || !client->parent || !request || !target_identifier) |
| 329 | return MOBILEBACKUP2_E_INVALID_ARG; | 329 | return MOBILEBACKUP2_E_INVALID_ARG; |
| @@ -354,7 +354,7 @@ mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, | |||
| 354 | return err; | 354 | return err; |
| 355 | } | 355 | } |
| 356 | 356 | ||
| 357 | mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2) | 357 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2) |
| 358 | { | 358 | { |
| 359 | if (!client || !client->parent) | 359 | if (!client || !client->parent) |
| 360 | return MOBILEBACKUP2_E_INVALID_ARG; | 360 | return MOBILEBACKUP2_E_INVALID_ARG; |
diff --git a/src/mobilesync.c b/src/mobilesync.c index f0fc4b2..6138762 100644 --- a/src/mobilesync.c +++ b/src/mobilesync.c | |||
| @@ -65,7 +65,7 @@ static mobilesync_error_t mobilesync_error(device_link_service_error_t err) | |||
| 65 | return MOBILESYNC_E_UNKNOWN_ERROR; | 65 | return MOBILESYNC_E_UNKNOWN_ERROR; |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, | 68 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, |
| 69 | mobilesync_client_t * client) | 69 | mobilesync_client_t * client) |
| 70 | { | 70 | { |
| 71 | if (!device || !service || service->port == 0 || !client || *client) | 71 | if (!device || !service || service->port == 0 || !client || *client) |
| @@ -95,14 +95,14 @@ mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_des | |||
| 95 | return ret; | 95 | return ret; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t * client, const char* label) | 98 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t * client, const char* label) |
| 99 | { | 99 | { |
| 100 | mobilesync_error_t err = MOBILESYNC_E_UNKNOWN_ERROR; | 100 | mobilesync_error_t err = MOBILESYNC_E_UNKNOWN_ERROR; |
| 101 | service_client_factory_start_service(device, MOBILESYNC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilesync_client_new), &err); | 101 | service_client_factory_start_service(device, MOBILESYNC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilesync_client_new), &err); |
| 102 | return err; | 102 | return err; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | mobilesync_error_t mobilesync_client_free(mobilesync_client_t client) | 105 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_free(mobilesync_client_t client) |
| 106 | { | 106 | { |
| 107 | if (!client) | 107 | if (!client) |
| 108 | return MOBILESYNC_E_INVALID_ARG; | 108 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -112,7 +112,7 @@ mobilesync_error_t mobilesync_client_free(mobilesync_client_t client) | |||
| 112 | return err; | 112 | return err; |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plist) | 115 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plist) |
| 116 | { | 116 | { |
| 117 | if (!client) | 117 | if (!client) |
| 118 | return MOBILESYNC_E_INVALID_ARG; | 118 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -120,14 +120,14 @@ mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plis | |||
| 120 | return ret; | 120 | return ret; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist) | 123 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist) |
| 124 | { | 124 | { |
| 125 | if (!client || !plist) | 125 | if (!client || !plist) |
| 126 | return MOBILESYNC_E_INVALID_ARG; | 126 | return MOBILESYNC_E_INVALID_ARG; |
| 127 | return mobilesync_error(device_link_service_send(client->parent, plist)); | 127 | return mobilesync_error(device_link_service_send(client->parent, plist)); |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | 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) | 130 | 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) |
| 131 | { | 131 | { |
| 132 | if (!client || client->data_class || !data_class || | 132 | if (!client || client->data_class || !data_class || |
| 133 | !anchors || !anchors->computer_anchor) { | 133 | !anchors || !anchors->computer_anchor) { |
| @@ -253,7 +253,7 @@ mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data | |||
| 253 | return err; | 253 | return err; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | mobilesync_error_t mobilesync_finish(mobilesync_client_t client) | 256 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_finish(mobilesync_client_t client) |
| 257 | { | 257 | { |
| 258 | if (!client || !client->data_class) { | 258 | if (!client || !client->data_class) { |
| 259 | return MOBILESYNC_E_INVALID_ARG; | 259 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -338,17 +338,17 @@ static mobilesync_error_t mobilesync_get_records(mobilesync_client_t client, con | |||
| 338 | return err; | 338 | return err; |
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client) | 341 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client) |
| 342 | { | 342 | { |
| 343 | return mobilesync_get_records(client, "SDMessageGetAllRecordsFromDevice"); | 343 | return mobilesync_get_records(client, "SDMessageGetAllRecordsFromDevice"); |
| 344 | } | 344 | } |
| 345 | 345 | ||
| 346 | mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client) | 346 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client) |
| 347 | { | 347 | { |
| 348 | return mobilesync_get_records(client, "SDMessageGetChangesFromDevice"); | 348 | return mobilesync_get_records(client, "SDMessageGetChangesFromDevice"); |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions) | 351 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions) |
| 352 | { | 352 | { |
| 353 | if (!client || !client->data_class) { | 353 | if (!client || !client->data_class) { |
| 354 | return MOBILESYNC_E_INVALID_ARG; | 354 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -415,7 +415,7 @@ mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_ | |||
| 415 | return err; | 415 | return err; |
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client) | 418 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client) |
| 419 | { | 419 | { |
| 420 | if (!client || !client->data_class) { | 420 | if (!client || !client->data_class) { |
| 421 | return MOBILESYNC_E_INVALID_ARG; | 421 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -484,7 +484,7 @@ mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t cl | |||
| 484 | return err; | 484 | return err; |
| 485 | } | 485 | } |
| 486 | 486 | ||
| 487 | mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client) | 487 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client) |
| 488 | { | 488 | { |
| 489 | if (!client || !client->data_class) { | 489 | if (!client || !client->data_class) { |
| 490 | return MOBILESYNC_E_INVALID_ARG; | 490 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -518,7 +518,7 @@ static plist_t create_process_changes_message(const char *data_class, plist_t en | |||
| 518 | return msg; | 518 | return msg; |
| 519 | } | 519 | } |
| 520 | 520 | ||
| 521 | mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client) | 521 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client) |
| 522 | { | 522 | { |
| 523 | if (!client || !client->data_class) { | 523 | if (!client || !client->data_class) { |
| 524 | return MOBILESYNC_E_INVALID_ARG; | 524 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -585,7 +585,7 @@ mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_cli | |||
| 585 | return err; | 585 | return err; |
| 586 | } | 586 | } |
| 587 | 587 | ||
| 588 | mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions) | 588 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions) |
| 589 | { | 589 | { |
| 590 | if (!client || !client->data_class || !entities) { | 590 | if (!client || !client->data_class || !entities) { |
| 591 | return MOBILESYNC_E_INVALID_ARG; | 591 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -613,7 +613,7 @@ mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t e | |||
| 613 | return err; | 613 | return err; |
| 614 | } | 614 | } |
| 615 | 615 | ||
| 616 | mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping) | 616 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping) |
| 617 | { | 617 | { |
| 618 | if (!client || !client->data_class) { | 618 | if (!client || !client->data_class) { |
| 619 | return MOBILESYNC_E_INVALID_ARG; | 619 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -682,7 +682,7 @@ mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plis | |||
| 682 | return err; | 682 | return err; |
| 683 | } | 683 | } |
| 684 | 684 | ||
| 685 | mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason) | 685 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason) |
| 686 | { | 686 | { |
| 687 | if (!client || !client->data_class || !reason) { | 687 | if (!client || !client->data_class || !reason) { |
| 688 | return MOBILESYNC_E_INVALID_ARG; | 688 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -708,7 +708,7 @@ mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* rea | |||
| 708 | return err; | 708 | return err; |
| 709 | } | 709 | } |
| 710 | 710 | ||
| 711 | mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor) | 711 | LIBIMOBILEDEVICE_API mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor) |
| 712 | { | 712 | { |
| 713 | mobilesync_anchors_t anchors = (mobilesync_anchors_t) malloc(sizeof(mobilesync_anchors)); | 713 | mobilesync_anchors_t anchors = (mobilesync_anchors_t) malloc(sizeof(mobilesync_anchors)); |
| 714 | if (device_anchor != NULL) { | 714 | if (device_anchor != NULL) { |
| @@ -725,7 +725,7 @@ mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const cha | |||
| 725 | return anchors; | 725 | return anchors; |
| 726 | } | 726 | } |
| 727 | 727 | ||
| 728 | void mobilesync_anchors_free(mobilesync_anchors_t anchors) | 728 | LIBIMOBILEDEVICE_API void mobilesync_anchors_free(mobilesync_anchors_t anchors) |
| 729 | { | 729 | { |
| 730 | if (anchors->device_anchor != NULL) { | 730 | if (anchors->device_anchor != NULL) { |
| 731 | free(anchors->device_anchor); | 731 | free(anchors->device_anchor); |
| @@ -739,12 +739,12 @@ void mobilesync_anchors_free(mobilesync_anchors_t anchors) | |||
| 739 | anchors = NULL; | 739 | anchors = NULL; |
| 740 | } | 740 | } |
| 741 | 741 | ||
| 742 | plist_t mobilesync_actions_new() | 742 | LIBIMOBILEDEVICE_API plist_t mobilesync_actions_new() |
| 743 | { | 743 | { |
| 744 | return plist_new_dict(); | 744 | return plist_new_dict(); |
| 745 | } | 745 | } |
| 746 | 746 | ||
| 747 | void mobilesync_actions_add(plist_t actions, ...) | 747 | LIBIMOBILEDEVICE_API void mobilesync_actions_add(plist_t actions, ...) |
| 748 | { | 748 | { |
| 749 | if (!actions) | 749 | if (!actions) |
| 750 | return; | 750 | return; |
| @@ -776,7 +776,7 @@ void mobilesync_actions_add(plist_t actions, ...) | |||
| 776 | va_end(args); | 776 | va_end(args); |
| 777 | } | 777 | } |
| 778 | 778 | ||
| 779 | void mobilesync_actions_free(plist_t actions) | 779 | LIBIMOBILEDEVICE_API void mobilesync_actions_free(plist_t actions) |
| 780 | { | 780 | { |
| 781 | if (actions) { | 781 | if (actions) { |
| 782 | plist_free(actions); | 782 | plist_free(actions); |
diff --git a/src/notification_proxy.c b/src/notification_proxy.c index 909ede4..541e429 100644 --- a/src/notification_proxy.c +++ b/src/notification_proxy.c | |||
| @@ -86,7 +86,7 @@ static np_error_t np_error(property_list_service_error_t err) | |||
| 86 | return NP_E_UNKNOWN_ERROR; | 86 | return NP_E_UNKNOWN_ERROR; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t service, np_client_t *client) | 89 | LIBIMOBILEDEVICE_API np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t service, np_client_t *client) |
| 90 | { | 90 | { |
| 91 | property_list_service_client_t plistclient = NULL; | 91 | property_list_service_client_t plistclient = NULL; |
| 92 | np_error_t err = np_error(property_list_service_client_new(device, service, &plistclient)); | 92 | np_error_t err = np_error(property_list_service_client_new(device, service, &plistclient)); |
| @@ -104,14 +104,14 @@ np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t servic | |||
| 104 | return NP_E_SUCCESS; | 104 | return NP_E_SUCCESS; |
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | np_error_t np_client_start_service(idevice_t device, np_client_t* client, const char* label) | 107 | LIBIMOBILEDEVICE_API np_error_t np_client_start_service(idevice_t device, np_client_t* client, const char* label) |
| 108 | { | 108 | { |
| 109 | np_error_t err = NP_E_UNKNOWN_ERROR; | 109 | np_error_t err = NP_E_UNKNOWN_ERROR; |
| 110 | service_client_factory_start_service(device, NP_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(np_client_new), &err); | 110 | service_client_factory_start_service(device, NP_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(np_client_new), &err); |
| 111 | return err; | 111 | return err; |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | np_error_t np_client_free(np_client_t client) | 114 | LIBIMOBILEDEVICE_API np_error_t np_client_free(np_client_t client) |
| 115 | { | 115 | { |
| 116 | if (!client) | 116 | if (!client) |
| 117 | return NP_E_INVALID_ARG; | 117 | return NP_E_INVALID_ARG; |
| @@ -128,7 +128,7 @@ np_error_t np_client_free(np_client_t client) | |||
| 128 | return NP_E_SUCCESS; | 128 | return NP_E_SUCCESS; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | np_error_t np_post_notification(np_client_t client, const char *notification) | 131 | LIBIMOBILEDEVICE_API np_error_t np_post_notification(np_client_t client, const char *notification) |
| 132 | { | 132 | { |
| 133 | if (!client || !notification) { | 133 | if (!client || !notification) { |
| 134 | return NP_E_INVALID_ARG; | 134 | return NP_E_INVALID_ARG; |
| @@ -179,7 +179,7 @@ np_error_t np_post_notification(np_client_t client, const char *notification) | |||
| 179 | return res; | 179 | return res; |
| 180 | } | 180 | } |
| 181 | 181 | ||
| 182 | np_error_t np_observe_notification( np_client_t client, const char *notification ) | 182 | LIBIMOBILEDEVICE_API np_error_t np_observe_notification( np_client_t client, const char *notification ) |
| 183 | { | 183 | { |
| 184 | if (!client || !notification) { | 184 | if (!client || !notification) { |
| 185 | return NP_E_INVALID_ARG; | 185 | return NP_E_INVALID_ARG; |
| @@ -200,7 +200,7 @@ np_error_t np_observe_notification( np_client_t client, const char *notification | |||
| 200 | return res; | 200 | return res; |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | np_error_t np_observe_notifications(np_client_t client, const char **notification_spec) | 203 | LIBIMOBILEDEVICE_API np_error_t np_observe_notifications(np_client_t client, const char **notification_spec) |
| 204 | { | 204 | { |
| 205 | int i = 0; | 205 | int i = 0; |
| 206 | np_error_t res = NP_E_UNKNOWN_ERROR; | 206 | np_error_t res = NP_E_UNKNOWN_ERROR; |
| @@ -329,7 +329,7 @@ void* np_notifier( void* arg ) | |||
| 329 | return NULL; | 329 | return NULL; |
| 330 | } | 330 | } |
| 331 | 331 | ||
| 332 | np_error_t np_set_notify_callback( np_client_t client, np_notify_cb_t notify_cb, void *user_data ) | 332 | LIBIMOBILEDEVICE_API np_error_t np_set_notify_callback( np_client_t client, np_notify_cb_t notify_cb, void *user_data ) |
| 333 | { | 333 | { |
| 334 | if (!client) | 334 | if (!client) |
| 335 | return NP_E_INVALID_ARG; | 335 | return NP_E_INVALID_ARG; |
diff --git a/src/property_list_service.c b/src/property_list_service.c index c260d3e..931c1ef 100644 --- a/src/property_list_service.c +++ b/src/property_list_service.c | |||
| @@ -54,7 +54,7 @@ static property_list_service_error_t service_to_property_list_service_error(serv | |||
| 54 | return PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR; | 54 | return PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR; |
| 55 | } | 55 | } |
| 56 | 56 | ||
| 57 | property_list_service_error_t property_list_service_client_new(idevice_t device, lockdownd_service_descriptor_t service, property_list_service_client_t *client) | 57 | 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) |
| 58 | { | 58 | { |
| 59 | if (!device || !service || service->port == 0 || !client || *client) | 59 | if (!device || !service || service->port == 0 || !client || *client) |
| 60 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; | 60 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; |
| @@ -74,7 +74,7 @@ property_list_service_error_t property_list_service_client_new(idevice_t device, | |||
| 74 | return PROPERTY_LIST_SERVICE_E_SUCCESS; | 74 | return PROPERTY_LIST_SERVICE_E_SUCCESS; |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | property_list_service_error_t property_list_service_client_free(property_list_service_client_t client) | 77 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_client_free(property_list_service_client_t client) |
| 78 | { | 78 | { |
| 79 | if (!client) | 79 | if (!client) |
| 80 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; | 80 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; |
| @@ -147,12 +147,12 @@ static property_list_service_error_t internal_plist_send(property_list_service_c | |||
| 147 | return res; | 147 | return res; |
| 148 | } | 148 | } |
| 149 | 149 | ||
| 150 | property_list_service_error_t property_list_service_send_xml_plist(property_list_service_client_t client, plist_t plist) | 150 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_send_xml_plist(property_list_service_client_t client, plist_t plist) |
| 151 | { | 151 | { |
| 152 | return internal_plist_send(client, plist, 0); | 152 | return internal_plist_send(client, plist, 0); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | property_list_service_error_t property_list_service_send_binary_plist(property_list_service_client_t client, plist_t plist) | 155 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_send_binary_plist(property_list_service_client_t client, plist_t plist) |
| 156 | { | 156 | { |
| 157 | return internal_plist_send(client, plist, 1); | 157 | return internal_plist_send(client, plist, 1); |
| 158 | } | 158 | } |
| @@ -250,24 +250,24 @@ static property_list_service_error_t internal_plist_receive_timeout(property_lis | |||
| 250 | return res; | 250 | return res; |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | property_list_service_error_t property_list_service_receive_plist_with_timeout(property_list_service_client_t client, plist_t *plist, unsigned int timeout) | 253 | 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) |
| 254 | { | 254 | { |
| 255 | return internal_plist_receive_timeout(client, plist, timeout); | 255 | return internal_plist_receive_timeout(client, plist, timeout); |
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | property_list_service_error_t property_list_service_receive_plist(property_list_service_client_t client, plist_t *plist) | 258 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_receive_plist(property_list_service_client_t client, plist_t *plist) |
| 259 | { | 259 | { |
| 260 | return internal_plist_receive_timeout(client, plist, 10000); | 260 | return internal_plist_receive_timeout(client, plist, 10000); |
| 261 | } | 261 | } |
| 262 | 262 | ||
| 263 | property_list_service_error_t property_list_service_enable_ssl(property_list_service_client_t client) | 263 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_enable_ssl(property_list_service_client_t client) |
| 264 | { | 264 | { |
| 265 | if (!client || !client->parent) | 265 | if (!client || !client->parent) |
| 266 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; | 266 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; |
| 267 | return service_to_property_list_service_error(service_enable_ssl(client->parent)); | 267 | return service_to_property_list_service_error(service_enable_ssl(client->parent)); |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | property_list_service_error_t property_list_service_disable_ssl(property_list_service_client_t client) | 270 | LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_disable_ssl(property_list_service_client_t client) |
| 271 | { | 271 | { |
| 272 | if (!client || !client->parent) | 272 | if (!client || !client->parent) |
| 273 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; | 273 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; |
diff --git a/src/restore.c b/src/restore.c index 2a025e8..3f6be8f 100644 --- a/src/restore.c +++ b/src/restore.c | |||
| @@ -89,7 +89,7 @@ static void plist_dict_add_label(plist_t plist, const char *label) | |||
| 89 | } | 89 | } |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | restored_error_t restored_client_free(restored_client_t client) | 92 | LIBIMOBILEDEVICE_API restored_error_t restored_client_free(restored_client_t client) |
| 93 | { | 93 | { |
| 94 | if (!client) | 94 | if (!client) |
| 95 | return RESTORE_E_INVALID_ARG; | 95 | return RESTORE_E_INVALID_ARG; |
| @@ -119,7 +119,7 @@ restored_error_t restored_client_free(restored_client_t client) | |||
| 119 | return ret; | 119 | return ret; |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | void restored_client_set_label(restored_client_t client, const char *label) | 122 | LIBIMOBILEDEVICE_API void restored_client_set_label(restored_client_t client, const char *label) |
| 123 | { | 123 | { |
| 124 | if (client) { | 124 | if (client) { |
| 125 | if (client->label) | 125 | if (client->label) |
| @@ -129,7 +129,7 @@ void restored_client_set_label(restored_client_t client, const char *label) | |||
| 129 | } | 129 | } |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | restored_error_t restored_receive(restored_client_t client, plist_t *plist) | 132 | LIBIMOBILEDEVICE_API restored_error_t restored_receive(restored_client_t client, plist_t *plist) |
| 133 | { | 133 | { |
| 134 | if (!client || !plist || (plist && *plist)) | 134 | if (!client || !plist || (plist && *plist)) |
| 135 | return RESTORE_E_INVALID_ARG; | 135 | return RESTORE_E_INVALID_ARG; |
| @@ -148,7 +148,7 @@ restored_error_t restored_receive(restored_client_t client, plist_t *plist) | |||
| 148 | return ret; | 148 | return ret; |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | restored_error_t restored_send(restored_client_t client, plist_t plist) | 151 | LIBIMOBILEDEVICE_API restored_error_t restored_send(restored_client_t client, plist_t plist) |
| 152 | { | 152 | { |
| 153 | if (!client || !plist) | 153 | if (!client || !plist) |
| 154 | return RESTORE_E_INVALID_ARG; | 154 | return RESTORE_E_INVALID_ARG; |
| @@ -163,7 +163,7 @@ restored_error_t restored_send(restored_client_t client, plist_t plist) | |||
| 163 | return ret; | 163 | return ret; |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | restored_error_t restored_query_type(restored_client_t client, char **type, uint64_t *version) | 166 | LIBIMOBILEDEVICE_API restored_error_t restored_query_type(restored_client_t client, char **type, uint64_t *version) |
| 167 | { | 167 | { |
| 168 | if (!client) | 168 | if (!client) |
| 169 | return RESTORE_E_INVALID_ARG; | 169 | return RESTORE_E_INVALID_ARG; |
| @@ -222,7 +222,7 @@ restored_error_t restored_query_type(restored_client_t client, char **type, uint | |||
| 222 | return ret; | 222 | return ret; |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | restored_error_t restored_query_value(restored_client_t client, const char *key, plist_t *value) | 225 | LIBIMOBILEDEVICE_API restored_error_t restored_query_value(restored_client_t client, const char *key, plist_t *value) |
| 226 | { | 226 | { |
| 227 | if (!client || !key) | 227 | if (!client || !key) |
| 228 | return RESTORE_E_INVALID_ARG; | 228 | return RESTORE_E_INVALID_ARG; |
| @@ -264,7 +264,7 @@ restored_error_t restored_query_value(restored_client_t client, const char *key, | |||
| 264 | return ret; | 264 | return ret; |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | restored_error_t restored_get_value(restored_client_t client, const char *key, plist_t *value) | 267 | LIBIMOBILEDEVICE_API restored_error_t restored_get_value(restored_client_t client, const char *key, plist_t *value) |
| 268 | { | 268 | { |
| 269 | if (!client || !value || (value && *value)) | 269 | if (!client || !value || (value && *value)) |
| 270 | return RESTORE_E_INVALID_ARG; | 270 | return RESTORE_E_INVALID_ARG; |
| @@ -291,7 +291,7 @@ restored_error_t restored_get_value(restored_client_t client, const char *key, p | |||
| 291 | return ret; | 291 | return ret; |
| 292 | } | 292 | } |
| 293 | 293 | ||
| 294 | restored_error_t restored_client_new(idevice_t device, restored_client_t *client, const char *label) | 294 | LIBIMOBILEDEVICE_API 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; |
| @@ -332,7 +332,7 @@ restored_error_t restored_client_new(idevice_t device, restored_client_t *client | |||
| 332 | return ret; | 332 | return ret; |
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | restored_error_t restored_goodbye(restored_client_t client) | 335 | LIBIMOBILEDEVICE_API restored_error_t restored_goodbye(restored_client_t client) |
| 336 | { | 336 | { |
| 337 | if (!client) | 337 | if (!client) |
| 338 | return RESTORE_E_INVALID_ARG; | 338 | return RESTORE_E_INVALID_ARG; |
| @@ -364,7 +364,7 @@ restored_error_t restored_goodbye(restored_client_t client) | |||
| 364 | return ret; | 364 | return ret; |
| 365 | } | 365 | } |
| 366 | 366 | ||
| 367 | restored_error_t restored_start_restore(restored_client_t client, plist_t options, uint64_t version) | 367 | LIBIMOBILEDEVICE_API restored_error_t restored_start_restore(restored_client_t client, plist_t options, uint64_t version) |
| 368 | { | 368 | { |
| 369 | if (!client) | 369 | if (!client) |
| 370 | return RESTORE_E_INVALID_ARG; | 370 | return RESTORE_E_INVALID_ARG; |
| @@ -388,7 +388,7 @@ restored_error_t restored_start_restore(restored_client_t client, plist_t option | |||
| 388 | return ret; | 388 | return ret; |
| 389 | } | 389 | } |
| 390 | 390 | ||
| 391 | restored_error_t restored_reboot(restored_client_t client) | 391 | LIBIMOBILEDEVICE_API restored_error_t restored_reboot(restored_client_t client) |
| 392 | { | 392 | { |
| 393 | if (!client) | 393 | if (!client) |
| 394 | return RESTORE_E_INVALID_ARG; | 394 | return RESTORE_E_INVALID_ARG; |
| @@ -419,4 +419,3 @@ restored_error_t restored_reboot(restored_client_t client) | |||
| 419 | dict = NULL; | 419 | dict = NULL; |
| 420 | return ret; | 420 | return ret; |
| 421 | } | 421 | } |
| 422 | |||
diff --git a/src/sbservices.c b/src/sbservices.c index ea12e35..20f0b5f 100644 --- a/src/sbservices.c +++ b/src/sbservices.c | |||
| @@ -76,7 +76,7 @@ static sbservices_error_t sbservices_error(property_list_service_error_t err) | |||
| 76 | return SBSERVICES_E_UNKNOWN_ERROR; | 76 | return SBSERVICES_E_UNKNOWN_ERROR; |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_descriptor_t service, sbservices_client_t *client) | 79 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_descriptor_t service, sbservices_client_t *client) |
| 80 | { | 80 | { |
| 81 | property_list_service_client_t plistclient = NULL; | 81 | property_list_service_client_t plistclient = NULL; |
| 82 | sbservices_error_t err = sbservices_error(property_list_service_client_new(device, service, &plistclient)); | 82 | sbservices_error_t err = sbservices_error(property_list_service_client_new(device, service, &plistclient)); |
| @@ -92,14 +92,14 @@ sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_des | |||
| 92 | return SBSERVICES_E_SUCCESS; | 92 | return SBSERVICES_E_SUCCESS; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_client_t * client, const char* label) | 95 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_client_t * client, const char* label) |
| 96 | { | 96 | { |
| 97 | sbservices_error_t err = SBSERVICES_E_UNKNOWN_ERROR; | 97 | sbservices_error_t err = SBSERVICES_E_UNKNOWN_ERROR; |
| 98 | service_client_factory_start_service(device, SBSERVICES_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(sbservices_client_new), &err); | 98 | service_client_factory_start_service(device, SBSERVICES_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(sbservices_client_new), &err); |
| 99 | return err; | 99 | return err; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | sbservices_error_t sbservices_client_free(sbservices_client_t client) | 102 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_client_free(sbservices_client_t client) |
| 103 | { | 103 | { |
| 104 | if (!client) | 104 | if (!client) |
| 105 | return SBSERVICES_E_INVALID_ARG; | 105 | return SBSERVICES_E_INVALID_ARG; |
| @@ -112,7 +112,7 @@ sbservices_error_t sbservices_client_free(sbservices_client_t client) | |||
| 112 | return err; | 112 | return err; |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version) | 115 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version) |
| 116 | { | 116 | { |
| 117 | if (!client || !client->parent || !state) | 117 | if (!client || !client->parent || !state) |
| 118 | return SBSERVICES_E_INVALID_ARG; | 118 | return SBSERVICES_E_INVALID_ARG; |
| @@ -152,7 +152,7 @@ leave_unlock: | |||
| 152 | return res; | 152 | return res; |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate) | 155 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate) |
| 156 | { | 156 | { |
| 157 | if (!client || !client->parent || !newstate) | 157 | if (!client || !client->parent || !newstate) |
| 158 | return SBSERVICES_E_INVALID_ARG; | 158 | return SBSERVICES_E_INVALID_ARG; |
| @@ -178,7 +178,7 @@ sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t | |||
| 178 | return res; | 178 | return res; |
| 179 | } | 179 | } |
| 180 | 180 | ||
| 181 | sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize) | 181 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize) |
| 182 | { | 182 | { |
| 183 | if (!client || !client->parent || !bundleId || !pngdata) | 183 | if (!client || !client->parent || !bundleId || !pngdata) |
| 184 | return SBSERVICES_E_INVALID_ARG; | 184 | return SBSERVICES_E_INVALID_ARG; |
| @@ -215,7 +215,7 @@ leave_unlock: | |||
| 215 | return res; | 215 | return res; |
| 216 | } | 216 | } |
| 217 | 217 | ||
| 218 | sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t client, sbservices_interface_orientation_t* interface_orientation) | 218 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_interface_orientation(sbservices_client_t client, sbservices_interface_orientation_t* interface_orientation) |
| 219 | { | 219 | { |
| 220 | if (!client || !client->parent || !interface_orientation) | 220 | if (!client || !client->parent || !interface_orientation) |
| 221 | return SBSERVICES_E_INVALID_ARG; | 221 | return SBSERVICES_E_INVALID_ARG; |
| @@ -253,7 +253,7 @@ leave_unlock: | |||
| 253 | return res; | 253 | return res; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | sbservices_error_t sbservices_get_home_screen_wallpaper_pngdata(sbservices_client_t client, char **pngdata, uint64_t *pngsize) | 256 | LIBIMOBILEDEVICE_API sbservices_error_t sbservices_get_home_screen_wallpaper_pngdata(sbservices_client_t client, char **pngdata, uint64_t *pngsize) |
| 257 | { | 257 | { |
| 258 | if (!client || !client->parent || !pngdata) | 258 | if (!client || !client->parent || !pngdata) |
| 259 | return SBSERVICES_E_INVALID_ARG; | 259 | return SBSERVICES_E_INVALID_ARG; |
diff --git a/src/screenshotr.c b/src/screenshotr.c index e92fe9f..eed271e 100644 --- a/src/screenshotr.c +++ b/src/screenshotr.c | |||
| @@ -58,7 +58,7 @@ static screenshotr_error_t screenshotr_error(device_link_service_error_t err) | |||
| 58 | return SCREENSHOTR_E_UNKNOWN_ERROR; | 58 | return SCREENSHOTR_E_UNKNOWN_ERROR; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_descriptor_t service, | 61 | LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_descriptor_t service, |
| 62 | screenshotr_client_t * client) | 62 | screenshotr_client_t * client) |
| 63 | { | 63 | { |
| 64 | if (!device || !service || service->port == 0 || !client || *client) | 64 | if (!device || !service || service->port == 0 || !client || *client) |
| @@ -86,14 +86,14 @@ screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_d | |||
| 86 | return ret; | 86 | return ret; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | screenshotr_error_t screenshotr_client_start_service(idevice_t device, screenshotr_client_t * client, const char* label) | 89 | LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_start_service(idevice_t device, screenshotr_client_t * client, const char* label) |
| 90 | { | 90 | { |
| 91 | screenshotr_error_t err = SCREENSHOTR_E_UNKNOWN_ERROR; | 91 | screenshotr_error_t err = SCREENSHOTR_E_UNKNOWN_ERROR; |
| 92 | service_client_factory_start_service(device, SCREENSHOTR_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(screenshotr_client_new), &err); | 92 | service_client_factory_start_service(device, SCREENSHOTR_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(screenshotr_client_new), &err); |
| 93 | return err; | 93 | return err; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | screenshotr_error_t screenshotr_client_free(screenshotr_client_t client) | 96 | LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_client_free(screenshotr_client_t client) |
| 97 | { | 97 | { |
| 98 | if (!client) | 98 | if (!client) |
| 99 | return SCREENSHOTR_E_INVALID_ARG; | 99 | return SCREENSHOTR_E_INVALID_ARG; |
| @@ -103,7 +103,7 @@ screenshotr_error_t screenshotr_client_free(screenshotr_client_t client) | |||
| 103 | return err; | 103 | return err; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize) | 106 | LIBIMOBILEDEVICE_API screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize) |
| 107 | { | 107 | { |
| 108 | if (!client || !client->parent || !imgdata) | 108 | if (!client || !client->parent || !imgdata) |
| 109 | return SCREENSHOTR_E_INVALID_ARG; | 109 | return SCREENSHOTR_E_INVALID_ARG; |
diff --git a/src/service.c b/src/service.c index 701c8b4..c4743dc 100644 --- a/src/service.c +++ b/src/service.c | |||
| @@ -52,7 +52,7 @@ static service_error_t idevice_to_service_error(idevice_error_t err) | |||
| 52 | return SERVICE_E_UNKNOWN_ERROR; | 52 | return SERVICE_E_UNKNOWN_ERROR; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | service_error_t service_client_new(idevice_t device, lockdownd_service_descriptor_t service, service_client_t *client) | 55 | LIBIMOBILEDEVICE_API service_error_t service_client_new(idevice_t device, lockdownd_service_descriptor_t service, service_client_t *client) |
| 56 | { | 56 | { |
| 57 | if (!device || !service || service->port == 0 || !client || *client) | 57 | if (!device || !service || service->port == 0 || !client || *client) |
| 58 | return SERVICE_E_INVALID_ARG; | 58 | return SERVICE_E_INVALID_ARG; |
| @@ -76,7 +76,7 @@ service_error_t service_client_new(idevice_t device, lockdownd_service_descripto | |||
| 76 | return SERVICE_E_SUCCESS; | 76 | return SERVICE_E_SUCCESS; |
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, int16_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), int16_t *error_code) | 79 | LIBIMOBILEDEVICE_API service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, int16_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), int16_t *error_code) |
| 80 | { | 80 | { |
| 81 | *client = NULL; | 81 | *client = NULL; |
| 82 | 82 | ||
| @@ -115,7 +115,7 @@ service_error_t service_client_factory_start_service(idevice_t device, const cha | |||
| 115 | return (ec == SERVICE_E_SUCCESS) ? SERVICE_E_SUCCESS : SERVICE_E_START_SERVICE_ERROR; | 115 | return (ec == SERVICE_E_SUCCESS) ? SERVICE_E_SUCCESS : SERVICE_E_START_SERVICE_ERROR; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | service_error_t service_client_free(service_client_t client) | 118 | LIBIMOBILEDEVICE_API service_error_t service_client_free(service_client_t client) |
| 119 | { | 119 | { |
| 120 | if (!client) | 120 | if (!client) |
| 121 | return SERVICE_E_INVALID_ARG; | 121 | return SERVICE_E_INVALID_ARG; |
| @@ -128,7 +128,7 @@ service_error_t service_client_free(service_client_t client) | |||
| 128 | return err; | 128 | return err; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | service_error_t service_send(service_client_t client, const char* data, uint32_t size, uint32_t *sent) | 131 | LIBIMOBILEDEVICE_API service_error_t service_send(service_client_t client, const char* data, uint32_t size, uint32_t *sent) |
| 132 | { | 132 | { |
| 133 | service_error_t res = SERVICE_E_UNKNOWN_ERROR; | 133 | service_error_t res = SERVICE_E_UNKNOWN_ERROR; |
| 134 | int bytes = 0; | 134 | int bytes = 0; |
| @@ -149,7 +149,7 @@ service_error_t service_send(service_client_t client, const char* data, uint32_t | |||
| 149 | return res; | 149 | return res; |
| 150 | } | 150 | } |
| 151 | 151 | ||
| 152 | service_error_t service_receive_with_timeout(service_client_t client, char* data, uint32_t size, uint32_t *received, unsigned int timeout) | 152 | LIBIMOBILEDEVICE_API service_error_t service_receive_with_timeout(service_client_t client, char* data, uint32_t size, uint32_t *received, unsigned int timeout) |
| 153 | { | 153 | { |
| 154 | service_error_t res = SERVICE_E_UNKNOWN_ERROR; | 154 | service_error_t res = SERVICE_E_UNKNOWN_ERROR; |
| 155 | int bytes = 0; | 155 | int bytes = 0; |
| @@ -169,19 +169,19 @@ service_error_t service_receive_with_timeout(service_client_t client, char* data | |||
| 169 | return res; | 169 | return res; |
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | service_error_t service_receive(service_client_t client, char* data, uint32_t size, uint32_t *received) | 172 | LIBIMOBILEDEVICE_API service_error_t service_receive(service_client_t client, char* data, uint32_t size, uint32_t *received) |
| 173 | { | 173 | { |
| 174 | return service_receive_with_timeout(client, data, size, received, 10000); | 174 | return service_receive_with_timeout(client, data, size, received, 10000); |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | service_error_t service_enable_ssl(service_client_t client) | 177 | LIBIMOBILEDEVICE_API service_error_t service_enable_ssl(service_client_t client) |
| 178 | { | 178 | { |
| 179 | if (!client || !client->connection) | 179 | if (!client || !client->connection) |
| 180 | return SERVICE_E_INVALID_ARG; | 180 | return SERVICE_E_INVALID_ARG; |
| 181 | return idevice_to_service_error(idevice_connection_enable_ssl(client->connection)); | 181 | return idevice_to_service_error(idevice_connection_enable_ssl(client->connection)); |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | service_error_t service_disable_ssl(service_client_t client) | 184 | LIBIMOBILEDEVICE_API service_error_t service_disable_ssl(service_client_t client) |
| 185 | { | 185 | { |
| 186 | if (!client || !client->connection) | 186 | if (!client || !client->connection) |
| 187 | return SERVICE_E_INVALID_ARG; | 187 | return SERVICE_E_INVALID_ARG; |
diff --git a/src/syslog_relay.c b/src/syslog_relay.c index a636e6e..63e7d34 100644 --- a/src/syslog_relay.c +++ b/src/syslog_relay.c | |||
| @@ -61,7 +61,7 @@ static syslog_relay_error_t syslog_relay_error(service_error_t err) | |||
| 61 | return SYSLOG_RELAY_E_UNKNOWN_ERROR; | 61 | return SYSLOG_RELAY_E_UNKNOWN_ERROR; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | syslog_relay_error_t syslog_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, syslog_relay_client_t * client) | 64 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, syslog_relay_client_t * client) |
| 65 | { | 65 | { |
| 66 | *client = NULL; | 66 | *client = NULL; |
| 67 | 67 | ||
| @@ -89,14 +89,14 @@ syslog_relay_error_t syslog_relay_client_new(idevice_t device, lockdownd_service | |||
| 89 | return 0; | 89 | return 0; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | syslog_relay_error_t syslog_relay_client_start_service(idevice_t device, syslog_relay_client_t * client, const char* label) | 92 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_start_service(idevice_t device, syslog_relay_client_t * client, const char* label) |
| 93 | { | 93 | { |
| 94 | syslog_relay_error_t err = SYSLOG_RELAY_E_UNKNOWN_ERROR; | 94 | syslog_relay_error_t err = SYSLOG_RELAY_E_UNKNOWN_ERROR; |
| 95 | service_client_factory_start_service(device, SYSLOG_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(syslog_relay_client_new), &err); | 95 | service_client_factory_start_service(device, SYSLOG_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(syslog_relay_client_new), &err); |
| 96 | return err; | 96 | return err; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client) | 99 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client) |
| 100 | { | 100 | { |
| 101 | if (!client) | 101 | if (!client) |
| 102 | return SYSLOG_RELAY_E_INVALID_ARG; | 102 | return SYSLOG_RELAY_E_INVALID_ARG; |
| @@ -112,12 +112,12 @@ syslog_relay_error_t syslog_relay_client_free(syslog_relay_client_t client) | |||
| 112 | return err; | 112 | return err; |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | syslog_relay_error_t syslog_relay_receive(syslog_relay_client_t client, char* data, uint32_t size, uint32_t *received) | 115 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_receive(syslog_relay_client_t client, char* data, uint32_t size, uint32_t *received) |
| 116 | { | 116 | { |
| 117 | return syslog_relay_receive_with_timeout(client, data, size, received, 1000); | 117 | return syslog_relay_receive_with_timeout(client, data, size, received, 1000); |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | 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) | 120 | 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 | { | 121 | { |
| 122 | syslog_relay_error_t res = SYSLOG_RELAY_E_UNKNOWN_ERROR; | 122 | syslog_relay_error_t res = SYSLOG_RELAY_E_UNKNOWN_ERROR; |
| 123 | int bytes = 0; | 123 | int bytes = 0; |
| @@ -171,7 +171,7 @@ void *syslog_relay_worker(void *arg) | |||
| 171 | return NULL; | 171 | return NULL; |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data) | 174 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, syslog_relay_receive_cb_t callback, void* user_data) |
| 175 | { | 175 | { |
| 176 | if (!client || !callback) | 176 | if (!client || !callback) |
| 177 | return SYSLOG_RELAY_E_INVALID_ARG; | 177 | return SYSLOG_RELAY_E_INVALID_ARG; |
| @@ -198,7 +198,7 @@ syslog_relay_error_t syslog_relay_start_capture(syslog_relay_client_t client, sy | |||
| 198 | return res; | 198 | return res; |
| 199 | } | 199 | } |
| 200 | 200 | ||
| 201 | syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client) | 201 | LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_stop_capture(syslog_relay_client_t client) |
| 202 | { | 202 | { |
| 203 | if (client->worker) { | 203 | if (client->worker) { |
| 204 | /* notify thread to finish */ | 204 | /* notify thread to finish */ |
diff --git a/src/webinspector.c b/src/webinspector.c index 31c5b2c..de30cd1 100644 --- a/src/webinspector.c +++ b/src/webinspector.c | |||
| @@ -58,7 +58,7 @@ static webinspector_error_t webinspector_error(property_list_service_error_t err | |||
| 58 | return WEBINSPECTOR_E_UNKNOWN_ERROR; | 58 | return WEBINSPECTOR_E_UNKNOWN_ERROR; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service_descriptor_t service, webinspector_client_t * client) | 61 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service_descriptor_t service, webinspector_client_t * client) |
| 62 | { | 62 | { |
| 63 | *client = NULL; | 63 | *client = NULL; |
| 64 | 64 | ||
| @@ -85,14 +85,14 @@ webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service | |||
| 85 | return 0; | 85 | return 0; |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client, const char* label) | 88 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client, const char* label) |
| 89 | { | 89 | { |
| 90 | webinspector_error_t err = WEBINSPECTOR_E_UNKNOWN_ERROR; | 90 | webinspector_error_t err = WEBINSPECTOR_E_UNKNOWN_ERROR; |
| 91 | service_client_factory_start_service(device, WEBINSPECTOR_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(webinspector_client_new), &err); | 91 | service_client_factory_start_service(device, WEBINSPECTOR_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(webinspector_client_new), &err); |
| 92 | return err; | 92 | return err; |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | webinspector_error_t webinspector_client_free(webinspector_client_t client) | 95 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_client_free(webinspector_client_t client) |
| 96 | { | 96 | { |
| 97 | if (!client) | 97 | if (!client) |
| 98 | return WEBINSPECTOR_E_INVALID_ARG; | 98 | return WEBINSPECTOR_E_INVALID_ARG; |
| @@ -103,7 +103,7 @@ webinspector_error_t webinspector_client_free(webinspector_client_t client) | |||
| 103 | return err; | 103 | return err; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | webinspector_error_t webinspector_send(webinspector_client_t client, plist_t plist) | 106 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_send(webinspector_client_t client, plist_t plist) |
| 107 | { | 107 | { |
| 108 | webinspector_error_t res = WEBINSPECTOR_E_UNKNOWN_ERROR; | 108 | webinspector_error_t res = WEBINSPECTOR_E_UNKNOWN_ERROR; |
| 109 | 109 | ||
| @@ -160,12 +160,12 @@ webinspector_error_t webinspector_send(webinspector_client_t client, plist_t pli | |||
| 160 | return res; | 160 | return res; |
| 161 | } | 161 | } |
| 162 | 162 | ||
| 163 | webinspector_error_t webinspector_receive(webinspector_client_t client, plist_t * plist) | 163 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_receive(webinspector_client_t client, plist_t * plist) |
| 164 | { | 164 | { |
| 165 | return webinspector_receive_with_timeout(client, plist, 5000); | 165 | return webinspector_receive_with_timeout(client, plist, 5000); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | webinspector_error_t webinspector_receive_with_timeout(webinspector_client_t client, plist_t * plist, uint32_t timeout_ms) | 168 | LIBIMOBILEDEVICE_API webinspector_error_t webinspector_receive_with_timeout(webinspector_client_t client, plist_t * plist, uint32_t timeout_ms) |
| 169 | { | 169 | { |
| 170 | webinspector_error_t res = WEBINSPECTOR_E_UNKNOWN_ERROR; | 170 | webinspector_error_t res = WEBINSPECTOR_E_UNKNOWN_ERROR; |
| 171 | plist_t message = NULL; | 171 | plist_t message = NULL; |
