mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-20 02:45:25 +00:00
Monotone-Parent: 4e23e038f2b0b7eddf8b30700b8c9a8910768f98
Monotone-Revision: 9235e5dc4d151a3cba8ad842ac39e1b2d18c8201 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-01-29T19:55:21 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -22,28 +22,38 @@
|
||||
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <Contacts/SOGoContactFolders.h>
|
||||
|
||||
#import "MAPIStoreContactsFolder.h"
|
||||
#import "MAPIStoreMapping.h"
|
||||
#import "MAPIStoreUserContext.h"
|
||||
|
||||
#import "MAPIStoreContactsContext.h"
|
||||
|
||||
#undef DEBUG
|
||||
#include <mapistore/mapistore.h>
|
||||
|
||||
static Class MAPIStoreContactsFolderK;
|
||||
|
||||
@implementation MAPIStoreContactsContext
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
MAPIStoreContactsFolderK = [MAPIStoreContactsFolder class];
|
||||
}
|
||||
|
||||
+ (NSString *) MAPIModuleName
|
||||
{
|
||||
return @"contacts";
|
||||
}
|
||||
|
||||
+ (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName
|
||||
withTDBIndexing: (struct tdb_wrap *) indexingTdb
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
struct mapistore_contexts_list *context;
|
||||
|
||||
context = talloc_zero(memCtx, struct mapistore_contexts_list);
|
||||
context->url = talloc_asprintf (context, "sogo://%s@contacts/",
|
||||
context->url = talloc_asprintf (context, "sogo://%s@contacts/personal",
|
||||
[userName UTF8String]);
|
||||
// context->name = "Carnet d'adresses personnel";
|
||||
context->main_folder = true;
|
||||
@@ -54,11 +64,14 @@
|
||||
return context;
|
||||
}
|
||||
|
||||
- (void) setupBaseFolder: (NSURL *) newURL
|
||||
- (Class) MAPIStoreFolderClass
|
||||
{
|
||||
baseFolder = [MAPIStoreContactsFolder baseFolderWithURL: newURL
|
||||
inContext: self];
|
||||
[baseFolder retain];
|
||||
return MAPIStoreContactsFolderK;
|
||||
}
|
||||
|
||||
- (id) rootSOGoFolder
|
||||
{
|
||||
return [userContext contactsRoot];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user