diff options
author | Martin Szulecki | 2010-01-08 13:40:19 +0100 |
---|---|---|
committer | Martin Szulecki | 2010-01-08 13:40:19 +0100 |
commit | 107c79fe9a2171ada3090abdf692f6f6ef523b29 (patch) | |
tree | 4d6b624c6414f11623843c0db8133d281f526916 | |
parent | 277e526c6b1fd10ff4661afb7e1d6dc022dc0225 (diff) | |
download | libimobiledevice-107c79fe9a2171ada3090abdf692f6f6ef523b29.tar.gz libimobiledevice-107c79fe9a2171ada3090abdf692f6f6ef523b29.tar.bz2 |
Update msync developer example to latest plist Python API
-rwxr-xr-x | dev/msync.py | 26 |
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() |