diff options
Diffstat (limited to 'include/libiphone/lockdown.h')
| -rw-r--r-- | include/libiphone/lockdown.h | 58 |
1 files changed, 40 insertions, 18 deletions
diff --git a/include/libiphone/lockdown.h b/include/libiphone/lockdown.h index 20ccf77..af58190 100644 --- a/include/libiphone/lockdown.h +++ b/include/libiphone/lockdown.h | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | /* | 1 | /** |
| 2 | * lockdownd.h | 2 | * @file libiphone/lockdown.h |
| 3 | * @brief Communcation with the lockdown device daemon | ||
| 4 | * \internal | ||
| 3 | * | 5 | * |
| 6 | * Copyright (c) 2008 Zach C. All Rights Reserved. | ||
| 4 | * Copyright (c) 2009 Martin S. All Rights Reserved. | 7 | * Copyright (c) 2009 Martin S. All Rights Reserved. |
| 5 | * | 8 | * |
| 6 | * This library is free software; you can redistribute it and/or | 9 | * This library is free software; you can redistribute it and/or |
| @@ -27,25 +30,44 @@ extern "C" { | |||
| 27 | 30 | ||
| 28 | #include <libiphone/libiphone.h> | 31 | #include <libiphone/libiphone.h> |
| 29 | 32 | ||
| 33 | /* Error Codes */ | ||
| 34 | #define LOCKDOWN_E_SUCCESS 0 | ||
| 35 | #define LOCKDOWN_E_INVALID_ARG -1 | ||
| 36 | #define LOCKDOWN_E_INVALID_CONF -2 | ||
| 37 | #define LOCKDOWN_E_PLIST_ERROR -3 | ||
| 38 | #define LOCKDOWN_E_PAIRING_FAILED -4 | ||
| 39 | #define LOCKDOWN_E_SSL_ERROR -5 | ||
| 40 | #define LOCKDOWN_E_DICT_ERROR -6 | ||
| 41 | #define LOCKDOWN_E_START_SERVICE_FAILED -7 | ||
| 42 | #define LOCKDOWN_E_NOT_ENOUGH_DATA -8 | ||
| 43 | #define LOCKDOWN_E_SET_VALUE_PROHIBITED -9 | ||
| 44 | #define LOCKDOWN_E_GET_VALUE_PROHIBITED -10 | ||
| 45 | #define LOCKDOWN_E_REMOVE_VALUE_PROHIBITED -11 | ||
| 46 | #define LOCKDOWN_E_MUX_ERROR -12 | ||
| 47 | |||
| 48 | #define LOCKDOWN_E_UNKNOWN_ERROR -256 | ||
| 49 | |||
| 50 | typedef int16_t lockdownd_error_t; | ||
| 51 | |||
| 30 | struct lockdownd_client_int; | 52 | struct lockdownd_client_int; |
| 31 | typedef struct lockdownd_client_int *lockdownd_client_t; | 53 | typedef struct lockdownd_client_int *lockdownd_client_t; |
| 32 | 54 | ||
| 33 | //lockdownd related functions | 55 | /* Interface */ |
| 34 | iphone_error_t lockdownd_new_client (iphone_device_t device, lockdownd_client_t *client); | 56 | lockdownd_error_t lockdownd_client_new(iphone_device_t device, lockdownd_client_t *client); |
| 35 | iphone_error_t lockdownd_free_client(lockdownd_client_t client); | 57 | lockdownd_error_t lockdownd_client_free(lockdownd_client_t client); |
| 36 | iphone_error_t lockdownd_query_type(lockdownd_client_t client); | 58 | lockdownd_error_t lockdownd_query_type(lockdownd_client_t client); |
| 37 | iphone_error_t lockdownd_get_value(lockdownd_client_t client, const char *domain, const char *key, plist_t *value); | 59 | lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *domain, const char *key, plist_t *value); |
| 38 | iphone_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value); | 60 | lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value); |
| 39 | iphone_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key); | 61 | lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key); |
| 40 | iphone_error_t lockdownd_start_service (lockdownd_client_t client, const char *service, int *port); | 62 | lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *service, int *port); |
| 41 | iphone_error_t lockdownd_stop_session(lockdownd_client_t client); | 63 | lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id); |
| 42 | iphone_error_t lockdownd_send (lockdownd_client_t client, plist_t plist); | 64 | lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist); |
| 43 | iphone_error_t lockdownd_recv (lockdownd_client_t client, plist_t *plist); | 65 | lockdownd_error_t lockdownd_recv(lockdownd_client_t client, plist_t *plist); |
| 44 | iphone_error_t lockdownd_pair(lockdownd_client_t client, char *uid, char *host_id); | 66 | lockdownd_error_t lockdownd_pair(lockdownd_client_t client, char *uuid, char *host_id); |
| 45 | iphone_error_t lockdownd_get_device_uid (lockdownd_client_t control, char **uid); | 67 | lockdownd_error_t lockdownd_get_device_uuid(lockdownd_client_t control, char **uuid); |
| 46 | iphone_error_t lockdownd_get_device_name (lockdownd_client_t client, char **device_name); | 68 | lockdownd_error_t lockdownd_get_device_name(lockdownd_client_t client, char **device_name); |
| 47 | iphone_error_t lockdownd_enter_recovery(lockdownd_client_t client); | 69 | lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client); |
| 48 | iphone_error_t lockdownd_goodbye(lockdownd_client_t client); | 70 | lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client); |
| 49 | 71 | ||
| 50 | #ifdef __cplusplus | 72 | #ifdef __cplusplus |
| 51 | } | 73 | } |
