diff options
| -rwxr-xr-x | dev/msync.py | 26 |
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 |
| 6 | def GetMobileSyncClient() : | 6 | def 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 | ||
| 27 | array = PListNode(PLIST_ARRAY) | 27 | array = PListNode(PLIST_ARRAY) |
| 28 | array.AddSubString("SDMessageSyncDataClassWithDevice") | 28 | array.add_sub_string("SDMessageSyncDataClassWithDevice") |
| 29 | array.AddSubString("com.apple.Contacts"); | 29 | array.add_sub_string("com.apple.Contacts"); |
| 30 | array.AddSubString("---"); | 30 | array.add_sub_string("---"); |
| 31 | array.AddSubString("2009-01-13 22:25:58 +0100"); | 31 | array.add_sub_string("2009-01-13 22:25:58 +0100"); |
| 32 | array.AddSubUInt(106); | 32 | array.add_sub_uint(106); |
| 33 | array.AddSubString("___EmptyParameterString___"); | 33 | array.add_sub_string("___EmptyParameterString___"); |
| 34 | 34 | ||
| 35 | msync.Send(array) | 35 | msync.send(array) |
| 36 | array = msync.Receive() | 36 | array = msync.receive() |
| 37 | print array.ToXml() | 37 | print array.to_xml() |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | 40 | ||
