Monotone-Parent: 91dd6d07cd2a752896f5efd6ce493656b0ec13ea

Monotone-Revision: c5bd8349d3bd533853811e2ced9d7a0f040f66e8

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-08-04T22:49:24
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2006-08-04 22:49:24 +00:00
parent 04116b854d
commit 046fd5c270
3 changed files with 119 additions and 0 deletions

View File

@ -1,5 +1,10 @@
2006-08-04 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Contacts/SOGoPersonalAB.[hm]: new class module
implementing the SOGoContactSource protocol. Does nothing
currently but will be used to implement access to the personal
address book of the user stored in the SOGo database.
* SoObjects/Contacts/SOGoContactSource.h: new "SOGoContactSource"
protocol defining an API common to all possible types of contact
sources.

View File

@ -0,0 +1,42 @@
/* SOGoPersonalAB.h - this file is part of SOGo
*
* Copyright (C) 2006 Inverse groupe conseil
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* 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
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef SOGOPERSONALAB_H
#define SOGOPERSONALAB_H
#import "SOGoContactSource.h"
@class NSObject;
@class NSString;
@interface SOGoPersonalAB : NSObject <SOGoContactSource>
{
NSString *username;
}
+ (id) personalABForUser: (NSString *) user;
- (void) setUsername: (NSString *) user;
@end
#endif /* SOGOPERSONALAB_H */

View File

@ -0,0 +1,72 @@
/* SOGoPersonalAB.m - this file is part of SOGo
*
* Copyright (C) 2006 Inverse groupe conseil
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* 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
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSString.h>
#import "SOGoPersonalAB.h"
@implementation SOGoPersonalAB
+ (id) personalABForUser: (NSString *) user
{
id newAB;
newAB = [self new];
[newAB setUsername: user];
return newAB;
}
- (id) init
{
if ((self = [super init]))
{
username = nil;
}
return self;
}
- (void) dealloc
{
if (username)
[username release];
[super dealloc];
}
- (void) setUsername: (NSString *) user
{
if (username)
[username release];
username = user;
if (username)
[username retain];
}
- (SOGoContactRecord *) lookupRecordWithId: (NSString *) recordId
{
NSLog (@"returning nothing for '%@'", recordId);
return nil;
}
@end