]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@22 d1b88da0-ebda-0310-925b-ed51d8...
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 7 Jun 2004 13:29:29 +0000 (13:29 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Mon, 7 Jun 2004 13:29:29 +0000 (13:29 +0000)
OGoContentStore/GNUmakefile
OGoContentStore/OCSChannelManager.h [new file with mode: 0644]
OGoContentStore/OCSChannelManager.m [new file with mode: 0644]
OGoContentStore/OCSFolder.h
OGoContentStore/OCSFolder.m
OGoContentStore/README
OGoContentStore/sql/folderinfo.psql [new file with mode: 0644]

index 4db35a864bef46447dd1a45c6a97f3d88a1502f2..8d11000bc1653878fc2b2ee50aeb7a47c4219c1e 100644 (file)
@@ -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 (file)
index 0000000..d733149
--- /dev/null
@@ -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 <Foundation/NSObject.h>
+
+@interface OCSChannelManager : NSObject
+{
+}
+
+@end
+
+#endif /* __OGoContentStore_OCSChannelManager_H__ */
diff --git a/OGoContentStore/OCSChannelManager.m b/OGoContentStore/OCSChannelManager.m
new file mode 100644 (file)
index 0000000..4152f1d
--- /dev/null
@@ -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 */
index fd2cfcd594efb75af24f2c3eb4a3a63366d30840..8ccfc989cde1fede764d399e718b1d55a0fb5f61 100644 (file)
 
 #import <Foundation/NSObject.h>
 
+@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__ */
index dd245083ff0b2af9f0c4f8aff99bd1243e05b4d3..25ddec0ca77db600cab0f6a92846791fccdc9f7a 100644 (file)
   [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 */
index 9c93a3d8d96ffe23590c39f5405e882e246d6bbc..edfa572c98efd76345fe3ac6ae2bdabbfd5c57d7 100644 (file)
@@ -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 (file)
index 0000000..8c1aff6
--- /dev/null
@@ -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' );