]> err.no Git - scalable-opengroupware.org/commitdiff
extensions to appointment.ocs
authorznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 9 Dec 2004 18:26:13 +0000 (18:26 +0000)
committerznek <znek@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Thu, 9 Dec 2004 18:26:13 +0000 (18:26 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@467 d1b88da0-ebda-0310-925b-ed51d893ca5b

OGoContentStore/ChangeLog
OGoContentStore/OCSiCalFieldExtractor.m
OGoContentStore/Version
OGoContentStore/appointment.ocs
OGoContentStore/sql/generate-folderinfo-sql-for-users.sh

index 0d53641fdd651ad028962ddf373b2ac0159ef054..25d37c9a00044f34e3e9bbde91201af12286642c 100644 (file)
@@ -1,3 +1,14 @@
+2004-12-09  Marcus Mueller  <znek@mulle-kybernetik.com>
+
+       * v0.9.14
+
+       * appointment.ocs: added "ispublic", "isopaque", "status" and
+         "orgmail".
+
+       * OCSiCalFieldExtractor.m: updated to extract new fields (see above)
+
+       * sql: updated generate-folderinfo-sql-for-users.sh
+
 2004-10-19  Helge Hess  <helge.hess@opengroupware.org>
 
        * OCSFolder.m: added new method -fetchContentsOfAllFiles method which
index 8225353c2a162fe9221c1d5d1d4d040e369ecfdb..81f76f17786bab6ae827a4fdeb20600ed7085c88 100644 (file)
@@ -66,22 +66,25 @@ static OCSiCalFieldExtractor *extractor = nil;
 - (NSMutableDictionary *)extractQuickFieldsFromEvent:(iCalEvent *)_event {
   NSMutableDictionary *row;
   NSCalendarDate *startDate, *endDate;
-  NSString       *uid, *title, *location;
+  NSString       *uid, *title, *location, *status, *accessClass;
   NSNumber       *sequence;
-  id participants, partmails;
+  id             organizer;
+  id             participants, partmails;
   
   if (_event == nil)
     return nil;
 
   /* extract values */
   
-  startDate = [_event startDate];
-  endDate   = [_event endDate];
-  uid       = [_event uid];
-  title     = [_event summary];
-  location  = [_event location];
-  sequence  = [_event sequence];
-  
+  startDate    = [_event startDate];
+  endDate      = [_event endDate];
+  uid          = [_event uid];
+  title        = [_event summary];
+  location     = [_event location];
+  sequence     = [_event sequence];
+  accessClass  = [[_event accessClass] uppercaseString];
+  status       = [[_event status] uppercaseString];
+
   participants = [_event attendees];
   partmails    = [participants valueForKey:@"email"];
   partmails    = [partmails componentsJoinedByString:@", "];
@@ -112,7 +115,39 @@ static OCSiCalFieldExtractor *extractor = nil;
     [row setObject:participants forKey:@"participants"];
   if ([partmails length] > 0)
     [row setObject:partmails forKey:@"partmails"];
-  
+
+  if ([status isNotNull]) {
+    int code = 1;
+
+      if ([status isEqualToString:@"TENTATIVE"])
+          code = 0;
+      else if ([status isEqualToString:@"CANCELLED"])
+          code = 2;
+    [row setObject:[NSNumber numberWithInt:code] forKey:@"status"];
+  }
+  else {
+      /* confirmed by default */
+      [row setObject:[NSNumber numberWithInt:1] forKey:@"status"];
+  }
+
+  if([accessClass isNotNull] && ![accessClass isEqualToString:@"PUBLIC"]) {
+    [row setObject:[NSNumber numberWithBool:NO] forKey:@"ispublic"];
+  }
+  else {
+    [row setObject:[NSNumber numberWithBool:YES] forKey:@"ispublic"];
+  }
+
+  // TODO: fix transparency when it's supported in iCalEvent
+  [row setObject:[NSNumber numberWithBool:NO] forKey:@"isopaque"];
+
+  organizer = [_event organizer];
+  if (organizer) {
+      NSString *email;
+      
+      email = [organizer valueForKey:@"email"];
+      if (email)
+          [row setObject:email forKey:@"orgmail"];
+  }
   return row;
 }
 
index 2194d3bea48067a4e5c56edc80c9f72893dd8669..d6061d936cfe6c6b61f4a409aadb324278fc94a0 100644 (file)
@@ -2,7 +2,7 @@
 
 MAJOR_VERSION=0
 MINOR_VERSION=9
-SUBMINOR_VERSION:=13
+SUBMINOR_VERSION:=14
 
 # v0.9.11 requires libFoundation   v1.0.63
 # v0.9.11 requires libNGExtensions v4.3.125
index 3ad0386f3920c27fe20c8d00e6bbe601e9603b93..6435f95458563dbd16c71fd80294aba4a2f607cb 100644 (file)
       sqlType    = "INT";
       allowsNull = YES;
     },
+    {
+      columnName = ispublic;
+      sqlType    = "INT";
+      allowsNull = NO;
+    },
+    {
+      columnName = isopaque;
+      sqlType    = "INT";
+      allowsNull = YES;
+    },
+    {
+      columnName = status;
+      sqlType    = "INT";
+      allowsNull = NO;
+    },
     {
       columnName = location;
       sqlType    = "VARCHAR(256)";
       allowsNull = YES;
     },
+    {
+      columnName = orgmail;
+      sqlType    = "VARCHAR(256)";
+      allowsNull = YES;
+    },
     {
       columnName = partmails;
       sqlType    = "VARCHAR(100000)";
index f2033e795e7d5aa35e22f8d16f04ac9e2dc4a9aa..6eac182c985168cf42559364db56e5e6524c4154 100755 (executable)
@@ -76,7 +76,11 @@ CREATE TABLE SOGo_${USER_TABLE}_privcal_quick (
   participants VARCHAR(100000) NOT NULL, -- the CNs of the participants
   isallday     INT             NULL,
   iscycle      INT             NULL,     -- client needs to fetch to resolve
+  ispublic     INT             NOT NULL,
+  istentative  INT             NULL,
+  isopaque     INT             NULL,
   location     VARCHAR(256)    NULL,
+  orgmail      VARCHAR(256)    NULL,
   partmails    VARCHAR(100000) NOT NULL, -- the emails of the participants
   sequence     INT             NULL      -- the iCal sequence
 );