]> err.no Git - scalable-opengroupware.org/commitdiff
minor work on script upload
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sun, 30 Jan 2005 20:09:43 +0000 (20:09 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sun, 30 Jan 2005 20:09:43 +0000 (20:09 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@508 d1b88da0-ebda-0310-925b-ed51d893ca5b

SOGo/SoObjects/Mailer/SOGoMailBodyPart.m
SOGo/SoObjects/Sieve/ChangeLog
SOGo/SoObjects/Sieve/SOGoSieveBaseObject.h
SOGo/SoObjects/Sieve/SOGoSieveBaseObject.m
SOGo/SoObjects/Sieve/SOGoSieveScriptObject.h
SOGo/SoObjects/Sieve/SOGoSieveScriptObject.m
SOGo/SoObjects/Sieve/Version

index bc68c63739f07b008971a4fba59f6e067061eba7..4ced6a48a2aa04ef80d4880f7ace96e86cc5ff7c 100644 (file)
@@ -99,6 +99,7 @@
 
 - (id)lookupImap4BodyPartKey:(NSString *)_key inContext:(id)_ctx {
   // TODO: we might want to check for existence prior controller creation
+  // TODO: we might(should?) want to create type-specific body-part objects
   return [[[SOGoMailBodyPart alloc] initWithName:_key 
                                    inContainer:self] autorelease];
 }
index 366cc880e88fbd122efbdc1d9aa4f81b7f876613..2706045fa71e564c2b52a240a9a427f70030db86 100644 (file)
@@ -1,3 +1,7 @@
+2005-01-30  Helge Hess  <helge.hess@opengroupware.org>
+
+       * some work on script upload (v0.9.5)
+
 2004-12-03  Helge Hess  <helge.hess@skyrix.com>
        
        * SOGoSieveScriptObject.m, SOGoSieveScriptsFolder.m: added script
index 71fbdcf9d6b6b35615a21fdc62e6779bd5078477..b96de2caa7f4e42d031518b78869c2e7ecc5c654 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2004 SKYRIX Software AG
+  Copyright (C) 2004-2005 SKYRIX Software AG
 
   This file is part of OpenGroupware.org.
 
index 091ff77ab11b4af538ef488ec5b633c5a5761383..ccd47c29310cd7c5f48fbbbe006903ea2610d022 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2004 SKYRIX Software AG
+  Copyright (C) 2004-2005 SKYRIX Software AG
 
   This file is part of OpenGroupware.org.
 
index 8d6f2dd23ae19cfd9a62d93ad6d1b1d69c0468be..7063adf8c6c1f1a80c53598a2846701fff10d686 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2004 SKYRIX Software AG
+  Copyright (C) 2004-2005 SKYRIX Software AG
 
   This file is part of OpenGroupware.org.
 
   The SOGoSieveScriptObject represents a single sieve script on a Cyrus folder.
 */
 
+@class NSData, NSString, NSException;
+
 @interface SOGoSieveScriptObject : SOGoSieveBaseObject
 {
 }
 
+/* content */
+
+- (NSString *)contentAsString;
+- (NSData *)content;
+- (NSException *)writeContent:(id)_content;
+
 @end
 
 #endif /* __Sieve_SOGoSieveScriptObject_H__ */
index bb8bbbdc111dc44dc8cc3dd9878240428a519280..37ad358bc30db05d7d1c567f80664ccda3ea3d1a 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2004 SKYRIX Software AG
+  Copyright (C) 2004-2005 SKYRIX Software AG
 
   This file is part of OpenGroupware.org.
 
   return [[self contentAsString] dataUsingEncoding:NSUTF8StringEncoding];
 }
 
+- (NSException *)writeContent:(id)_content {
+  if (_content == nil) {
+    return [NSException exceptionWithHTTPStatus:400 /* Bad Request */
+                       reason:@"Missing content to write!"];
+  }
+  
+  return [NSException exceptionWithHTTPStatus:501 /* Not Implemented */
+                     reason:@"Does not implement script upload yet!"];
+}
+
 /* operations */
 
 - (NSException *)delete {
   return [NSException exceptionWithHTTPStatus:404 /* Not Found */];
 }
 
+/* operations */
+
+- (id)PUTAction:(id)_context {
+  NSException *e;
+  NSData *content;
+
+  content = [[_context request] content];
+  
+  if ((e = [self writeContent:content]))
+    return e;
+  
+  return self;
+}
+
 /* WebDAV */
 
 @end /* SOGoSieveScriptObject */
index 60cc37e507c360a94653ae0659ba641958c82430..298ef851be9e4fe2110fc13f5d457bc1767108ba 100644 (file)
@@ -1,5 +1,5 @@
 # Version file
 
-SUBMINOR_VERSION:=4
+SUBMINOR_VERSION:=5
 
 # v0.9.1 requires libNGMime v4.3.194