summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice
diff options
context:
space:
mode:
Diffstat (limited to 'include/libimobiledevice')
-rw-r--r--include/libimobiledevice/afc.h117
-rw-r--r--include/libimobiledevice/file_relay.h56
-rw-r--r--include/libimobiledevice/installation_proxy.h72
-rw-r--r--include/libimobiledevice/libimobiledevice.h102
-rw-r--r--include/libimobiledevice/lockdown.h99
-rw-r--r--include/libimobiledevice/mobilebackup.h55
-rw-r--r--include/libimobiledevice/mobilesync.h55
-rw-r--r--include/libimobiledevice/notification_proxy.h88
-rw-r--r--include/libimobiledevice/sbservices.h56
9 files changed, 700 insertions, 0 deletions
diff --git a/include/libimobiledevice/afc.h b/include/libimobiledevice/afc.h
new file mode 100644
index 0000000..5b61499
--- /dev/null
+++ b/include/libimobiledevice/afc.h
@@ -0,0 +1,117 @@
1/**
2 * @file libimobiledevice/afc.h
3 * @brief AFC Implementation
4 * \internal
5 *
6 * Copyright (c) 2009 Nikias Bassen All Rights Reserved.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef AFC_H
24#define AFC_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <libimobiledevice/libimobiledevice.h>
31
32/* Error Codes */
33#define AFC_E_SUCCESS 0
34#define AFC_E_UNKNOWN_ERROR 1
35#define AFC_E_OP_HEADER_INVALID 2
36#define AFC_E_NO_RESOURCES 3
37#define AFC_E_READ_ERROR 4
38#define AFC_E_WRITE_ERROR 5
39#define AFC_E_UNKNOWN_PACKET_TYPE 6
40#define AFC_E_INVALID_ARGUMENT 7
41#define AFC_E_OBJECT_NOT_FOUND 8
42#define AFC_E_OBJECT_IS_DIR 9
43#define AFC_E_PERM_DENIED 10
44#define AFC_E_SERVICE_NOT_CONNECTED 11
45#define AFC_E_OP_TIMEOUT 12
46#define AFC_E_TOO_MUCH_DATA 13
47#define AFC_E_END_OF_DATA 14
48#define AFC_E_OP_NOT_SUPPORTED 15
49#define AFC_E_OBJECT_EXISTS 16
50#define AFC_E_OBJECT_BUSY 17
51#define AFC_E_NO_SPACE_LEFT 18
52#define AFC_E_OP_WOULD_BLOCK 19
53#define AFC_E_IO_ERROR 20
54#define AFC_E_OP_INTERRUPTED 21
55#define AFC_E_OP_IN_PROGRESS 22
56#define AFC_E_INTERNAL_ERROR 23
57
58#define AFC_E_MUX_ERROR 30
59#define AFC_E_NO_MEM 31
60#define AFC_E_NOT_ENOUGH_DATA 32
61#define AFC_E_DIR_NOT_EMPTY 33
62
63typedef int16_t afc_error_t;
64
65/* Flags */
66typedef enum {
67 AFC_FOPEN_RDONLY = 0x00000001, // r O_RDONLY
68 AFC_FOPEN_RW = 0x00000002, // r+ O_RDWR | O_CREAT
69 AFC_FOPEN_WRONLY = 0x00000003, // w O_WRONLY | O_CREAT | O_TRUNC
70 AFC_FOPEN_WR = 0x00000004, // w+ O_RDWR | O_CREAT | O_TRUNC
71 AFC_FOPEN_APPEND = 0x00000005, // a O_WRONLY | O_APPEND | O_CREAT
72 AFC_FOPEN_RDAPPEND = 0x00000006 // a+ O_RDWR | O_APPEND | O_CREAT
73} afc_file_mode_t;
74
75typedef enum {
76 AFC_HARDLINK = 1,
77 AFC_SYMLINK = 2
78} afc_link_type_t;
79
80typedef enum {
81 AFC_LOCK_SH = 1 | 4, // shared lock
82 AFC_LOCK_EX = 2 | 4, // exclusive lock
83 AFC_LOCK_UN = 8 | 4 // unlock
84} afc_lock_op_t;
85
86struct afc_client_int;
87typedef struct afc_client_int *afc_client_t;
88
89/* Interface */
90afc_error_t afc_client_new(idevice_t device, uint16_t port, afc_client_t *client);
91afc_error_t afc_client_free(afc_client_t client);
92afc_error_t afc_get_device_info(afc_client_t client, char ***infos);
93afc_error_t afc_read_directory(afc_client_t client, const char *dir, char ***list);
94afc_error_t afc_get_file_info(afc_client_t client, const char *filename, char ***infolist);
95afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mode_t file_mode, uint64_t *handle);
96afc_error_t afc_file_close(afc_client_t client, uint64_t handle);
97afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t operation);
98afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint32_t length, uint32_t *bytes_read);
99afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *data, uint32_t length, uint32_t *bytes_written);
100afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, int whence);
101afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *position);
102afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t newsize);
103afc_error_t afc_remove_path(afc_client_t client, const char *path);
104afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *to);
105afc_error_t afc_make_directory(afc_client_t client, const char *dir);
106afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize);
107afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const char *target, const char *linkname);
108afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mtime);
109
110/* Helper functions */
111afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char **value);
112
113#ifdef __cplusplus
114}
115#endif
116
117#endif
diff --git a/include/libimobiledevice/file_relay.h b/include/libimobiledevice/file_relay.h
new file mode 100644
index 0000000..268eed8
--- /dev/null
+++ b/include/libimobiledevice/file_relay.h
@@ -0,0 +1,56 @@
1/**
2 * @file libimobiledevice/file_relay.h
3 * @brief file_relay Implementation
4 * \internal
5 *
6 * Copyright (c) 2010 Nikias Bassen All Rights Reserved.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef IFILE_RELAY_H
24#define IFILE_RELAY_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <libimobiledevice/libimobiledevice.h>
31
32/* Error Codes */
33#define FILE_RELAY_E_SUCCESS 0
34#define FILE_RELAY_E_INVALID_ARG -1
35#define FILE_RELAY_E_PLIST_ERROR -2
36#define FILE_RELAY_E_MUX_ERROR -3
37#define FILE_RELAY_E_INVALID_SOURCE -4
38#define FILE_RELAY_E_STAGING_EMPTY -5
39
40#define FILE_RELAY_E_UNKNOWN_ERROR -256
41
42typedef int16_t file_relay_error_t;
43
44struct file_relay_client_int;
45typedef struct file_relay_client_int *file_relay_client_t;
46
47file_relay_error_t file_relay_client_new(idevice_t device, uint16_t port, file_relay_client_t *client);
48file_relay_error_t file_relay_client_free(file_relay_client_t client);
49
50file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, idevice_connection_t *connection);
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif
diff --git a/include/libimobiledevice/installation_proxy.h b/include/libimobiledevice/installation_proxy.h
new file mode 100644
index 0000000..22e76b1
--- /dev/null
+++ b/include/libimobiledevice/installation_proxy.h
@@ -0,0 +1,72 @@
1/**
2 * @file libimobiledevice/installation_proxy.h
3 * @brief Implementation to talk to the installation proxy on a device
4 * \internal
5 *
6 * Copyright (c) 2009 Nikias Bassen All Rights Reserved.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef INSTALLATION_PROXY_H
24#define INSTALLATION_PROXY_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <libimobiledevice/libimobiledevice.h>
31#include <glib.h>
32
33/* Error Codes */
34#define INSTPROXY_E_SUCCESS 0
35#define INSTPROXY_E_INVALID_ARG -1
36#define INSTPROXY_E_PLIST_ERROR -2
37#define INSTPROXY_E_CONN_FAILED -3
38#define INSTPROXY_E_OP_IN_PROGRESS -4
39#define INSTPROXY_E_OP_FAILED -5
40
41#define INSTPROXY_E_UNKNOWN_ERROR -256
42
43typedef int16_t instproxy_error_t;
44
45struct instproxy_client_int;
46typedef struct instproxy_client_int *instproxy_client_t;
47
48typedef void (*instproxy_status_cb_t) (const char *operation, plist_t status);
49
50/* Interface */
51instproxy_error_t instproxy_client_new(idevice_t device, uint16_t port, instproxy_client_t *client);
52instproxy_error_t instproxy_client_free(instproxy_client_t client);
53
54instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result);
55instproxy_error_t instproxy_install(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb);
56instproxy_error_t instproxy_upgrade(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb);
57instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb);
58
59instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result);
60instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb);
61instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb);
62instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb);
63
64plist_t instproxy_client_options_new();
65void instproxy_client_options_add(plist_t client_options, ...) G_GNUC_NULL_TERMINATED;
66void instproxy_client_options_free(plist_t client_options);
67
68#ifdef __cplusplus
69}
70#endif
71
72#endif
diff --git a/include/libimobiledevice/libimobiledevice.h b/include/libimobiledevice/libimobiledevice.h
new file mode 100644
index 0000000..87b078a
--- /dev/null
+++ b/include/libimobiledevice/libimobiledevice.h
@@ -0,0 +1,102 @@
1/**
2 * @file libimobiledevice/libimobiledevice.h
3 * @brief Common code and device handling
4 * \internal
5 *
6 * Copyright (c) 2008 Jonathan Beck All Rights Reserved.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef LIBIMOBILEDEVICE_H
24#define LIBIMOBILEDEVICE_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <stdint.h>
31#include <sys/types.h>
32#include <sys/stat.h>
33#include <plist/plist.h>
34
35/* Error Codes */
36#define IDEVICE_E_SUCCESS 0
37#define IDEVICE_E_INVALID_ARG -1
38#define IDEVICE_E_UNKNOWN_ERROR -2
39#define IDEVICE_E_NO_DEVICE -3
40#define IDEVICE_E_NOT_ENOUGH_DATA -4
41#define IDEVICE_E_BAD_HEADER -5
42#define IDEVICE_E_SSL_ERROR -6
43
44typedef int16_t idevice_error_t;
45
46struct idevice_int;
47typedef struct idevice_int *idevice_t;
48
49struct idevice_connection_int;
50typedef struct idevice_connection_int *idevice_connection_t;
51
52/* generic */
53void idevice_set_debug_level(int level);
54
55/* discovery (events/asynchronous) */
56// event type
57enum idevice_event_type {
58 IDEVICE_DEVICE_ADD = 1,
59 IDEVICE_DEVICE_REMOVE
60};
61
62// event data structure
63typedef struct {
64 enum idevice_event_type event;
65 const char *uuid;
66 int conn_type;
67} idevice_event_t;
68
69// event callback function prototype
70typedef void (*idevice_event_cb_t) (const idevice_event_t *event, void *user_data);
71
72// functions
73idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data);
74idevice_error_t idevice_event_unsubscribe();
75
76/* discovery (synchronous) */
77idevice_error_t idevice_get_device_list(char ***devices, int *count);
78idevice_error_t idevice_device_list_free(char **devices);
79
80/* device structure creation and destruction */
81idevice_error_t idevice_new(idevice_t *device, const char *uuid);
82idevice_error_t idevice_free(idevice_t device);
83
84/* connection/disconnection */
85idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connection_t *connection);
86idevice_error_t idevice_disconnect(idevice_connection_t connection);
87
88/* communication */
89idevice_error_t idevice_connection_send(idevice_connection_t connection, const char *data, uint32_t len, uint32_t *sent_bytes);
90idevice_error_t idevice_connection_receive_timeout(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout);
91idevice_error_t idevice_connection_receive(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes);
92
93/* misc */
94idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle);
95idevice_error_t idevice_get_uuid(idevice_t device, char **uuid);
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif
102
diff --git a/include/libimobiledevice/lockdown.h b/include/libimobiledevice/lockdown.h
new file mode 100644
index 0000000..49c708d
--- /dev/null
+++ b/include/libimobiledevice/lockdown.h
@@ -0,0 +1,99 @@
1/**
2 * @file libimobiledevice/lockdown.h
3 * @brief Communcation with the lockdown device daemon
4 * \internal
5 *
6 * Copyright (c) 2008 Zach C. All Rights Reserved.
7 * Copyright (c) 2009 Martin S. All Rights Reserved.
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23
24#ifndef LOCKDOWN_H
25#define LOCKDOWN_H
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#include <libimobiledevice/libimobiledevice.h>
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#define LOCKDOWN_E_ACTIVATION_FAILED -13
48#define LOCKDOWN_E_PASSWORD_PROTECTED -14
49#define LOCKDOWN_E_NO_RUNNING_SESSION -15
50#define LOCKDOWN_E_INVALID_HOST_ID -16
51#define LOCKDOWN_E_INVALID_SERVICE -17
52
53#define LOCKDOWN_E_UNKNOWN_ERROR -256
54
55typedef int16_t lockdownd_error_t;
56
57struct lockdownd_client_int;
58typedef struct lockdownd_client_int *lockdownd_client_t;
59
60struct lockdownd_pair_record {
61 char *device_certificate;
62 char *host_certificate;
63 char *host_id;
64 char *root_certificate;
65};
66typedef struct lockdownd_pair_record *lockdownd_pair_record_t;
67
68/* Interface */
69lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *client, const char *label);
70lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdownd_client_t *client, const char *label);
71lockdownd_error_t lockdownd_client_free(lockdownd_client_t client);
72
73lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type);
74lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *domain, const char *key, plist_t *value);
75lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value);
76lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key);
77lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *service, uint16_t *port);
78lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char *host_id, char **session_id, int *ssl_enabled);
79lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id);
80lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist);
81lockdownd_error_t lockdownd_receive(lockdownd_client_t client, plist_t *plist);
82lockdownd_error_t lockdownd_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record);
83lockdownd_error_t lockdownd_validate_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record);
84lockdownd_error_t lockdownd_unpair(lockdownd_client_t client, lockdownd_pair_record_t pair_record);
85lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activation_record);
86lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client);
87lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client);
88lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client);
89
90/* Helper */
91void lockdownd_client_set_label(lockdownd_client_t client, const char *label);
92lockdownd_error_t lockdownd_get_device_uuid(lockdownd_client_t control, char **uuid);
93lockdownd_error_t lockdownd_get_device_name(lockdownd_client_t client, char **device_name);
94
95#ifdef __cplusplus
96}
97#endif
98
99#endif
diff --git a/include/libimobiledevice/mobilebackup.h b/include/libimobiledevice/mobilebackup.h
new file mode 100644
index 0000000..e51d4c1
--- /dev/null
+++ b/include/libimobiledevice/mobilebackup.h
@@ -0,0 +1,55 @@
1/**
2 * @file libimobiledevice/mobilebackup.h
3 * @brief MobileBackup Implementation
4 * \internal
5 *
6 * Copyright (c) 2009 Martin Szulecki All Rights Reserved.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef IMOBILEBACKUP_H
24#define IMOBILEBACKUP_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <libimobiledevice/libimobiledevice.h>
31
32/* Error Codes */
33#define MOBILEBACKUP_E_SUCCESS 0
34#define MOBILEBACKUP_E_INVALID_ARG -1
35#define MOBILEBACKUP_E_PLIST_ERROR -2
36#define MOBILEBACKUP_E_MUX_ERROR -3
37#define MOBILEBACKUP_E_BAD_VERSION -4
38
39#define MOBILEBACKUP_E_UNKNOWN_ERROR -256
40
41typedef int16_t mobilebackup_error_t;
42
43struct mobilebackup_client_int;
44typedef struct mobilebackup_client_int *mobilebackup_client_t;
45
46mobilebackup_error_t mobilebackup_client_new(idevice_t device, uint16_t port, mobilebackup_client_t * client);
47mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client);
48mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t *plist);
49mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist);
50
51#ifdef __cplusplus
52}
53#endif
54
55#endif
diff --git a/include/libimobiledevice/mobilesync.h b/include/libimobiledevice/mobilesync.h
new file mode 100644
index 0000000..349b6a3
--- /dev/null
+++ b/include/libimobiledevice/mobilesync.h
@@ -0,0 +1,55 @@
1/**
2 * @file libimobiledevice/mobilesync.h
3 * @brief MobileSync Implementation
4 * \internal
5 *
6 * Copyright (c) 2009 Jonathan Beck All Rights Reserved.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef IMOBILESYNC_H
24#define IMOBILESYNC_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <libimobiledevice/libimobiledevice.h>
31
32/* Error Codes */
33#define MOBILESYNC_E_SUCCESS 0
34#define MOBILESYNC_E_INVALID_ARG -1
35#define MOBILESYNC_E_PLIST_ERROR -2
36#define MOBILESYNC_E_MUX_ERROR -3
37#define MOBILESYNC_E_BAD_VERSION -4
38
39#define MOBILESYNC_E_UNKNOWN_ERROR -256
40
41typedef int16_t mobilesync_error_t;
42
43struct mobilesync_client_int;
44typedef struct mobilesync_client_int *mobilesync_client_t;
45
46mobilesync_error_t mobilesync_client_new(idevice_t device, uint16_t port, mobilesync_client_t * client);
47mobilesync_error_t mobilesync_client_free(mobilesync_client_t client);
48mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist);
49mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist);
50
51#ifdef __cplusplus
52}
53#endif
54
55#endif
diff --git a/include/libimobiledevice/notification_proxy.h b/include/libimobiledevice/notification_proxy.h
new file mode 100644
index 0000000..adbb4cc
--- /dev/null
+++ b/include/libimobiledevice/notification_proxy.h
@@ -0,0 +1,88 @@
1/**
2 * @file libimobiledevice/notification_proxy.h
3 * @brief Implementation to talk to the notification proxy on a device
4 * \internal
5 *
6 * Copyright (c) 2009 Nikias Bassen All Rights Reserved.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef NOTIFICATION_PROXY_H
24#define NOTIFICATION_PROXY_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <libimobiledevice/libimobiledevice.h>
31
32/* Error Codes */
33#define NP_E_SUCCESS 0
34#define NP_E_INVALID_ARG -1
35#define NP_E_PLIST_ERROR -2
36#define NP_E_CONN_FAILED -3
37
38#define NP_E_UNKNOWN_ERROR -256
39
40typedef int16_t np_error_t;
41
42/* Notification IDs for use with post_notification (client --> device) */
43#define NP_SYNC_WILL_START "com.apple.itunes-mobdev.syncWillStart"
44#define NP_SYNC_DID_START "com.apple.itunes-mobdev.syncDidStart"
45#define NP_SYNC_DID_FINISH "com.apple.itunes-mobdev.syncDidFinish"
46#define NP_SYNC_LOCK_REQUEST "com.apple.itunes-mobdev.syncLockRequest"
47
48/* Notification IDs for use with observe_notification (device --> client) */
49#define NP_SYNC_CANCEL_REQUEST "com.apple.itunes-client.syncCancelRequest"
50#define NP_SYNC_SUSPEND_REQUEST "com.apple.itunes-client.syncSuspendRequest"
51#define NP_SYNC_RESUME_REQUEST "com.apple.itunes-client.syncResumeRequest"
52#define NP_PHONE_NUMBER_CHANGED "com.apple.mobile.lockdown.phone_number_changed"
53#define NP_DEVICE_NAME_CHANGED "com.apple.mobile.lockdown.device_name_changed"
54#define NP_TIMEZONE_CHANGED "com.apple.mobile.lockdown.timezone_changed"
55#define NP_TRUSTED_HOST_ATTACHED "com.apple.mobile.lockdown.trusted_host_attached"
56#define NP_HOST_DETACHED "com.apple.mobile.lockdown.host_detached"
57#define NP_HOST_ATTACHED "com.apple.mobile.lockdown.host_attached"
58#define NP_REGISTRATION_FAILED "com.apple.mobile.lockdown.registration_failed"
59#define NP_ACTIVATION_STATE "com.apple.mobile.lockdown.activation_state"
60#define NP_BRICK_STATE "com.apple.mobile.lockdown.brick_state"
61#define NP_DS_DOMAIN_CHANGED "com.apple.mobile.data_sync.domain_changed"
62#define NP_BACKUP_DOMAIN_CHANGED "com.apple.mobile.backup.domain_changed"
63#define NP_APP_INSTALLED "com.apple.mobile.application_installed"
64#define NP_APP_UNINSTALLED "com.apple.mobile.application_uninstalled"
65#define NP_DEV_IMAGE_MOUNTED "com.apple.mobile.developer_image_mounted"
66#define NP_ATTEMPTACTIVATION "com.apple.springboard.attemptactivation"
67#define NP_ITDBPREP_DID_END "com.apple.itdbprep.notification.didEnd"
68#define NP_LANGUAGE_CHANGED "com.apple.language.changed"
69#define NP_ADDRESS_BOOK_PREF_CHANGED "com.apple.AddressBook.PreferenceChanged"
70
71struct np_client_int;
72typedef struct np_client_int *np_client_t;
73
74typedef void (*np_notify_cb_t) (const char *notification);
75
76/* Interface */
77np_error_t np_client_new(idevice_t device, uint16_t port, np_client_t *client);
78np_error_t np_client_free(np_client_t client);
79np_error_t np_post_notification(np_client_t client, const char *notification);
80np_error_t np_observe_notification(np_client_t client, const char *notification);
81np_error_t np_observe_notifications(np_client_t client, const char **notification_spec);
82np_error_t np_set_notify_callback(np_client_t client, np_notify_cb_t notify_cb);
83
84#ifdef __cplusplus
85}
86#endif
87
88#endif
diff --git a/include/libimobiledevice/sbservices.h b/include/libimobiledevice/sbservices.h
new file mode 100644
index 0000000..921d6be
--- /dev/null
+++ b/include/libimobiledevice/sbservices.h
@@ -0,0 +1,56 @@
1/**
2 * @file libimobiledevice/sbservices.h
3 * @brief Implementation to talk to com.apple.springboardservices on a device
4 * \internal
5 *
6 * Copyright (c) 2009 Nikias Bassen All Rights Reserved.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef SB_SERVICES_H
24#define SB_SERVICES_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <libimobiledevice/libimobiledevice.h>
31
32/* Error Codes */
33#define SBSERVICES_E_SUCCESS 0
34#define SBSERVICES_E_INVALID_ARG -1
35#define SBSERVICES_E_PLIST_ERROR -2
36#define SBSERVICES_E_CONN_FAILED -3
37
38#define SBSERVICES_E_UNKNOWN_ERROR -256
39
40typedef int16_t sbservices_error_t;
41
42struct sbservices_client_int;
43typedef struct sbservices_client_int *sbservices_client_t;
44
45/* Interface */
46sbservices_error_t sbservices_client_new(idevice_t device, uint16_t port, sbservices_client_t *client);
47sbservices_error_t sbservices_client_free(sbservices_client_t client);
48sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state);
49sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate);
50sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize);
51
52#ifdef __cplusplus
53}
54#endif
55
56#endif