summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-12-15 00:02:50 +0100
committerGravatar Matt Colyer2009-12-15 09:24:03 -0800
commitc6982451d82c340ee8a57c76e39db160c625a1a3 (patch)
tree25a2027f3033f1f6c3058d02f1fae4ce4a910392 /include
parent4c00fb43042a1e8d1a4e2d29827d00ed3144575f (diff)
downloadlibimobiledevice-c6982451d82c340ee8a57c76e39db160c625a1a3.tar.gz
libimobiledevice-c6982451d82c340ee8a57c76e39db160c625a1a3.tar.bz2
Support for new SBServices interface
This lockdown service has been introduced in firmware 3.1 and allows to re-arrange the Spr*ngboard icons from the computer. [#99 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am1
-rw-r--r--include/libiphone/sbservices.h56
2 files changed, 57 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index df7b823..5e25a58 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -2,4 +2,5 @@ nobase_include_HEADERS = libiphone/libiphone.h \
2 libiphone/lockdown.h \ 2 libiphone/lockdown.h \
3 libiphone/afc.h \ 3 libiphone/afc.h \
4 libiphone/notification_proxy.h \ 4 libiphone/notification_proxy.h \
5 libiphone/sbservices.h \
5 libiphone/mobilesync.h 6 libiphone/mobilesync.h
diff --git a/include/libiphone/sbservices.h b/include/libiphone/sbservices.h
new file mode 100644
index 0000000..6ea8189
--- /dev/null
+++ b/include/libiphone/sbservices.h
@@ -0,0 +1,56 @@
1/**
2 * @file libiphone/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 <libiphone/libiphone.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(iphone_device_t device, int dst_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