From 9196e7bdff523bcfed373cd05b526cc71a09ace5 Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 7 Jun 2004 13:29:29 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/trunk@22 d1b88da0-ebda-0310-925b-ed51d893ca5b --- OGoContentStore/GNUmakefile | 2 ++ OGoContentStore/OCSChannelManager.h | 34 ++++++++++++++++++++++ OGoContentStore/OCSChannelManager.m | 32 ++++++++++++++++++++ OGoContentStore/OCSFolder.h | 17 +++++++++++ OGoContentStore/OCSFolder.m | 45 +++++++++++++++++++++++++++++ OGoContentStore/README | 1 + OGoContentStore/sql/folderinfo.psql | 24 +++++++++++++++ 7 files changed, 155 insertions(+) create mode 100644 OGoContentStore/OCSChannelManager.h create mode 100644 OGoContentStore/OCSChannelManager.m create mode 100644 OGoContentStore/sql/folderinfo.psql diff --git a/OGoContentStore/GNUmakefile b/OGoContentStore/GNUmakefile index 4db35a86..8d11000b 100644 --- a/OGoContentStore/GNUmakefile +++ b/OGoContentStore/GNUmakefile @@ -10,6 +10,7 @@ libOGoContentStore_HEADER_FILES += \ OCSFolder.h \ OCSFolderManager.h \ OCSFolderType.h \ + OCSChannelManager.h \ libOGoContentStore_OBJC_FILES += \ OCSContext.m \ @@ -17,6 +18,7 @@ libOGoContentStore_OBJC_FILES += \ OCSFolder.m \ OCSFolderManager.m \ OCSFolderType.m \ + OCSChannelManager.m \ -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/library.make diff --git a/OGoContentStore/OCSChannelManager.h b/OGoContentStore/OCSChannelManager.h new file mode 100644 index 00000000..d733149f --- /dev/null +++ b/OGoContentStore/OCSChannelManager.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 __OGoContentStore_OCSChannelManager_H__ +#define __OGoContentStore_OCSChannelManager_H__ + +#import + +@interface OCSChannelManager : NSObject +{ +} + +@end + +#endif /* __OGoContentStore_OCSChannelManager_H__ */ diff --git a/OGoContentStore/OCSChannelManager.m b/OGoContentStore/OCSChannelManager.m new file mode 100644 index 00000000..4152f1d0 --- /dev/null +++ b/OGoContentStore/OCSChannelManager.m @@ -0,0 +1,32 @@ +/* + 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 "OCSChannelManager.h" +#include "common.h" + +@implementation OCSChannelManager + +- (void)dealloc { + [super dealloc]; +} + +@end /* OCSChannelManager */ diff --git a/OGoContentStore/OCSFolder.h b/OGoContentStore/OCSFolder.h index fd2cfcd5..8ccfc989 100644 --- a/OGoContentStore/OCSFolder.h +++ b/OGoContentStore/OCSFolder.h @@ -25,10 +25,27 @@ #import +@class NSString, NSURL, NSNumber; + @interface OCSFolder : NSObject { + NSNumber *folderId; + NSString *folderName; + NSString *rootName; + NSString *path; + NSURL *location; + NSString *folderType; } +/* accessors */ + +- (NSNumber *)folderId; +- (NSString *)folderName; +- (NSString *)rootName; +- (NSString *)path; +- (NSURL *)location; +- (NSString *)folderType; + @end #endif /* __OGoContentStore_OCSFolder_H__ */ diff --git a/OGoContentStore/OCSFolder.m b/OGoContentStore/OCSFolder.m index dd245083..25ddec0c 100644 --- a/OGoContentStore/OCSFolder.m +++ b/OGoContentStore/OCSFolder.m @@ -29,4 +29,49 @@ [super dealloc]; } +/* accessors */ + +- (NSNumber *)folderId { + return self->folderId; +} + +- (NSString *)folderName { + return self->folderName; +} +- (NSString *)rootName { + return self->rootName; +} +- (NSString *)path { + return self->path; +} + +- (NSURL *)location { + return self->location; +} + +- (NSString *)folderType { + return self->folderType; +} + +/* description */ + +- (NSString *)description { + NSMutableString *ms; + + ms = [NSMutableString stringWithCapacity:256]; + [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])]; + + if (self->folderId) + [ms appendFormat:@" id=%@", self->folderId]; + else + [ms appendString:@" no-id"]; + + if (self->path) [ms appendFormat:@" path=%@", self->path]; + if (self->folderType) [ms appendFormat:@" type=%@", self->folderType]; + if (self->location) [ms appendFormat:@" location=%@", self->location]; + + [ms appendString:@">"]; + return ms; +} + @end /* OCSFolder */ diff --git a/OGoContentStore/README b/OGoContentStore/README index 9c93a3d8..edfa572c 100644 --- a/OGoContentStore/README +++ b/OGoContentStore/README @@ -31,6 +31,7 @@ Class Hierarchy OCSFolderManager - manages folders OCSFolderType - the mapping info for a specific folder-type OCSFieldInfo - mapping info for one 'quick field' + OCSChannelManager - maintains EOAdaptorChannel objects TBD: - field 'extractor' diff --git a/OGoContentStore/sql/folderinfo.psql b/OGoContentStore/sql/folderinfo.psql new file mode 100644 index 00000000..8c1aff6a --- /dev/null +++ b/OGoContentStore/sql/folderinfo.psql @@ -0,0 +1,24 @@ +-- $Id$ +-- +-- (C) 2004 SKYRIX Software AG +-- + +CREATE SEQUENCE SOGo_folder_info_seq; + +CREATE TABLE SOGo_folder_info ( + folderId INTEGER + DEFAULT nextval('SOGo_folder_info_seq') + NOT NULL + PRIMARY KEY, -- the primary key + path VARCHAR(255) NOT NULL, -- the full path to the folder 'xyz/Cal' + rootName VARCHAR(255) NOT NULL, -- just the root path + folderName VARCHAR(255) NOT NULL, -- last path component + location VARCHAR(2048) NOT NULL, -- URL to database of the folder + folderType VARCHAR(255) NOT NULL -- the folder type ... +); + +INSERT INTO SOGo_folder_info + ( path, rootname, foldername, location, foldertype ) +VALUES + ( 'helge/Calendar', 'helge', 'Calendar', + 'http://OGo:OGo@localhost/OGo', 'Appointment' ); -- 2.39.5