diff options
| author | 2010-01-08 13:40:19 +0100 | |
|---|---|---|
| committer | 2010-01-08 13:40:19 +0100 | |
| commit | 107c79fe9a2171ada3090abdf692f6f6ef523b29 (patch) | |
| tree | 4d6b624c6414f11623843c0db8133d281f526916 /dev | |
| parent | 277e526c6b1fd10ff4661afb7e1d6dc022dc0225 (diff) | |
| download | libimobiledevice-107c79fe9a2171ada3090abdf692f6f6ef523b29.tar.gz libimobiledevice-107c79fe9a2171ada3090abdf692f6f6ef523b29.tar.bz2 | |
Update msync developer example to latest plist Python API
Diffstat (limited to 'dev')
| -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 @@ | |||
| 1 | #! /usr/bin/env python | 1 | #! /usr/bin/env python |
| 2 | 2 | ||
| 3 | from libiphone.iPhone import * | 3 | from iphone import * |
| 4 | from plist import * | ||
| 4 | 5 | ||
| 5 | # get msync client | 6 | # get msync client |
| 6 | def GetMobileSyncClient() : | 7 | def GetMobileSyncClient() : |
| @@ -24,17 +25,18 @@ msync = GetMobileSyncClient() | |||
| 24 | if not msync : | 25 | if not msync : |
| 25 | exit(1) | 26 | exit(1) |
| 26 | 27 | ||
| 27 | array = PListNode(PLIST_ARRAY) | 28 | a = Array() |
| 28 | array.add_sub_string("SDMessageSyncDataClassWithDevice") | 29 | a.append( String("SDMessageSyncDataClassWithDevice") ) |
| 29 | array.add_sub_string("com.apple.Contacts"); | 30 | a.append( String("") ) |
| 30 | array.add_sub_string("---"); | 31 | a.append( String("com.apple.Contacts") ) |
| 31 | array.add_sub_string("2009-01-13 22:25:58 +0100"); | 32 | a.append( String("---") ) |
| 32 | array.add_sub_uint(106); | 33 | a.append( String("2009-01-13 22:25:58 +0100") ) |
| 33 | array.add_sub_string("___EmptyParameterString___"); | 34 | a.append( Integer(106) ) |
| 34 | 35 | a.append( String("___EmptyParameterString___") ) | |
| 35 | msync.send(array) | 36 | |
| 36 | array = msync.receive() | 37 | msync.send(a) |
| 37 | print array.to_xml() | 38 | a = msync.receive() |
| 39 | print a.to_xml() | ||
| 38 | 40 | ||
| 39 | 41 | ||
| 40 | 42 | ||
