Changeset 24069
- Timestamp:
- 06/25/2008 12:07:26 AM (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/adium_syncservices/SyncServices/resources/ClientDescription.plist
r24068 r24069 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 3 4 <!-- ClientDescription.plist --> 5 <!-- Adium --> 6 <!-- Created by Stephen Holt on 6/24/08. --> 7 <!-- Copyright 2008 __MyCompanyName__. All rights reserved. --> 8 2 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 9 3 <plist version="1.0"> 10 4 <dict> 11 5 <key>DisplayName</key> 12 <string>Adium </string>6 <string>AdiumSyncHelper</string> 13 7 <key>Entities</key> 14 8 <dict> … … 17 11 <string>com.apple.syncservices.RecordEntityName</string> 18 12 <string>first name</string> 19 <!-- <string>aRelationship</string> -->20 13 </array> 21 14 </dict> branches/adium_syncservices/SyncServices/source/AdiumSyncHelper.h
r24068 r24069 12 12 #import "ASHDummyAdium.h" 13 13 14 #define ADIUM_SYNC_HELPER_IDENTIFIER @"com.adiumx.AdiumSyncHelper" 15 #define ADIUM_SYNC_SCHEMA_NAME @"AdiumSyncSchema" 14 #define ADIUM_SYNC_HELPER_IDENTIFIER @"com.adiumx.AdiumSyncHelper" 15 #define ADIUM_SYNC_SCHEMA_NAME @"AdiumSyncSchema" 16 17 #define LAST_SYNC_KEY @"lastSync" 18 19 #define ACCOUNT_ENTITY_NAME @"com.adiumx.Account" 16 20 17 21 @protocol AIAdium; branches/adium_syncservices/SyncServices/source/AdiumSyncHelper.m
r24068 r24069 38 38 } 39 39 40 //[self syncCleanup];40 [self syncCleanup]; 41 41 } 42 42 … … 61 61 } 62 62 63 //- (void)negotiateSession:(ISyncSession *)syncSession 64 //{ 65 //} 63 - (void)negotiateSession:(ISyncSession *)syncSession 64 { 65 [[NSUserDefaults standardUserDefaults] setObject:[NSDate date] forKey:LAST_SYNC_KEY]; 66 } 66 67 67 68 #pragma mark push/pull 68 69 - (void)pushDataForSession:(ISyncSession *)syncSession 69 70 { 71 if([syncSession shouldPushAllRecordsForEntityName:ACCOUNT_ENTITY_NAME]) { 72 NSEnumerator *enumerator = [[adium accountController] accounts]; 73 AIAccount *account; 74 75 while ((account = [enumerator nextObject])) { 76 NSDictionary *syncRecord = [self convertAccountToSyncRecord:account]; 77 [syncSession pushChangesFromRecord:syncRecord withIdentifier:[account UID]]; 78 } 79 } else if ([syncSession shouldPushChangesForEntityName:ACCOUNT_ENTITY_NAME]) { 80 NSDate *lastSync = [[NSUserDefaults standardUserDefaults] objectForKey:LAST_SYNC_KEY]; 81 } 70 82 } 71 83