summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/libimobiledevice/afc.h67
-rw-r--r--include/libimobiledevice/debugserver.h21
-rw-r--r--include/libimobiledevice/diagnostics_relay.h22
-rw-r--r--include/libimobiledevice/file_relay.h26
-rw-r--r--include/libimobiledevice/heartbeat.h21
-rw-r--r--include/libimobiledevice/house_arrest.h22
-rw-r--r--include/libimobiledevice/installation_proxy.h26
-rw-r--r--include/libimobiledevice/libimobiledevice.h23
-rw-r--r--include/libimobiledevice/lockdown.h54
-rw-r--r--include/libimobiledevice/misagent.h22
-rw-r--r--include/libimobiledevice/mobile_image_mounter.h22
-rw-r--r--include/libimobiledevice/mobilebackup.h25
-rw-r--r--include/libimobiledevice/mobilebackup2.h26
-rw-r--r--include/libimobiledevice/mobilesync.h30
-rw-r--r--include/libimobiledevice/notification_proxy.h20
-rw-r--r--include/libimobiledevice/property_list_service.h21
-rw-r--r--include/libimobiledevice/restore.h29
-rw-r--r--include/libimobiledevice/sbservices.h20
-rw-r--r--include/libimobiledevice/screenshotr.h22
-rw-r--r--include/libimobiledevice/service.h25
-rw-r--r--include/libimobiledevice/syslog_relay.h19
-rw-r--r--include/libimobiledevice/webinspector.h21
-rw-r--r--src/diagnostics_relay.c2
-rw-r--r--src/lockdown.c8
-rw-r--r--src/restore.c8
-rw-r--r--src/service.c6
-rw-r--r--src/syslog_relay.c2
27 files changed, 267 insertions, 343 deletions
diff --git a/include/libimobiledevice/afc.h b/include/libimobiledevice/afc.h
index b045554..7637db5 100644
--- a/include/libimobiledevice/afc.h
+++ b/include/libimobiledevice/afc.h
@@ -33,41 +33,38 @@ extern "C" {
33 33
34#define AFC_SERVICE_NAME "com.apple.afc" 34#define AFC_SERVICE_NAME "com.apple.afc"
35 35
36/** @name Error Codes */ 36/** Error Codes */
37/*@{*/ 37typedef enum {
38#define AFC_E_SUCCESS 0 38 AFC_E_SUCCESS = 0,
39#define AFC_E_UNKNOWN_ERROR 1 39 AFC_E_UNKNOWN_ERROR = 1,
40#define AFC_E_OP_HEADER_INVALID 2 40 AFC_E_OP_HEADER_INVALID = 2,
41#define AFC_E_NO_RESOURCES 3 41 AFC_E_NO_RESOURCES = 3,
42#define AFC_E_READ_ERROR 4 42 AFC_E_READ_ERROR = 4,
43#define AFC_E_WRITE_ERROR 5 43 AFC_E_WRITE_ERROR = 5,
44#define AFC_E_UNKNOWN_PACKET_TYPE 6 44 AFC_E_UNKNOWN_PACKET_TYPE = 6,
45#define AFC_E_INVALID_ARG 7 45 AFC_E_INVALID_ARG = 7,
46#define AFC_E_OBJECT_NOT_FOUND 8 46 AFC_E_OBJECT_NOT_FOUND = 8,
47#define AFC_E_OBJECT_IS_DIR 9 47 AFC_E_OBJECT_IS_DIR = 9,
48#define AFC_E_PERM_DENIED 10 48 AFC_E_PERM_DENIED = 10,
49#define AFC_E_SERVICE_NOT_CONNECTED 11 49 AFC_E_SERVICE_NOT_CONNECTED = 11,
50#define AFC_E_OP_TIMEOUT 12 50 AFC_E_OP_TIMEOUT = 12,
51#define AFC_E_TOO_MUCH_DATA 13 51 AFC_E_TOO_MUCH_DATA = 13,
52#define AFC_E_END_OF_DATA 14 52 AFC_E_END_OF_DATA = 14,
53#define AFC_E_OP_NOT_SUPPORTED 15 53 AFC_E_OP_NOT_SUPPORTED = 15,
54#define AFC_E_OBJECT_EXISTS 16 54 AFC_E_OBJECT_EXISTS = 16,
55#define AFC_E_OBJECT_BUSY 17 55 AFC_E_OBJECT_BUSY = 17,
56#define AFC_E_NO_SPACE_LEFT 18 56 AFC_E_NO_SPACE_LEFT = 18,
57#define AFC_E_OP_WOULD_BLOCK 19 57 AFC_E_OP_WOULD_BLOCK = 19,
58#define AFC_E_IO_ERROR 20 58 AFC_E_IO_ERROR = 20,
59#define AFC_E_OP_INTERRUPTED 21 59 AFC_E_OP_INTERRUPTED = 21,
60#define AFC_E_OP_IN_PROGRESS 22 60 AFC_E_OP_IN_PROGRESS = 22,
61#define AFC_E_INTERNAL_ERROR 23 61 AFC_E_INTERNAL_ERROR = 23,
62 62 AFC_E_MUX_ERROR = 30,
63#define AFC_E_MUX_ERROR 30 63 AFC_E_NO_MEM = 31,
64#define AFC_E_NO_MEM 31 64 AFC_E_NOT_ENOUGH_DATA = 32,
65#define AFC_E_NOT_ENOUGH_DATA 32 65 AFC_E_DIR_NOT_EMPTY = 33,
66#define AFC_E_DIR_NOT_EMPTY 33 66 AFC_E_FORCE_SIGNED_TYPE = -1
67/*@}*/ 67} afc_error_t;
68
69/** Represents an error code. */
70typedef int16_t afc_error_t;
71 68
72/** Flags for afc_file_open */ 69/** Flags for afc_file_open */
73typedef enum { 70typedef enum {
diff --git a/include/libimobiledevice/debugserver.h b/include/libimobiledevice/debugserver.h
index aa62746..3b1969a 100644
--- a/include/libimobiledevice/debugserver.h
+++ b/include/libimobiledevice/debugserver.h
@@ -32,18 +32,15 @@ extern "C" {
32 32
33#define DEBUGSERVER_SERVICE_NAME "com.apple.debugserver" 33#define DEBUGSERVER_SERVICE_NAME "com.apple.debugserver"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define DEBUGSERVER_E_SUCCESS 0 37 DEBUGSERVER_E_SUCCESS = 0,
38#define DEBUGSERVER_E_INVALID_ARG -1 38 DEBUGSERVER_E_INVALID_ARG = -1,
39#define DEBUGSERVER_E_MUX_ERROR -2 39 DEBUGSERVER_E_MUX_ERROR = -2,
40#define DEBUGSERVER_E_SSL_ERROR -3 40 DEBUGSERVER_E_SSL_ERROR = -3,
41#define DEBUGSERVER_E_RESPONSE_ERROR -4 41 DEBUGSERVER_E_RESPONSE_ERROR = -4,
42#define DEBUGSERVER_E_UNKNOWN_ERROR -256 42 DEBUGSERVER_E_UNKNOWN_ERROR = -256
43/*@}*/ 43} debugserver_error_t;
44
45/** Represents an error code. */
46typedef int16_t debugserver_error_t;
47 44
48typedef struct debugserver_client_private debugserver_client_private; 45typedef struct debugserver_client_private debugserver_client_private;
49typedef debugserver_client_private *debugserver_client_t; /**< The client handle. */ 46typedef debugserver_client_private *debugserver_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/diagnostics_relay.h b/include/libimobiledevice/diagnostics_relay.h
index b25750b..5162657 100644
--- a/include/libimobiledevice/diagnostics_relay.h
+++ b/include/libimobiledevice/diagnostics_relay.h
@@ -32,16 +32,15 @@ extern "C" {
32 32
33#define DIAGNOSTICS_RELAY_SERVICE_NAME "com.apple.mobile.diagnostics_relay" 33#define DIAGNOSTICS_RELAY_SERVICE_NAME "com.apple.mobile.diagnostics_relay"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define DIAGNOSTICS_RELAY_E_SUCCESS 0 37 DIAGNOSTICS_RELAY_E_SUCCESS = 0,
38#define DIAGNOSTICS_RELAY_E_INVALID_ARG -1 38 DIAGNOSTICS_RELAY_E_INVALID_ARG = -1,
39#define DIAGNOSTICS_RELAY_E_PLIST_ERROR -2 39 DIAGNOSTICS_RELAY_E_PLIST_ERROR = -2,
40#define DIAGNOSTICS_RELAY_E_MUX_ERROR -3 40 DIAGNOSTICS_RELAY_E_MUX_ERROR = -3,
41#define DIAGNOSTICS_RELAY_E_UNKNOWN_REQUEST -4 41 DIAGNOSTICS_RELAY_E_UNKNOWN_REQUEST = -4,
42 42 DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR = -256
43#define DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR -256 43} diagnostics_relay_error_t;
44/*@}*/
45 44
46#define DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT (1 << 1) 45#define DIAGNOSTICS_RELAY_ACTION_FLAG_WAIT_FOR_DISCONNECT (1 << 1)
47#define DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS (1 << 2) 46#define DIAGNOSTICS_RELAY_ACTION_FLAG_DISPLAY_PASS (1 << 2)
@@ -52,9 +51,6 @@ extern "C" {
52#define DIAGNOSTICS_RELAY_REQUEST_TYPE_GAS_GAUGE "GasGauge" 51#define DIAGNOSTICS_RELAY_REQUEST_TYPE_GAS_GAUGE "GasGauge"
53#define DIAGNOSTICS_RELAY_REQUEST_TYPE_NAND "NAND" 52#define DIAGNOSTICS_RELAY_REQUEST_TYPE_NAND "NAND"
54 53
55/** Represents an error code. */
56typedef int16_t diagnostics_relay_error_t;
57
58typedef struct diagnostics_relay_client_private diagnostics_relay_client_private; 54typedef struct diagnostics_relay_client_private diagnostics_relay_client_private;
59typedef diagnostics_relay_client_private *diagnostics_relay_client_t; /**< The client handle. */ 55typedef diagnostics_relay_client_private *diagnostics_relay_client_t; /**< The client handle. */
60 56
diff --git a/include/libimobiledevice/file_relay.h b/include/libimobiledevice/file_relay.h
index 95aba6b..c0ab25c 100644
--- a/include/libimobiledevice/file_relay.h
+++ b/include/libimobiledevice/file_relay.h
@@ -32,21 +32,17 @@ extern "C" {
32 32
33#define FILE_RELAY_SERVICE_NAME "com.apple.mobile.file_relay" 33#define FILE_RELAY_SERVICE_NAME "com.apple.mobile.file_relay"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define FILE_RELAY_E_SUCCESS 0 37 FILE_RELAY_E_SUCCESS = 0,
38#define FILE_RELAY_E_INVALID_ARG -1 38 FILE_RELAY_E_INVALID_ARG = -1,
39#define FILE_RELAY_E_PLIST_ERROR -2 39 FILE_RELAY_E_PLIST_ERROR = -2,
40#define FILE_RELAY_E_MUX_ERROR -3 40 FILE_RELAY_E_MUX_ERROR = -3,
41#define FILE_RELAY_E_INVALID_SOURCE -4 41 FILE_RELAY_E_INVALID_SOURCE = -4,
42#define FILE_RELAY_E_STAGING_EMPTY -5 42 FILE_RELAY_E_STAGING_EMPTY = -5,
43#define FILE_RELAY_E_PERMISSION_DENIED -6 43 FILE_RELAY_E_PERMISSION_DENIED = -6,
44 44 FILE_RELAY_E_UNKNOWN_ERROR = -256
45#define FILE_RELAY_E_UNKNOWN_ERROR -256 45} file_relay_error_t;
46/*@}*/
47
48/** Represents an error code. */
49typedef int16_t file_relay_error_t;
50 46
51typedef struct file_relay_client_private file_relay_client_private; 47typedef struct file_relay_client_private file_relay_client_private;
52typedef file_relay_client_private *file_relay_client_t; /**< The client handle. */ 48typedef file_relay_client_private *file_relay_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/heartbeat.h b/include/libimobiledevice/heartbeat.h
index c943e51..7d8be39 100644
--- a/include/libimobiledevice/heartbeat.h
+++ b/include/libimobiledevice/heartbeat.h
@@ -32,18 +32,15 @@ extern "C" {
32 32
33#define HEARTBEAT_SERVICE_NAME "com.apple.mobile.heartbeat" 33#define HEARTBEAT_SERVICE_NAME "com.apple.mobile.heartbeat"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define HEARTBEAT_E_SUCCESS 0 37 HEARTBEAT_E_SUCCESS = 0,
38#define HEARTBEAT_E_INVALID_ARG -1 38 HEARTBEAT_E_INVALID_ARG = -1,
39#define HEARTBEAT_E_PLIST_ERROR -2 39 HEARTBEAT_E_PLIST_ERROR = -2,
40#define HEARTBEAT_E_MUX_ERROR -3 40 HEARTBEAT_E_MUX_ERROR = -3,
41#define HEARTBEAT_E_SSL_ERROR -4 41 HEARTBEAT_E_SSL_ERROR = -4,
42#define HEARTBEAT_E_UNKNOWN_ERROR -256 42 HEARTBEAT_E_UNKNOWN_ERROR = -256
43/*@}*/ 43} heartbeat_error_t;
44
45/** Represents an error code. */
46typedef int16_t heartbeat_error_t;
47 44
48typedef struct heartbeat_client_private heartbeat_client_private; 45typedef struct heartbeat_client_private heartbeat_client_private;
49typedef heartbeat_client_private *heartbeat_client_t; /**< The client handle. */ 46typedef heartbeat_client_private *heartbeat_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/house_arrest.h b/include/libimobiledevice/house_arrest.h
index 170cad2..9b7ff91 100644
--- a/include/libimobiledevice/house_arrest.h
+++ b/include/libimobiledevice/house_arrest.h
@@ -33,19 +33,15 @@ extern "C" {
33 33
34#define HOUSE_ARREST_SERVICE_NAME "com.apple.mobile.house_arrest" 34#define HOUSE_ARREST_SERVICE_NAME "com.apple.mobile.house_arrest"
35 35
36/** @name Error Codes */ 36/** Error Codes */
37/*@{*/ 37typedef enum {
38#define HOUSE_ARREST_E_SUCCESS 0 38 HOUSE_ARREST_E_SUCCESS = 0,
39#define HOUSE_ARREST_E_INVALID_ARG -1 39 HOUSE_ARREST_E_INVALID_ARG = -1,
40#define HOUSE_ARREST_E_PLIST_ERROR -2 40 HOUSE_ARREST_E_PLIST_ERROR = -2,
41#define HOUSE_ARREST_E_CONN_FAILED -3 41 HOUSE_ARREST_E_CONN_FAILED = -3,
42#define HOUSE_ARREST_E_INVALID_MODE -4 42 HOUSE_ARREST_E_INVALID_MODE = -4,
43 43 HOUSE_ARREST_E_UNKNOWN_ERROR = -256
44#define HOUSE_ARREST_E_UNKNOWN_ERROR -256 44} house_arrest_error_t;
45/*@}*/
46
47/** Represents an error code. */
48typedef int16_t house_arrest_error_t;
49 45
50typedef struct house_arrest_client_private house_arrest_client_private; 46typedef struct house_arrest_client_private house_arrest_client_private;
51typedef house_arrest_client_private *house_arrest_client_t; /**< The client handle. */ 47typedef house_arrest_client_private *house_arrest_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/installation_proxy.h b/include/libimobiledevice/installation_proxy.h
index 4740b20..f76ee68 100644
--- a/include/libimobiledevice/installation_proxy.h
+++ b/include/libimobiledevice/installation_proxy.h
@@ -32,21 +32,17 @@ extern "C" {
32 32
33#define INSTPROXY_SERVICE_NAME "com.apple.mobile.installation_proxy" 33#define INSTPROXY_SERVICE_NAME "com.apple.mobile.installation_proxy"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define INSTPROXY_E_SUCCESS 0 37 INSTPROXY_E_SUCCESS = 0,
38#define INSTPROXY_E_INVALID_ARG -1 38 INSTPROXY_E_INVALID_ARG = -1,
39#define INSTPROXY_E_PLIST_ERROR -2 39 INSTPROXY_E_PLIST_ERROR = -2,
40#define INSTPROXY_E_CONN_FAILED -3 40 INSTPROXY_E_CONN_FAILED = -3,
41#define INSTPROXY_E_OP_IN_PROGRESS -4 41 INSTPROXY_E_OP_IN_PROGRESS = -4,
42#define INSTPROXY_E_OP_FAILED -5 42 INSTPROXY_E_OP_FAILED = -5,
43#define INSTPROXY_E_RECEIVE_TIMEOUT -6 43 INSTPROXY_E_RECEIVE_TIMEOUT = -6,
44 44 INSTPROXY_E_UNKNOWN_ERROR = -256
45#define INSTPROXY_E_UNKNOWN_ERROR -256 45} instproxy_error_t;
46/*@}*/
47
48/** Represents an error code. */
49typedef int16_t instproxy_error_t;
50 46
51typedef struct instproxy_client_private instproxy_client_private; 47typedef struct instproxy_client_private instproxy_client_private;
52typedef instproxy_client_private *instproxy_client_t; /**< The client handle. */ 48typedef instproxy_client_private *instproxy_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/libimobiledevice.h b/include/libimobiledevice/libimobiledevice.h
index 3cbb96b..c91ec83 100644
--- a/include/libimobiledevice/libimobiledevice.h
+++ b/include/libimobiledevice/libimobiledevice.h
@@ -32,19 +32,16 @@ extern "C" {
32#include <sys/stat.h> 32#include <sys/stat.h>
33#include <plist/plist.h> 33#include <plist/plist.h>
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define IDEVICE_E_SUCCESS 0 37 IDEVICE_E_SUCCESS = 0,
38#define IDEVICE_E_INVALID_ARG -1 38 IDEVICE_E_INVALID_ARG = -1,
39#define IDEVICE_E_UNKNOWN_ERROR -2 39 IDEVICE_E_UNKNOWN_ERROR = -2,
40#define IDEVICE_E_NO_DEVICE -3 40 IDEVICE_E_NO_DEVICE = -3,
41#define IDEVICE_E_NOT_ENOUGH_DATA -4 41 IDEVICE_E_NOT_ENOUGH_DATA = -4,
42#define IDEVICE_E_BAD_HEADER -5 42 IDEVICE_E_BAD_HEADER = -5,
43#define IDEVICE_E_SSL_ERROR -6 43 IDEVICE_E_SSL_ERROR = -6
44/*@}*/ 44} idevice_error_t;
45
46/** Represents an error code. */
47typedef int16_t idevice_error_t;
48 45
49typedef struct idevice_private idevice_private; 46typedef struct idevice_private idevice_private;
50typedef idevice_private *idevice_t; /**< The device handle. */ 47typedef idevice_private *idevice_t; /**< The device handle. */
diff --git a/include/libimobiledevice/lockdown.h b/include/libimobiledevice/lockdown.h
index 3a088c1..beb07d3 100644
--- a/include/libimobiledevice/lockdown.h
+++ b/include/libimobiledevice/lockdown.h
@@ -31,35 +31,31 @@ extern "C" {
31#include <libimobiledevice/libimobiledevice.h> 31#include <libimobiledevice/libimobiledevice.h>
32#include <libimobiledevice/lockdown.h> 32#include <libimobiledevice/lockdown.h>
33 33
34/** @name Error Codes */ 34/** Error Codes */
35/*@{*/ 35typedef enum {
36#define LOCKDOWN_E_SUCCESS 0 36 LOCKDOWN_E_SUCCESS = 0,
37#define LOCKDOWN_E_INVALID_ARG -1 37 LOCKDOWN_E_INVALID_ARG = -1,
38#define LOCKDOWN_E_INVALID_CONF -2 38 LOCKDOWN_E_INVALID_CONF = -2,
39#define LOCKDOWN_E_PLIST_ERROR -3 39 LOCKDOWN_E_PLIST_ERROR = -3,
40#define LOCKDOWN_E_PAIRING_FAILED -4 40 LOCKDOWN_E_PAIRING_FAILED = -4,
41#define LOCKDOWN_E_SSL_ERROR -5 41 LOCKDOWN_E_SSL_ERROR = -5,
42#define LOCKDOWN_E_DICT_ERROR -6 42 LOCKDOWN_E_DICT_ERROR = -6,
43#define LOCKDOWN_E_START_SERVICE_FAILED -7 43 LOCKDOWN_E_START_SERVICE_FAILED = -7,
44#define LOCKDOWN_E_NOT_ENOUGH_DATA -8 44 LOCKDOWN_E_NOT_ENOUGH_DATA = -8,
45#define LOCKDOWN_E_SET_VALUE_PROHIBITED -9 45 LOCKDOWN_E_SET_VALUE_PROHIBITED = -9,
46#define LOCKDOWN_E_GET_VALUE_PROHIBITED -10 46 LOCKDOWN_E_GET_VALUE_PROHIBITED = -10,
47#define LOCKDOWN_E_REMOVE_VALUE_PROHIBITED -11 47 LOCKDOWN_E_REMOVE_VALUE_PROHIBITED = -11,
48#define LOCKDOWN_E_MUX_ERROR -12 48 LOCKDOWN_E_MUX_ERROR = -12,
49#define LOCKDOWN_E_ACTIVATION_FAILED -13 49 LOCKDOWN_E_ACTIVATION_FAILED = -13,
50#define LOCKDOWN_E_PASSWORD_PROTECTED -14 50 LOCKDOWN_E_PASSWORD_PROTECTED = -14,
51#define LOCKDOWN_E_NO_RUNNING_SESSION -15 51 LOCKDOWN_E_NO_RUNNING_SESSION = -15,
52#define LOCKDOWN_E_INVALID_HOST_ID -16 52 LOCKDOWN_E_INVALID_HOST_ID = -16,
53#define LOCKDOWN_E_INVALID_SERVICE -17 53 LOCKDOWN_E_INVALID_SERVICE = -17,
54#define LOCKDOWN_E_INVALID_ACTIVATION_RECORD -18 54 LOCKDOWN_E_INVALID_ACTIVATION_RECORD = -18,
55#define LOCKDOWN_E_PAIRING_DIALOG_PENDING -20 55 LOCKDOWN_E_PAIRING_DIALOG_PENDING = -20,
56#define LOCKDOWN_E_USER_DENIED_PAIRING -21 56 LOCKDOWN_E_USER_DENIED_PAIRING = -21,
57 57 LOCKDOWN_E_UNKNOWN_ERROR = -256
58#define LOCKDOWN_E_UNKNOWN_ERROR -256 58} lockdownd_error_t;
59/*@}*/
60
61/** Represents an error code. */
62typedef int16_t lockdownd_error_t;
63 59
64typedef struct lockdownd_client_private lockdownd_client_private; 60typedef struct lockdownd_client_private lockdownd_client_private;
65typedef lockdownd_client_private *lockdownd_client_t; /**< The client handle. */ 61typedef lockdownd_client_private *lockdownd_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/misagent.h b/include/libimobiledevice/misagent.h
index 7bb7333..28d55e8 100644
--- a/include/libimobiledevice/misagent.h
+++ b/include/libimobiledevice/misagent.h
@@ -32,19 +32,15 @@ extern "C" {
32 32
33#define MISAGENT_SERVICE_NAME "com.apple.misagent" 33#define MISAGENT_SERVICE_NAME "com.apple.misagent"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define MISAGENT_E_SUCCESS 0 37 MISAGENT_E_SUCCESS = 0,
38#define MISAGENT_E_INVALID_ARG -1 38 MISAGENT_E_INVALID_ARG = -1,
39#define MISAGENT_E_PLIST_ERROR -2 39 MISAGENT_E_PLIST_ERROR = -2,
40#define MISAGENT_E_CONN_FAILED -3 40 MISAGENT_E_CONN_FAILED = -3,
41#define MISAGENT_E_REQUEST_FAILED -4 41 MISAGENT_E_REQUEST_FAILED = -4,
42 42 MISAGENT_E_UNKNOWN_ERROR = -256
43#define MISAGENT_E_UNKNOWN_ERROR -256 43} misagent_error_t;
44/*@}*/
45
46/** Represents an error code. */
47typedef int16_t misagent_error_t;
48 44
49typedef struct misagent_client_private misagent_client_private; 45typedef struct misagent_client_private misagent_client_private;
50typedef misagent_client_private *misagent_client_t; /**< The client handle. */ 46typedef misagent_client_private *misagent_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/mobile_image_mounter.h b/include/libimobiledevice/mobile_image_mounter.h
index 7fe2c2a..43a2d9c 100644
--- a/include/libimobiledevice/mobile_image_mounter.h
+++ b/include/libimobiledevice/mobile_image_mounter.h
@@ -32,19 +32,15 @@ extern "C" {
32 32
33#define MOBILE_IMAGE_MOUNTER_SERVICE_NAME "com.apple.mobile.mobile_image_mounter" 33#define MOBILE_IMAGE_MOUNTER_SERVICE_NAME "com.apple.mobile.mobile_image_mounter"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define MOBILE_IMAGE_MOUNTER_E_SUCCESS 0 37 MOBILE_IMAGE_MOUNTER_E_SUCCESS = 0,
38#define MOBILE_IMAGE_MOUNTER_E_INVALID_ARG -1 38 MOBILE_IMAGE_MOUNTER_E_INVALID_ARG = -1,
39#define MOBILE_IMAGE_MOUNTER_E_PLIST_ERROR -2 39 MOBILE_IMAGE_MOUNTER_E_PLIST_ERROR = -2,
40#define MOBILE_IMAGE_MOUNTER_E_CONN_FAILED -3 40 MOBILE_IMAGE_MOUNTER_E_CONN_FAILED = -3,
41#define MOBILE_IMAGE_MOUNTER_E_COMMAND_FAILED -4 41 MOBILE_IMAGE_MOUNTER_E_COMMAND_FAILED = -4,
42 42 MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR = -256
43#define MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR -256 43} mobile_image_mounter_error_t;
44/*@}*/
45
46/** Represents an error code. */
47typedef int16_t mobile_image_mounter_error_t;
48 44
49typedef struct mobile_image_mounter_client_private mobile_image_mounter_client_private; 45typedef struct mobile_image_mounter_client_private mobile_image_mounter_client_private;
50typedef mobile_image_mounter_client_private *mobile_image_mounter_client_t; /**< The client handle. */ 46typedef mobile_image_mounter_client_private *mobile_image_mounter_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/mobilebackup.h b/include/libimobiledevice/mobilebackup.h
index c07ba68..77acadb 100644
--- a/include/libimobiledevice/mobilebackup.h
+++ b/include/libimobiledevice/mobilebackup.h
@@ -32,20 +32,16 @@ extern "C" {
32 32
33#define MOBILEBACKUP_SERVICE_NAME "com.apple.mobilebackup" 33#define MOBILEBACKUP_SERVICE_NAME "com.apple.mobilebackup"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define MOBILEBACKUP_E_SUCCESS 0 37 MOBILEBACKUP_E_SUCCESS = 0,
38#define MOBILEBACKUP_E_INVALID_ARG -1 38 MOBILEBACKUP_E_INVALID_ARG = -1,
39#define MOBILEBACKUP_E_PLIST_ERROR -2 39 MOBILEBACKUP_E_PLIST_ERROR = -2,
40#define MOBILEBACKUP_E_MUX_ERROR -3 40 MOBILEBACKUP_E_MUX_ERROR = -3,
41#define MOBILEBACKUP_E_BAD_VERSION -4 41 MOBILEBACKUP_E_BAD_VERSION = -4,
42#define MOBILEBACKUP_E_REPLY_NOT_OK -5 42 MOBILEBACKUP_E_REPLY_NOT_OK = -5,
43 43 MOBILEBACKUP_E_UNKNOWN_ERROR = -256
44#define MOBILEBACKUP_E_UNKNOWN_ERROR -256 44} mobilebackup_error_t;
45/*@}*/
46
47/** Represents an error code. */
48typedef int16_t mobilebackup_error_t;
49 45
50typedef struct mobilebackup_client_private mobilebackup_client_private; 46typedef struct mobilebackup_client_private mobilebackup_client_private;
51typedef mobilebackup_client_private *mobilebackup_client_t; /**< The client handle. */ 47typedef mobilebackup_client_private *mobilebackup_client_t; /**< The client handle. */
@@ -56,7 +52,6 @@ typedef enum {
56 MB_RESTORE_PRESERVE_CAMERA_ROLL = 1 << 2 52 MB_RESTORE_PRESERVE_CAMERA_ROLL = 1 << 2
57} mobilebackup_flags_t; 53} mobilebackup_flags_t;
58 54
59
60/** 55/**
61 * Connects to the mobilebackup service on the specified device. 56 * Connects to the mobilebackup service on the specified device.
62 * 57 *
diff --git a/include/libimobiledevice/mobilebackup2.h b/include/libimobiledevice/mobilebackup2.h
index ad1dcea..2faa859 100644
--- a/include/libimobiledevice/mobilebackup2.h
+++ b/include/libimobiledevice/mobilebackup2.h
@@ -32,21 +32,17 @@ extern "C" {
32 32
33#define MOBILEBACKUP2_SERVICE_NAME "com.apple.mobilebackup2" 33#define MOBILEBACKUP2_SERVICE_NAME "com.apple.mobilebackup2"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define MOBILEBACKUP2_E_SUCCESS 0 37 MOBILEBACKUP2_E_SUCCESS = 0,
38#define MOBILEBACKUP2_E_INVALID_ARG -1 38 MOBILEBACKUP2_E_INVALID_ARG = -1,
39#define MOBILEBACKUP2_E_PLIST_ERROR -2 39 MOBILEBACKUP2_E_PLIST_ERROR = -2,
40#define MOBILEBACKUP2_E_MUX_ERROR -3 40 MOBILEBACKUP2_E_MUX_ERROR = -3,
41#define MOBILEBACKUP2_E_BAD_VERSION -4 41 MOBILEBACKUP2_E_BAD_VERSION = -4,
42#define MOBILEBACKUP2_E_REPLY_NOT_OK -5 42 MOBILEBACKUP2_E_REPLY_NOT_OK = -5,
43#define MOBILEBACKUP2_E_NO_COMMON_VERSION -6 43 MOBILEBACKUP2_E_NO_COMMON_VERSION = -6,
44 44 MOBILEBACKUP2_E_UNKNOWN_ERROR = -256
45#define MOBILEBACKUP2_E_UNKNOWN_ERROR -256 45} mobilebackup2_error_t;
46/*@}*/
47
48/** Represents an error code. */
49typedef int16_t mobilebackup2_error_t;
50 46
51typedef struct mobilebackup2_client_private mobilebackup2_client_private; 47typedef struct mobilebackup2_client_private mobilebackup2_client_private;
52typedef mobilebackup2_client_private *mobilebackup2_client_t; /**< The client handle. */ 48typedef mobilebackup2_client_private *mobilebackup2_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/mobilesync.h b/include/libimobiledevice/mobilesync.h
index 6ba197b..3c0d576 100644
--- a/include/libimobiledevice/mobilesync.h
+++ b/include/libimobiledevice/mobilesync.h
@@ -33,20 +33,19 @@ extern "C" {
33 33
34#define MOBILESYNC_SERVICE_NAME "com.apple.mobilesync" 34#define MOBILESYNC_SERVICE_NAME "com.apple.mobilesync"
35 35
36/** @name Error Codes */ 36/** Error Codes */
37/*@{*/ 37typedef enum {
38#define MOBILESYNC_E_SUCCESS 0 38 MOBILESYNC_E_SUCCESS = 0,
39#define MOBILESYNC_E_INVALID_ARG -1 39 MOBILESYNC_E_INVALID_ARG = -1,
40#define MOBILESYNC_E_PLIST_ERROR -2 40 MOBILESYNC_E_PLIST_ERROR = -2,
41#define MOBILESYNC_E_MUX_ERROR -3 41 MOBILESYNC_E_MUX_ERROR = -3,
42#define MOBILESYNC_E_BAD_VERSION -4 42 MOBILESYNC_E_BAD_VERSION = -4,
43#define MOBILESYNC_E_SYNC_REFUSED -5 43 MOBILESYNC_E_SYNC_REFUSED = -5,
44#define MOBILESYNC_E_CANCELLED -6 44 MOBILESYNC_E_CANCELLED = -6,
45#define MOBILESYNC_E_WRONG_DIRECTION -7 45 MOBILESYNC_E_WRONG_DIRECTION = -7,
46#define MOBILESYNC_E_NOT_READY -8 46 MOBILESYNC_E_NOT_READY = -8,
47 47 MOBILESYNC_E_UNKNOWN_ERROR = -256
48#define MOBILESYNC_E_UNKNOWN_ERROR -256 48} mobilesync_error_t;
49/*@}*/
50 49
51/** The sync type of the current sync session. */ 50/** The sync type of the current sync session. */
52typedef enum { 51typedef enum {
@@ -55,9 +54,6 @@ typedef enum {
55 MOBILESYNC_SYNC_TYPE_RESET /**< Reset-sync signals that the computer should send all data again. */ 54 MOBILESYNC_SYNC_TYPE_RESET /**< Reset-sync signals that the computer should send all data again. */
56} mobilesync_sync_type_t; 55} mobilesync_sync_type_t;
57 56
58/** Represents an error code. */
59typedef int16_t mobilesync_error_t;
60
61typedef struct mobilesync_client_private mobilesync_client_private; 57typedef struct mobilesync_client_private mobilesync_client_private;
62typedef mobilesync_client_private *mobilesync_client_t; /**< The client handle */ 58typedef mobilesync_client_private *mobilesync_client_t; /**< The client handle */
63 59
diff --git a/include/libimobiledevice/notification_proxy.h b/include/libimobiledevice/notification_proxy.h
index a66057b..275be74 100644
--- a/include/libimobiledevice/notification_proxy.h
+++ b/include/libimobiledevice/notification_proxy.h
@@ -32,18 +32,14 @@ extern "C" {
32 32
33#define NP_SERVICE_NAME "com.apple.mobile.notification_proxy" 33#define NP_SERVICE_NAME "com.apple.mobile.notification_proxy"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define NP_E_SUCCESS 0 37 NP_E_SUCCESS = 0,
38#define NP_E_INVALID_ARG -1 38 NP_E_INVALID_ARG = -1,
39#define NP_E_PLIST_ERROR -2 39 NP_E_PLIST_ERROR = -2,
40#define NP_E_CONN_FAILED -3 40 NP_E_CONN_FAILED = -3,
41 41 NP_E_UNKNOWN_ERROR = -256
42#define NP_E_UNKNOWN_ERROR -256 42} np_error_t;
43/*@}*/
44
45/** Represents an error code. */
46typedef int16_t np_error_t;
47 43
48/** 44/**
49 * @name Notifications that can be send 45 * @name Notifications that can be send
diff --git a/include/libimobiledevice/property_list_service.h b/include/libimobiledevice/property_list_service.h
index 4a004ba..dd16b86 100644
--- a/include/libimobiledevice/property_list_service.h
+++ b/include/libimobiledevice/property_list_service.h
@@ -29,18 +29,15 @@ extern "C" {
29#include <libimobiledevice/lockdown.h> 29#include <libimobiledevice/lockdown.h>
30 30
31/* Error Codes */ 31/* Error Codes */
32/*@{*/ 32typedef enum {
33#define PROPERTY_LIST_SERVICE_E_SUCCESS 0 33 PROPERTY_LIST_SERVICE_E_SUCCESS = 0,
34#define PROPERTY_LIST_SERVICE_E_INVALID_ARG -1 34 PROPERTY_LIST_SERVICE_E_INVALID_ARG = -1,
35#define PROPERTY_LIST_SERVICE_E_PLIST_ERROR -2 35 PROPERTY_LIST_SERVICE_E_PLIST_ERROR = -2,
36#define PROPERTY_LIST_SERVICE_E_MUX_ERROR -3 36 PROPERTY_LIST_SERVICE_E_MUX_ERROR = -3,
37#define PROPERTY_LIST_SERVICE_E_SSL_ERROR -4 37 PROPERTY_LIST_SERVICE_E_SSL_ERROR = -4,
38#define PROPERTY_LIST_SERVICE_E_RECEIVE_TIMEOUT -5 38 PROPERTY_LIST_SERVICE_E_RECEIVE_TIMEOUT = -5,
39#define PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR -256 39 PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR = -256
40/*@}*/ 40} property_list_service_error_t;
41
42/** Represents an error code */
43typedef int16_t property_list_service_error_t;
44 41
45typedef struct property_list_service_client_private property_list_service_private; 42typedef struct property_list_service_client_private property_list_service_private;
46typedef property_list_service_private* property_list_service_client_t; /**< The client handle. */ 43typedef property_list_service_private* property_list_service_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/restore.h b/include/libimobiledevice/restore.h
index 63f8915..9373249 100644
--- a/include/libimobiledevice/restore.h
+++ b/include/libimobiledevice/restore.h
@@ -30,22 +30,19 @@ extern "C" {
30 30
31#include <libimobiledevice/libimobiledevice.h> 31#include <libimobiledevice/libimobiledevice.h>
32 32
33/** @name Error Codes */ 33/** Error Codes */
34/*@{*/ 34typedef enum {
35#define RESTORE_E_SUCCESS 0 35 RESTORE_E_SUCCESS = 0,
36#define RESTORE_E_INVALID_ARG -1 36 RESTORE_E_INVALID_ARG = -1,
37#define RESTORE_E_INVALID_CONF -2 37 RESTORE_E_INVALID_CONF = -2,
38#define RESTORE_E_PLIST_ERROR -3 38 RESTORE_E_PLIST_ERROR = -3,
39#define RESTORE_E_DICT_ERROR -4 39 RESTORE_E_DICT_ERROR = -4,
40#define RESTORE_E_NOT_ENOUGH_DATA -5 40 RESTORE_E_NOT_ENOUGH_DATA = -5,
41#define RESTORE_E_MUX_ERROR -6 41 RESTORE_E_MUX_ERROR = -6,
42#define RESTORE_E_START_RESTORE_FAILED -7 42 RESTORE_E_START_RESTORE_FAILED = -7,
43 43 RESTORE_E_DEVICE_ERROR = -8,
44#define RESTORE_E_UNKNOWN_ERROR -256 44 RESTORE_E_UNKNOWN_ERROR = -256
45/*@}*/ 45} restored_error_t;
46
47/** Represents an error code. */
48typedef int16_t restored_error_t;
49 46
50typedef struct restored_client_private restored_client_private; 47typedef struct restored_client_private restored_client_private;
51typedef restored_client_private *restored_client_t; /**< The client handle. */ 48typedef restored_client_private *restored_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/sbservices.h b/include/libimobiledevice/sbservices.h
index f0bf2c4..f4f8dde 100644
--- a/include/libimobiledevice/sbservices.h
+++ b/include/libimobiledevice/sbservices.h
@@ -32,15 +32,14 @@ extern "C" {
32 32
33#define SBSERVICES_SERVICE_NAME "com.apple.springboardservices" 33#define SBSERVICES_SERVICE_NAME "com.apple.springboardservices"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define SBSERVICES_E_SUCCESS 0 37 SBSERVICES_E_SUCCESS = 0,
38#define SBSERVICES_E_INVALID_ARG -1 38 SBSERVICES_E_INVALID_ARG = -1,
39#define SBSERVICES_E_PLIST_ERROR -2 39 SBSERVICES_E_PLIST_ERROR = -2,
40#define SBSERVICES_E_CONN_FAILED -3 40 SBSERVICES_E_CONN_FAILED = -3,
41 41 SBSERVICES_E_UNKNOWN_ERROR = -256
42#define SBSERVICES_E_UNKNOWN_ERROR -256 42} sbservices_error_t;
43/*@}*/
44 43
45/** @name Orientation of the user interface on the device */ 44/** @name Orientation of the user interface on the device */
46/*@{*/ 45/*@{*/
@@ -53,9 +52,6 @@ typedef enum {
53} sbservices_interface_orientation_t; 52} sbservices_interface_orientation_t;
54/*@}*/ 53/*@}*/
55 54
56/** Represents an error code. */
57typedef int16_t sbservices_error_t;
58
59typedef struct sbservices_client_private sbservices_client_private; 55typedef struct sbservices_client_private sbservices_client_private;
60typedef sbservices_client_private *sbservices_client_t; /**< The client handle. */ 56typedef sbservices_client_private *sbservices_client_t; /**< The client handle. */
61 57
diff --git a/include/libimobiledevice/screenshotr.h b/include/libimobiledevice/screenshotr.h
index 3601172..70cb2d2 100644
--- a/include/libimobiledevice/screenshotr.h
+++ b/include/libimobiledevice/screenshotr.h
@@ -33,19 +33,15 @@ extern "C" {
33 33
34#define SCREENSHOTR_SERVICE_NAME "com.apple.mobile.screenshotr" 34#define SCREENSHOTR_SERVICE_NAME "com.apple.mobile.screenshotr"
35 35
36/** @name Error Codes */ 36/** Error Codes */
37/*@{*/ 37typedef enum {
38#define SCREENSHOTR_E_SUCCESS 0 38 SCREENSHOTR_E_SUCCESS = 0,
39#define SCREENSHOTR_E_INVALID_ARG -1 39 SCREENSHOTR_E_INVALID_ARG = -1,
40#define SCREENSHOTR_E_PLIST_ERROR -2 40 SCREENSHOTR_E_PLIST_ERROR = -2,
41#define SCREENSHOTR_E_MUX_ERROR -3 41 SCREENSHOTR_E_MUX_ERROR = -3,
42#define SCREENSHOTR_E_BAD_VERSION -4 42 SCREENSHOTR_E_BAD_VERSION = -4,
43 43 SCREENSHOTR_E_UNKNOWN_ERROR = -256
44#define SCREENSHOTR_E_UNKNOWN_ERROR -256 44} screenshotr_error_t;
45/*@}*/
46
47/** Represents an error code. */
48typedef int16_t screenshotr_error_t;
49 45
50typedef struct screenshotr_client_private screenshotr_client_private; 46typedef struct screenshotr_client_private screenshotr_client_private;
51typedef screenshotr_client_private *screenshotr_client_t; /**< The client handle. */ 47typedef screenshotr_client_private *screenshotr_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/service.h b/include/libimobiledevice/service.h
index acf846b..760dbb4 100644
--- a/include/libimobiledevice/service.h
+++ b/include/libimobiledevice/service.h
@@ -30,23 +30,20 @@ extern "C" {
30#include <libimobiledevice/libimobiledevice.h> 30#include <libimobiledevice/libimobiledevice.h>
31#include <libimobiledevice/lockdown.h> 31#include <libimobiledevice/lockdown.h>
32 32
33/** @name Error Codes */ 33/** Error Codes */
34/*@{*/ 34typedef enum {
35#define SERVICE_E_SUCCESS 0 35 SERVICE_E_SUCCESS = 0,
36#define SERVICE_E_INVALID_ARG -1 36 SERVICE_E_INVALID_ARG = -1,
37#define SERVICE_E_MUX_ERROR -3 37 SERVICE_E_MUX_ERROR = -3,
38#define SERVICE_E_SSL_ERROR -4 38 SERVICE_E_SSL_ERROR = -4,
39#define SERVICE_E_START_SERVICE_ERROR -5 39 SERVICE_E_START_SERVICE_ERROR = -5,
40#define SERVICE_E_UNKNOWN_ERROR -256 40 SERVICE_E_UNKNOWN_ERROR = -256
41/*@}*/ 41} service_error_t;
42
43/** Represents an error code. */
44typedef int16_t service_error_t;
45 42
46typedef struct service_client_private service_client_private; 43typedef struct service_client_private service_client_private;
47typedef service_client_private* service_client_t; /**< The client handle. */ 44typedef service_client_private* service_client_t; /**< The client handle. */
48 45
49#define SERVICE_CONSTRUCTOR(x) (int16_t (*)(idevice_t, lockdownd_service_descriptor_t, void**))(x) 46#define SERVICE_CONSTRUCTOR(x) (int32_t (*)(idevice_t, lockdownd_service_descriptor_t, void**))(x)
50 47
51/* Interface */ 48/* Interface */
52 49
@@ -79,7 +76,7 @@ service_error_t service_client_new(idevice_t device, lockdownd_service_descripto
79 * @return SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code 76 * @return SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code
80 * otherwise. 77 * otherwise.
81 */ 78 */
82service_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); 79service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, int32_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), int32_t *error_code);
83 80
84/** 81/**
85 * Frees a service instance. 82 * Frees a service instance.
diff --git a/include/libimobiledevice/syslog_relay.h b/include/libimobiledevice/syslog_relay.h
index 952840e..1b9c4f1 100644
--- a/include/libimobiledevice/syslog_relay.h
+++ b/include/libimobiledevice/syslog_relay.h
@@ -32,17 +32,14 @@ extern "C" {
32 32
33#define SYSLOG_RELAY_SERVICE_NAME "com.apple.syslog_relay" 33#define SYSLOG_RELAY_SERVICE_NAME "com.apple.syslog_relay"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define SYSLOG_RELAY_E_SUCCESS 0 37 SYSLOG_RELAY_E_SUCCESS = 0,
38#define SYSLOG_RELAY_E_INVALID_ARG -1 38 SYSLOG_RELAY_E_INVALID_ARG = -1,
39#define SYSLOG_RELAY_E_MUX_ERROR -2 39 SYSLOG_RELAY_E_MUX_ERROR = -2,
40#define SYSLOG_RELAY_E_SSL_ERROR -3 40 SYSLOG_RELAY_E_SSL_ERROR = -3,
41#define SYSLOG_RELAY_E_UNKNOWN_ERROR -256 41 SYSLOG_RELAY_E_UNKNOWN_ERROR = -256
42/*@}*/ 42} syslog_relay_error_t;
43
44/** Represents an error code. */
45typedef int16_t syslog_relay_error_t;
46 43
47typedef struct syslog_relay_client_private syslog_relay_client_private; 44typedef struct syslog_relay_client_private syslog_relay_client_private;
48typedef syslog_relay_client_private *syslog_relay_client_t; /**< The client handle. */ 45typedef syslog_relay_client_private *syslog_relay_client_t; /**< The client handle. */
diff --git a/include/libimobiledevice/webinspector.h b/include/libimobiledevice/webinspector.h
index 499e7f0..9f0c75c 100644
--- a/include/libimobiledevice/webinspector.h
+++ b/include/libimobiledevice/webinspector.h
@@ -32,18 +32,15 @@ extern "C" {
32 32
33#define WEBINSPECTOR_SERVICE_NAME "com.apple.webinspector" 33#define WEBINSPECTOR_SERVICE_NAME "com.apple.webinspector"
34 34
35/** @name Error Codes */ 35/** Error Codes */
36/*@{*/ 36typedef enum {
37#define WEBINSPECTOR_E_SUCCESS 0 37 WEBINSPECTOR_E_SUCCESS = 0,
38#define WEBINSPECTOR_E_INVALID_ARG -1 38 WEBINSPECTOR_E_INVALID_ARG = -1,
39#define WEBINSPECTOR_E_PLIST_ERROR -2 39 WEBINSPECTOR_E_PLIST_ERROR = -2,
40#define WEBINSPECTOR_E_MUX_ERROR -3 40 WEBINSPECTOR_E_MUX_ERROR = -3,
41#define WEBINSPECTOR_E_SSL_ERROR -4 41 WEBINSPECTOR_E_SSL_ERROR = -4,
42#define WEBINSPECTOR_E_UNKNOWN_ERROR -256 42 WEBINSPECTOR_E_UNKNOWN_ERROR = -256
43/*@}*/ 43} webinspector_error_t;
44
45/** Represents an error code. */
46typedef int16_t webinspector_error_t;
47 44
48typedef struct webinspector_client_private webinspector_client_private; 45typedef struct webinspector_client_private webinspector_client_private;
49typedef webinspector_client_private *webinspector_client_t; /**< The client handle. */ 46typedef webinspector_client_private *webinspector_client_t; /**< The client handle. */
diff --git a/src/diagnostics_relay.c b/src/diagnostics_relay.c
index 055f60a..825678a 100644
--- a/src/diagnostics_relay.c
+++ b/src/diagnostics_relay.c
@@ -153,7 +153,7 @@ static diagnostics_relay_error_t diagnostics_relay_send(diagnostics_relay_client
153 return DIAGNOSTICS_RELAY_E_INVALID_ARG; 153 return DIAGNOSTICS_RELAY_E_INVALID_ARG;
154 154
155 diagnostics_relay_error_t ret = DIAGNOSTICS_RELAY_E_SUCCESS; 155 diagnostics_relay_error_t ret = DIAGNOSTICS_RELAY_E_SUCCESS;
156 idevice_error_t err; 156 property_list_service_error_t err;
157 157
158 err = property_list_service_send_xml_plist(client->parent, plist); 158 err = property_list_service_send_xml_plist(client->parent, plist);
159 if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) { 159 if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) {
diff --git a/src/lockdown.c b/src/lockdown.c
index 8dc1644..14886c9 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -287,7 +287,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_send(lockdownd_client_t client,
287 return LOCKDOWN_E_INVALID_ARG; 287 return LOCKDOWN_E_INVALID_ARG;
288 288
289 lockdownd_error_t ret = LOCKDOWN_E_SUCCESS; 289 lockdownd_error_t ret = LOCKDOWN_E_SUCCESS;
290 idevice_error_t err; 290 property_list_service_error_t err;
291 291
292 err = property_list_service_send_xml_plist(client->parent, plist); 292 err = property_list_service_send_xml_plist(client->parent, plist);
293 if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) { 293 if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) {
@@ -1031,6 +1031,7 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_goodbye(lockdownd_client_t clie
1031LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled) 1031LIBIMOBILEDEVICE_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 property_list_service_error_t plret;
1034 plist_t dict = NULL; 1035 plist_t dict = NULL;
1035 1036
1036 if (!client || !host_id) 1037 if (!client || !host_id)
@@ -1113,8 +1114,9 @@ LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_start_session(lockdownd_client_
1113 debug_info("Enable SSL Session: %s", (use_ssl?"true":"false")); 1114 debug_info("Enable SSL Session: %s", (use_ssl?"true":"false"));
1114 1115
1115 if (use_ssl) { 1116 if (use_ssl) {
1116 ret = property_list_service_enable_ssl(client->parent); 1117 plret = property_list_service_enable_ssl(client->parent);
1117 if (ret == PROPERTY_LIST_SERVICE_E_SUCCESS) { 1118 if (plret == PROPERTY_LIST_SERVICE_E_SUCCESS) {
1119 ret = LOCKDOWN_E_SUCCESS;
1118 client->ssl_enabled = 1; 1120 client->ssl_enabled = 1;
1119 } else { 1121 } else {
1120 ret = LOCKDOWN_E_SSL_ERROR; 1122 ret = LOCKDOWN_E_SSL_ERROR;
diff --git a/src/restore.c b/src/restore.c
index 3f6be8f..4d4823f 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -154,7 +154,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_send(restored_client_t client, pl
154 return RESTORE_E_INVALID_ARG; 154 return RESTORE_E_INVALID_ARG;
155 155
156 restored_error_t ret = RESTORE_E_SUCCESS; 156 restored_error_t ret = RESTORE_E_SUCCESS;
157 idevice_error_t err; 157 property_list_service_error_t err;
158 158
159 err = property_list_service_send_xml_plist(client->parent, plist); 159 err = property_list_service_send_xml_plist(client->parent, plist);
160 if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) { 160 if (err != PROPERTY_LIST_SERVICE_E_SUCCESS) {
@@ -297,6 +297,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_client_new(idevice_t device, rest
297 return RESTORE_E_INVALID_ARG; 297 return RESTORE_E_INVALID_ARG;
298 298
299 restored_error_t ret = RESTORE_E_SUCCESS; 299 restored_error_t ret = RESTORE_E_SUCCESS;
300 idevice_error_t idev_ret;
300 301
301 static struct lockdownd_service_descriptor service = { 302 static struct lockdownd_service_descriptor service = {
302 .port = 0xf27e, 303 .port = 0xf27e,
@@ -317,9 +318,10 @@ LIBIMOBILEDEVICE_API restored_error_t restored_client_new(idevice_t device, rest
317 if (label != NULL) 318 if (label != NULL)
318 client_loc->label = strdup(label); 319 client_loc->label = strdup(label);
319 320
320 ret = idevice_get_udid(device, &client_loc->udid); 321 idev_ret = idevice_get_udid(device, &client_loc->udid);
321 if (RESTORE_E_SUCCESS != ret) { 322 if (IDEVICE_E_SUCCESS != idev_ret) {
322 debug_info("failed to get device udid."); 323 debug_info("failed to get device udid.");
324 ret = RESTORE_E_DEVICE_ERROR;
323 } 325 }
324 debug_info("device udid: %s", client_loc->udid); 326 debug_info("device udid: %s", client_loc->udid);
325 327
diff --git a/src/service.c b/src/service.c
index c4743dc..48959b6 100644
--- a/src/service.c
+++ b/src/service.c
@@ -76,7 +76,7 @@ LIBIMOBILEDEVICE_API service_error_t service_client_new(idevice_t device, lockdo
76 return SERVICE_E_SUCCESS; 76 return SERVICE_E_SUCCESS;
77} 77}
78 78
79LIBIMOBILEDEVICE_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) 79LIBIMOBILEDEVICE_API service_error_t service_client_factory_start_service(idevice_t device, const char* service_name, void **client, const char* label, int32_t (*constructor_func)(idevice_t, lockdownd_service_descriptor_t, void**), int32_t *error_code)
80{ 80{
81 *client = NULL; 81 *client = NULL;
82 82
@@ -95,9 +95,9 @@ LIBIMOBILEDEVICE_API service_error_t service_client_factory_start_service(idevic
95 return SERVICE_E_START_SERVICE_ERROR; 95 return SERVICE_E_START_SERVICE_ERROR;
96 } 96 }
97 97
98 int16_t ec; 98 int32_t ec;
99 if (constructor_func) { 99 if (constructor_func) {
100 ec = (int16_t)constructor_func(device, service, client); 100 ec = (int32_t)constructor_func(device, service, client);
101 } else { 101 } else {
102 ec = service_client_new(device, service, (service_client_t*)client); 102 ec = service_client_new(device, service, (service_client_t*)client);
103 } 103 }
diff --git a/src/syslog_relay.c b/src/syslog_relay.c
index 63e7d34..44006ce 100644
--- a/src/syslog_relay.c
+++ b/src/syslog_relay.c
@@ -139,7 +139,7 @@ LIBIMOBILEDEVICE_API syslog_relay_error_t syslog_relay_receive_with_timeout(sysl
139 139
140void *syslog_relay_worker(void *arg) 140void *syslog_relay_worker(void *arg)
141{ 141{
142 service_error_t ret = SERVICE_E_UNKNOWN_ERROR; 142 syslog_relay_error_t ret = SYSLOG_RELAY_E_UNKNOWN_ERROR;
143 struct syslog_relay_worker_thread *srwt = (struct syslog_relay_worker_thread*)arg; 143 struct syslog_relay_worker_thread *srwt = (struct syslog_relay_worker_thread*)arg;
144 144
145 if (!srwt) 145 if (!srwt)