]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@91 d1b88da0-ebda-0310-925b-ed51d8...
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 30 Jun 2004 07:48:53 +0000 (07:48 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Wed, 30 Jun 2004 07:48:53 +0000 (07:48 +0000)
OGoContentStore/OCSFolder.m
SOGo/GNUmakefile [new file with mode: 0644]
SOGo/Main/GNUmakefile [new file with mode: 0644]
SOGo/Main/GNUmakefile.preamble [new file with mode: 0644]
SOGo/Main/Version [new file with mode: 0644]
SOGo/Main/common.h [new file with mode: 0644]
SOGo/Main/product.plist [new file with mode: 0644]
SOGo/Main/sogod.m [new file with mode: 0644]

index cdf7e5058786bb5cf0172a0c58835b50a0d05260..d906925bbc51ec3717fd6aeb29f621423790ffd7 100644 (file)
@@ -214,7 +214,7 @@ static BOOL debugOn = YES;
     return nil;
   }
 
-  // TODO
+  // TODO: gen SQL, execute in transactions
   
   [self releaseChannel:storeChannel];
   [self releaseChannel:quickChannel];
diff --git a/SOGo/GNUmakefile b/SOGo/GNUmakefile
new file mode 100644 (file)
index 0000000..9f9e51c
--- /dev/null
@@ -0,0 +1,8 @@
+# $Id$
+
+include $(GNUSTEP_MAKEFILES)/common.make
+
+SUBPROJECTS = \
+       Main
+
+include $(GNUSTEP_MAKEFILES)/aggregate.make
diff --git a/SOGo/Main/GNUmakefile b/SOGo/Main/GNUmakefile
new file mode 100644 (file)
index 0000000..f376df0
--- /dev/null
@@ -0,0 +1,18 @@
+# $Id: GNUmakefile,v 1.13 2004/06/08 11:41:13 helge Exp $
+
+include $(GNUSTEP_MAKEFILES)/common.make
+
+WOAPP_NAME = sogod
+
+sogod_OBJC_FILES += \
+       sogod.m
+
+sogod_RESOURCE_FILES += \
+       Version         \
+       product.plist   \
+
+sogod_WEBSERVER_RESOURCE_FILES += 
+
+-include GNUmakefile.preamble
+include $(GNUSTEP_MAKEFILES)/woapp.make
+-include GNUmakefile.postamble
diff --git a/SOGo/Main/GNUmakefile.preamble b/SOGo/Main/GNUmakefile.preamble
new file mode 100644 (file)
index 0000000..f842ddc
--- /dev/null
@@ -0,0 +1,7 @@
+# $Id$
+
+ADDITIONAL_TOOL_LIBS += \
+       -lSOGoLogic             \
+       -lOGoContentStore       \
+       -lGDLAccess             \
+       -ljs
diff --git a/SOGo/Main/Version b/SOGo/Main/Version
new file mode 100644 (file)
index 0000000..1b77c54
--- /dev/null
@@ -0,0 +1,3 @@
+# $Id: Version,v 1.1 2003/11/24 01:24:40 helge Exp $
+
+SUBMINOR_VERSION:=1
diff --git a/SOGo/Main/common.h b/SOGo/Main/common.h
new file mode 100644 (file)
index 0000000..ea6a4db
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+  Copyright (C) 2002-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$
+
+#import <Foundation/Foundation.h>
+
+#if NeXT_Foundation_LIBRARY || COCOA_Foundation_LIBRARY
+#  include <NGExtensions/NGObjectMacros.h>
+#  include <NGExtensions/NSString+Ext.h>
+#endif
+
+#include <NGExtensions/NGExtensions.h>
+#include <NGObjWeb/NGObjWeb.h>
+#include <NGObjWeb/SoObjects.h>
+
+#include <GDLAccess/GDLAccess.h>
diff --git a/SOGo/Main/product.plist b/SOGo/Main/product.plist
new file mode 100644 (file)
index 0000000..f8c2718
--- /dev/null
@@ -0,0 +1,18 @@
+{
+  publicResources = (
+  );
+
+  classes = {
+    SOGo = {
+      superclass    = "SoApplication";
+      protectedBy   = "View";
+      defaultAccess = "allow";
+      defaultRoles = {
+        "View"          = "Anonymous";
+        "WebDAV Access" = "Authenticated";
+      };
+      methods = {
+      };
+    };
+  };
+}
diff --git a/SOGo/Main/sogod.m b/SOGo/Main/sogod.m
new file mode 100644 (file)
index 0000000..d48fda2
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+  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 <NGObjWeb/SoApplication.h>
+
+@interface SOGo : SoApplication
+{
+}
+
+@end
+
+#include "common.h"
+
+@implementation SOGo
+
+- (id)init {
+  if ((self = [super init])) {
+  }
+  return self;
+}
+
+/* name lookup */
+
+- (BOOL)isUserName:(NSString *)_key inContext:(id)_ctx {
+  if ([_key length] < 1)
+    return NO;
+
+  if (isdigit([_key characterAtIndex:0]))
+    return NO;
+
+  return YES;
+}
+
+- (id)lookupUser:(NSString *)_key inContext:(id)_ctx {
+  //return [DSoUser dUserWithName:hostName port:port];
+  return nil;
+}
+
+- (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag {
+  id obj;
+  
+  /* first check attributes directly bound to the application */
+  if ((obj = [super lookupName:_key inContext:_ctx acquire:_flag]))
+    return obj;
+  
+  /* 
+     The problem is, that at this point we still get request for resources,
+     eg 'favicon.ico'.
+     The hack here is to check for a dot in the key, but we should find a way
+     to catch that in a more sensible way.
+     
+     One way to check for a valid key would be to check whether the key is a
+     valid hostname, but I would like to avoid that for performance reasons.
+     
+     Addition: we also get queries for various other methods, like "GET" if
+               no method was provided in the query path.
+  */
+  if ([self isUserName:_key inContext:_ctx])
+    return [self lookupUser:_key inContext:_ctx];
+  
+  return nil;
+}
+
+/* exception handling */
+
+- (WOResponse *)handleException:(NSException *)_exc
+  inContext:(WOContext *)_ctx
+{
+  printf("EXCEPTION: %s\n", [[_exc description] cString]);
+  abort();
+}
+
+@end /* SOGo */
+
+
+int main(int argc, char **argv, char **env) {
+  NSAutoreleasePool *pool;
+
+  pool = [[NSAutoreleasePool alloc] init];
+#if LIB_FOUNDATION_LIBRARY
+  [NSProcessInfo initializeWithArguments:argv count:argc environment:env];
+#endif
+  [NGBundleManager defaultBundleManager];
+  
+  WOWatchDogApplicationMain(@"SOGo", argc, (void*)argv);
+
+  [pool release];
+  return 0;
+}