From 79fcf91cc86574257539fb45b0b6d1a1c64852c5 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sun, 24 Jan 2010 02:45:22 +0100 Subject: Add service code and a backup tool for mobilebackup support --- include/libiphone/mobilebackup.h | 55 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 include/libiphone/mobilebackup.h (limited to 'include/libiphone') diff --git a/include/libiphone/mobilebackup.h b/include/libiphone/mobilebackup.h new file mode 100644 index 0000000..8db6758 --- /dev/null +++ b/include/libiphone/mobilebackup.h @@ -0,0 +1,55 @@ +/** + * @file libiphone/mobilebackup.h + * @brief MobileBackup Implementation + * \internal + * + * Copyright (c) 2009 Martin Szulecki All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef IMOBILEBACKUP_H +#define IMOBILEBACKUP_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* Error Codes */ +#define MOBILEBACKUP_E_SUCCESS 0 +#define MOBILEBACKUP_E_INVALID_ARG -1 +#define MOBILEBACKUP_E_PLIST_ERROR -2 +#define MOBILEBACKUP_E_MUX_ERROR -3 +#define MOBILEBACKUP_E_BAD_VERSION -4 + +#define MOBILEBACKUP_E_UNKNOWN_ERROR -256 + +typedef int16_t mobilebackup_error_t; + +struct mobilebackup_client_int; +typedef struct mobilebackup_client_int *mobilebackup_client_t; + +mobilebackup_error_t mobilebackup_client_new(iphone_device_t device, uint16_t port, mobilebackup_client_t * client); +mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client); +mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t *plist); +mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist); + +#ifdef __cplusplus +} +#endif + +#endif -- cgit v1.1-32-gdbae From bbfd5355b9bb25ece2da83af93ac3cdd01bc41c7 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Mon, 25 Jan 2010 00:24:31 +0100 Subject: New file_relay service implementation. --- include/libiphone/file_relay.h | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 include/libiphone/file_relay.h (limited to 'include/libiphone') diff --git a/include/libiphone/file_relay.h b/include/libiphone/file_relay.h new file mode 100644 index 0000000..672f1bd --- /dev/null +++ b/include/libiphone/file_relay.h @@ -0,0 +1,56 @@ +/** + * @file libiphone/file_relay.h + * @brief file_relay Implementation + * \internal + * + * Copyright (c) 2010 Nikias Bassen All Rights Reserved. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef IFILE_RELAY_H +#define IFILE_RELAY_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* Error Codes */ +#define FILE_RELAY_E_SUCCESS 0 +#define FILE_RELAY_E_INVALID_ARG -1 +#define FILE_RELAY_E_PLIST_ERROR -2 +#define FILE_RELAY_E_MUX_ERROR -3 +#define FILE_RELAY_E_INVALID_SOURCE -4 +#define FILE_RELAY_E_STAGING_EMPTY -5 + +#define FILE_RELAY_E_UNKNOWN_ERROR -256 + +typedef int16_t file_relay_error_t; + +struct file_relay_client_int; +typedef struct file_relay_client_int *file_relay_client_t; + +file_relay_error_t file_relay_client_new(iphone_device_t device, uint16_t port, file_relay_client_t *client); +file_relay_error_t file_relay_client_free(file_relay_client_t client); + +file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, iphone_connection_t *connection); + +#ifdef __cplusplus +} +#endif + +#endif -- cgit v1.1-32-gdbae From b8e381953642c33ffe61387fad0ac0ac6516b95a Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 26 Jan 2010 02:48:14 +0100 Subject: New post notification com.apple.itunes-mobdev.syncLockRequest --- include/libiphone/notification_proxy.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/libiphone') diff --git a/include/libiphone/notification_proxy.h b/include/libiphone/notification_proxy.h index b58fc68..962dd9b 100644 --- a/include/libiphone/notification_proxy.h +++ b/include/libiphone/notification_proxy.h @@ -43,6 +43,7 @@ typedef int16_t np_error_t; #define NP_SYNC_WILL_START "com.apple.itunes-mobdev.syncWillStart" #define NP_SYNC_DID_START "com.apple.itunes-mobdev.syncDidStart" #define NP_SYNC_DID_FINISH "com.apple.itunes-mobdev.syncDidFinish" +#define NP_SYNC_LOCK_REQUEST "com.apple.itunes-mobdev.syncLockRequest" /* Notification IDs for use with observe_notification (device --> client) */ #define NP_SYNC_CANCEL_REQUEST "com.apple.itunes-client.syncCancelRequest" -- cgit v1.1-32-gdbae