summaryrefslogtreecommitdiffstats
path: root/dev
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-01-08 13:40:19 +0100
committerGravatar Martin Szulecki2010-01-08 13:40:19 +0100
commit107c79fe9a2171ada3090abdf692f6f6ef523b29 (patch)
tree4d6b624c6414f11623843c0db8133d281f526916 /dev
parent277e526c6b1fd10ff4661afb7e1d6dc022dc0225 (diff)
downloadlibimobiledevice-107c79fe9a2171ada3090abdf692f6f6ef523b29.tar.gz
libimobiledevice-107c79fe9a2171ada3090abdf692f6f6ef523b29.tar.bz2
Update msync developer example to latest plist Python API
Diffstat (limited to 'dev')
-rwxr-xr-xdev/msync.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/dev/msync.py b/dev/msync.py
index fe7f1fd..6bb85d7 100755
--- a/dev/msync.py
+++ b/dev/msync.py
@@ -1,6 +1,7 @@
#! /usr/bin/env python
-from libiphone.iPhone import *
+from iphone import *
+from plist import *
# get msync client
def GetMobileSyncClient() :
@@ -24,17 +25,18 @@ msync = GetMobileSyncClient()
if not msync :
exit(1)
-array = PListNode(PLIST_ARRAY)
-array.add_sub_string("SDMessageSyncDataClassWithDevice")
-array.add_sub_string("com.apple.Contacts");
-array.add_sub_string("---");
-array.add_sub_string("2009-01-13 22:25:58 +0100");
-array.add_sub_uint(106);
-array.add_sub_string("___EmptyParameterString___");
-
-msync.send(array)
-array = msync.receive()
-print array.to_xml()
+a = Array()
+a.append( String("SDMessageSyncDataClassWithDevice") )
+a.append( String("") )
+a.append( String("com.apple.Contacts") )
+a.append( String("---") )
+a.append( String("2009-01-13 22:25:58 +0100") )
+a.append( Integer(106) )
+a.append( String("___EmptyParameterString___") )
+
+msync.send(a)
+a = msync.receive()
+print a.to_xml()