summaryrefslogtreecommitdiffstats
path: root/dev
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2009-04-13 21:08:37 +0200
committerGravatar Matt Colyer2009-04-19 15:10:05 -0700
commitbb2ce5fe74136cb3ce304a31641fb1e1a60dace7 (patch)
tree028da8f69b2269096815355017aa12188abbf5b8 /dev
parentded57a40188e0c07fac91719dd6bfd8ca44c423e (diff)
downloadlibimobiledevice-bb2ce5fe74136cb3ce304a31641fb1e1a60dace7.tar.gz
libimobiledevice-bb2ce5fe74136cb3ce304a31641fb1e1a60dace7.tar.bz2
Update msync.py example to latest Python API
Diffstat (limited to 'dev')
-rwxr-xr-xdev/msync.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/dev/msync.py b/dev/msync.py
index 4170f87..17e3121 100755
--- a/dev/msync.py
+++ b/dev/msync.py
@@ -5,14 +5,14 @@ from libiphone.iPhone import *
5# get msync client 5# get msync client
6def GetMobileSyncClient() : 6def GetMobileSyncClient() :
7 phone = iPhone() 7 phone = iPhone()
8 if not phone.InitDevice() : 8 if not phone.init_device() :
9 print "Couldn't find device, is it connected ?\n" 9 print "Couldn't find device, is it connected ?\n"
10 return None 10 return None
11 lckd = phone.GetLockdownClient() 11 lckd = phone.get_lockdown_client()
12 if not lckd : 12 if not lckd :
13 print "Failed to start lockdown service.\n" 13 print "Failed to start lockdown service.\n"
14 return None 14 return None
15 msync = lckd.GetMobileSyncClient() 15 msync = lckd.get_mobile_sync_client()
16 if not msync : 16 if not msync :
17 print "Failed to start mobilesync service.\n" 17 print "Failed to start mobilesync service.\n"
18 return None 18 return None
@@ -25,16 +25,16 @@ if not msync :
25 exit(1) 25 exit(1)
26 26
27array = PListNode(PLIST_ARRAY) 27array = PListNode(PLIST_ARRAY)
28array.AddSubString("SDMessageSyncDataClassWithDevice") 28array.add_sub_string("SDMessageSyncDataClassWithDevice")
29array.AddSubString("com.apple.Contacts"); 29array.add_sub_string("com.apple.Contacts");
30array.AddSubString("---"); 30array.add_sub_string("---");
31array.AddSubString("2009-01-13 22:25:58 +0100"); 31array.add_sub_string("2009-01-13 22:25:58 +0100");
32array.AddSubUInt(106); 32array.add_sub_uint(106);
33array.AddSubString("___EmptyParameterString___"); 33array.add_sub_string("___EmptyParameterString___");
34 34
35msync.Send(array) 35msync.send(array)
36array = msync.Receive() 36array = msync.receive()
37print array.ToXml() 37print array.to_xml()
38 38
39 39
40 40