From 8f239549c124d11eb8899aec6c048d6a496e3911 Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Thu, 8 Jan 2009 23:27:28 +0100 Subject: Implement skeleton of MobileSync protocol (handshake and goodbye). --- src/MobileSync.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/MobileSync.h (limited to 'src/MobileSync.h') diff --git a/src/MobileSync.h b/src/MobileSync.h new file mode 100644 index 0000000..d7c774e --- /dev/null +++ b/src/MobileSync.h @@ -0,0 +1,41 @@ +/* + * MobileSync.h + * Definitions for the built-in MobileSync client + * + * Copyright (c) 2009 Jonathan Beck 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 MOBILESYNC_H +#define MOBILESYNC_H + +#include "usbmux.h" +#include "iphone.h" + +struct iphone_msync_client_int; +typedef struct iphone_msync_client_int *iphone_msync_client_t; + +struct iphone_msync_client_int { + iphone_umux_client_t connection; +}; + +iphone_error_t iphone_msync_new_client(iphone_device_t device, int src_port, int dst_port, + iphone_msync_client_t * client); +void iphone_msync_free_client(iphone_msync_client_t client); + +iphone_error_t iphone_msync_recv(iphone_msync_client_t client, char **dump_data, uint32_t * recv_bytes); +iphone_error_t iphone_msync_send(iphone_msync_client_t client, char *raw_data, uint32_t length, uint32_t * sent_bytes); + +#endif -- cgit v1.1-32-gdbae From f3c08cfad0833d55a69ca3d54d9920a3cb558328 Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Fri, 9 Jan 2009 19:24:27 +0100 Subject: Change msync recv and send functions to only deal with abstract plists. Start full address book dump function. Update to new logging mechanism. --- src/MobileSync.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/MobileSync.h') diff --git a/src/MobileSync.h b/src/MobileSync.h index d7c774e..b59547c 100644 --- a/src/MobileSync.h +++ b/src/MobileSync.h @@ -23,6 +23,9 @@ #include "usbmux.h" #include "iphone.h" +#include "utils.h" + +#include struct iphone_msync_client_int; typedef struct iphone_msync_client_int *iphone_msync_client_t; @@ -35,7 +38,9 @@ iphone_error_t iphone_msync_new_client(iphone_device_t device, int src_port, int iphone_msync_client_t * client); void iphone_msync_free_client(iphone_msync_client_t client); -iphone_error_t iphone_msync_recv(iphone_msync_client_t client, char **dump_data, uint32_t * recv_bytes); -iphone_error_t iphone_msync_send(iphone_msync_client_t client, char *raw_data, uint32_t length, uint32_t * sent_bytes); +iphone_error_t iphone_msync_recv(iphone_msync_client_t client, plist_t * plist); +iphone_error_t iphone_msync_send(iphone_msync_client_t client, plist_t plist); + +iphone_error_t iphone_msync_get_all_contacts(iphone_msync_client_t client); #endif -- cgit v1.1-32-gdbae From d4694679f918750e920a2238d891cd2fbb741a90 Mon Sep 17 00:00:00 2001 From: Jonathan Beck Date: Tue, 13 Jan 2009 18:57:52 +0100 Subject: Add parts of a python binding to libiphone that also include libplist (using SWIG). --- src/MobileSync.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/MobileSync.h') diff --git a/src/MobileSync.h b/src/MobileSync.h index b59547c..7655b59 100644 --- a/src/MobileSync.h +++ b/src/MobileSync.h @@ -27,19 +27,12 @@ #include -struct iphone_msync_client_int; -typedef struct iphone_msync_client_int *iphone_msync_client_t; + struct iphone_msync_client_int { iphone_umux_client_t connection; }; -iphone_error_t iphone_msync_new_client(iphone_device_t device, int src_port, int dst_port, - iphone_msync_client_t * client); -void iphone_msync_free_client(iphone_msync_client_t client); - -iphone_error_t iphone_msync_recv(iphone_msync_client_t client, plist_t * plist); -iphone_error_t iphone_msync_send(iphone_msync_client_t client, plist_t plist); iphone_error_t iphone_msync_get_all_contacts(iphone_msync_client_t client); -- cgit v1.1-32-gdbae