From: helge Date: Wed, 30 Jun 2004 08:47:12 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/trunk@97 d1b88da0-ebda-0310-925b-ed51d8... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56a9c0ff29677dd84d2bda49dc69ca2bc282c873;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/trunk@97 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/SoObjects/SOGo/GNUmakefile b/SOGo/SoObjects/SOGo/GNUmakefile index 288c3505..5952a4ea 100644 --- a/SOGo/SoObjects/SOGo/GNUmakefile +++ b/SOGo/SoObjects/SOGo/GNUmakefile @@ -11,10 +11,12 @@ libSOGo_HEADER_FILES_DIR = . libSOGo_HEADER_FILES_INSTALL_DIR = /SOGo libSOGo_HEADER_FILES = \ - SOGoObject.h + SOGoObject.h \ + SOGoFolder.h \ libSOGo_OBJC_FILES = \ - SOGoObject.m + SOGoObject.m \ + SOGoFolder.m \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/library.make diff --git a/SOGo/SoObjects/SOGo/GNUmakefile.preamble b/SOGo/SoObjects/SOGo/GNUmakefile.preamble new file mode 100644 index 00000000..b7822158 --- /dev/null +++ b/SOGo/SoObjects/SOGo/GNUmakefile.preamble @@ -0,0 +1,3 @@ +# $Id$ + +ADDITIONAL_INCLUDE_DIRS += -I.. diff --git a/SOGo/SoObjects/SOGo/SOGoFolder.h b/SOGo/SoObjects/SOGo/SOGoFolder.h new file mode 100644 index 00000000..26b7d1f5 --- /dev/null +++ b/SOGo/SoObjects/SOGo/SOGoFolder.h @@ -0,0 +1,34 @@ +/* + Copyright (C) 2004 SKYRIX Software AG + + This file is part of OpenGroupware.org. + + OGo is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + OGo 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 Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with OGo; see the file COPYING. If not, write to the + Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. +*/ +// $Id$ + +#ifndef __SOGo_SOGoFolder_H__ +#define __SOGo_SOGoFolder_H__ + +#include + +@interface SOGoFolder : SOGoObject +{ +} + +@end + +#endif /* __SOGo_SOGoFolder_H__ */ diff --git a/SOGo/SoObjects/SOGo/SOGoFolder.m b/SOGo/SoObjects/SOGo/SOGoFolder.m new file mode 100644 index 00000000..c282fbef --- /dev/null +++ b/SOGo/SoObjects/SOGo/SOGoFolder.m @@ -0,0 +1,38 @@ +/* + Copyright (C) 2004 SKYRIX Software AG + + This file is part of OpenGroupware.org. + + OGo is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + OGo 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 Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with OGo; see the file COPYING. If not, write to the + Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. +*/ +// $Id$ + +#include "SOGoFolder.h" +#include "common.h" + +@implementation SOGoFolder + +- (void)dealloc { + [super dealloc]; +} + +/* accessors */ + +- (BOOL)isFolderish { + return YES; +} + +@end /* SOGoFolder */ diff --git a/SOGo/SoObjects/SOGo/SOGoObject.h b/SOGo/SoObjects/SOGo/SOGoObject.h index b35f987a..26abe6cd 100644 --- a/SOGo/SoObjects/SOGo/SOGoObject.h +++ b/SOGo/SoObjects/SOGo/SOGoObject.h @@ -27,8 +27,17 @@ @interface SOGoObject : NSObject { + NSString *nameInContainer; + id container; } +- (id)initWithName:(NSString *)_name inContainer:(id)_container; + +/* accessors */ + +- (NSString *)nameInContainer; +- (id)container; + @end #endif /* __SoObjects_SOGoObject_H__ */ diff --git a/SOGo/SoObjects/SOGo/SOGoObject.m b/SOGo/SoObjects/SOGo/SOGoObject.m index 36480400..d79d02de 100644 --- a/SOGo/SoObjects/SOGo/SOGoObject.m +++ b/SOGo/SoObjects/SOGo/SOGoObject.m @@ -25,8 +25,36 @@ @implementation SOGoObject +- (BOOL)doesRetainContainer { + return YES; +} + +- (id)initWithName:(NSString *)_name inContainer:(id)_container { + if ((self = [super init])) { + self->nameInContainer = [_name copy]; + self->container = + [self doesRetainContainer] ? [_container retain] : _container; + } + return self; +} +- (id)init { + return [self initWithName:nil inContainer:nil]; +} + - (void)dealloc { + if ([self doesRetainContainer]) + [self->container release]; + [self->nameInContainer release]; [super dealloc]; } +/* accessors */ + +- (NSString *)nameInContainer { + return self->nameInContainer; +} +- (id)container { + return self->container; +} + @end /* SOGoObject */