summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice/service.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libimobiledevice/service.h')
-rw-r--r--include/libimobiledevice/service.h25
1 files changed, 11 insertions, 14 deletions
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" {
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
-/** @name Error Codes */
-/*@{*/
-#define SERVICE_E_SUCCESS 0
-#define SERVICE_E_INVALID_ARG -1
-#define SERVICE_E_MUX_ERROR -3
-#define SERVICE_E_SSL_ERROR -4
-#define SERVICE_E_START_SERVICE_ERROR -5
-#define SERVICE_E_UNKNOWN_ERROR -256
-/*@}*/
-
-/** Represents an error code. */
-typedef int16_t service_error_t;
+/** Error Codes */
+typedef enum {
+ SERVICE_E_SUCCESS = 0,
+ SERVICE_E_INVALID_ARG = -1,
+ SERVICE_E_MUX_ERROR = -3,
+ SERVICE_E_SSL_ERROR = -4,
+ SERVICE_E_START_SERVICE_ERROR = -5,
+ SERVICE_E_UNKNOWN_ERROR = -256
+} service_error_t;
typedef struct service_client_private service_client_private;
typedef service_client_private* service_client_t; /**< The client handle. */
-#define SERVICE_CONSTRUCTOR(x) (int16_t (*)(idevice_t, lockdownd_service_descriptor_t, void**))(x)
+#define SERVICE_CONSTRUCTOR(x) (int32_t (*)(idevice_t, lockdownd_service_descriptor_t, void**))(x)
/* Interface */
@@ -79,7 +76,7 @@ service_error_t service_client_new(idevice_t device, lockdownd_service_descripto
* @return SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code
* otherwise.
*/
-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);
+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);
/**
* Frees a service instance.