Changeset 24070
- Timestamp:
- 06/25/2008 11:07:15 AM (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/adium_syncservices/Frameworks/Adium Framework/Source/AIAccount.h
r23837 r24070 144 144 NSMutableArray *delayedUpdateStatusTargets; 145 145 NSTimer *silenceAllContactUpdatesTimer; 146 147 //Sync Tracking 148 NSDate *m_modificationDate; 146 149 } 147 150 … … 235 238 -(void)verifyCommand:(NSString*)commandName forChat:(AIChat*)chat; 236 239 240 //synching 241 - (void)accountModified; 242 - (void)setModificationDate:(NSDate *)date; 243 - (NSDate *)modificationDate; 237 244 @end 238 245 branches/adium_syncservices/Frameworks/Adium Framework/Source/AIAccount.m
r23862 r24070 860 860 { 861 861 //add stuff 862 } 863 864 #pragma mark Syncing 865 - (void)accountModified 866 { 867 if(m_modificationDate) 868 [m_modificationDate release]; 869 m_modificationDate = [[NSDate date] autorelease]; 870 } 871 872 - (void)setModificationDate:(NSDate *)date 873 { 874 if(m_modificationDate) 875 [m_modificationDate release]; 876 m_modificationDate = [date retain]; 877 } 878 879 - (NSDate *)modificationDate 880 { 881 return m_modificationDate; 862 882 } 863 883 branches/adium_syncservices/Source/AdiumAccounts.m
r20853 r24070 30 30 #define ACCOUNT_UID @"UID" //Account UID 31 31 #define ACCOUNT_OBJECT_ID @"ObjectID" //Account object ID 32 #define ACCOUNT_MOD_DATE @"ModificationDate" //Account last updated 32 33 33 34 @interface AdiumAccounts (PRIVATE) … … 150 151 { 151 152 [accounts addObject:inAccount]; 153 [inAccount accountModified]; 152 154 [self _saveAccounts]; 153 155 } … … 181 183 [accounts moveObject:account toIndex:destIndex]; 182 184 [self _saveAccounts]; 185 [account accountModified]; 183 186 return [accounts indexOfObject:account]; 184 187 } … … 191 194 - (void)accountDidChangeUID:(AIAccount *)account 192 195 { 196 [account accountModified]; 193 197 [self _saveAccounts]; 194 198 } … … 235 239 NSString *accountUID = [accountDict objectForKey:ACCOUNT_UID]; 236 240 NSString *internalObjectID = [accountDict objectForKey:ACCOUNT_OBJECT_ID]; 241 NSDate *accountUpdated = [accountDict objectForKey:ACCOUNT_MOD_DATE]; 237 242 238 243 //Create the account and add it to our array 239 244 if (service && accountUID && [accountUID length]) { 240 245 if ((newAccount = [service accountWithUID:accountUID internalObjectID:internalObjectID])) { 241 [accounts addObject:newAccount]; 246 [accounts addObject:newAccount]; 247 if (accountUpdated) [newAccount setModificationDate:accountUpdated]; 242 248 } else { 243 249 NSLog(@"Could not load account %@",accountDict); … … 342 348 [flatAccount setObject:[account UID] forKey:ACCOUNT_UID]; //Account UID 343 349 [flatAccount setObject:[account internalObjectID] forKey:ACCOUNT_OBJECT_ID]; //Account Object ID 350 [flatAccount setObject:[account modificationDate] forKey:ACCOUNT_MOD_DATE]; //Account last updated date 344 351 345 352 [flatAccounts addObject:flatAccount];