mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-04 02:55:26 +00:00
Code generalization to be usable from the ActiveSync bundle
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
/* SOGoContactFolders.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006, 2007 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2006-2013 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -31,6 +29,8 @@
|
||||
withDisplayName: (NSString *) newDisplayName;
|
||||
- (NSException *) removeLDAPAddressBook: (NSString *) sourceID;
|
||||
|
||||
- (NSDictionary *) systemSources;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* SOGOCONTACTFOLDERS_H */
|
||||
|
||||
@@ -110,8 +110,9 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSException *) appendSystemSources
|
||||
- (NSDictionary *) systemSources
|
||||
{
|
||||
NSMutableDictionary *systemSources;
|
||||
SOGoUserManager *um;
|
||||
SOGoSystemDefaults *sd;
|
||||
NSEnumerator *sourceIDs, *domains;
|
||||
@@ -119,6 +120,8 @@
|
||||
SOGoContactSourceFolder *currentFolder;
|
||||
SOGoUser *currentUser;
|
||||
|
||||
systemSources = [NSMutableDictionary dictionary];
|
||||
|
||||
if (! ([[context request] isIPhoneAddressBookApp] &&
|
||||
![[context request] isAndroid]))
|
||||
{
|
||||
@@ -143,13 +146,20 @@
|
||||
andDisplayName: srcDisplayName
|
||||
inContainer: self];
|
||||
[currentFolder setSource: [um sourceWithID: currentSourceID]];
|
||||
[subFolders setObject: currentFolder forKey: currentSourceID];
|
||||
[systemSources setObject: currentFolder forKey: currentSourceID];
|
||||
}
|
||||
domain = [domains nextObject];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return systemSources;
|
||||
}
|
||||
|
||||
- (NSException *) appendSystemSources
|
||||
{
|
||||
[subFolders addEntriesFromDictionary: [self systemSources]];
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* SOGoContactGCSEntry.h - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006-2012 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
* Copyright (C) 2006-2014 Inverse inc.
|
||||
*
|
||||
* This file is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -159,6 +157,12 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSException *) saveComponent: (NGVCard *) newCard
|
||||
{
|
||||
ASSIGN(card, newCard);
|
||||
return [self save];
|
||||
}
|
||||
|
||||
- (NSException *) saveContentString: (NSString *) newContent
|
||||
baseVersion: (unsigned int) newVersion
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user