+2004-08-16 Helge Hess <helge.hess@skyrix.com>
+
+ * SOGoAppointmentObject.m: added new multi folder methods (v0.9.7)
+
2004-08-14 Helge Hess <helge.hess@skyrix.com>
* SOGoGroupAppointmentFolder.m: implemented proper URL generation for
#include <SOGo/SOGoContentObject.h>
+/*
+ SOGoAppointmentObject
+
+ Represents a single appointment. This SOPE controller object manages all the
+ attendee storages (that is, it might store into multiple folders for meeting
+ appointments!).
+
+ Note: SOGoAppointmentObject do not need to exist yet. They can also be "new"
+ appointments with an externally generated unique key.
+*/
+
+@class NSString, NSException;
+
@interface SOGoAppointmentObject : SOGoContentObject
{
}
+/* accessors */
+
+- (NSString *)iCalString;
+
+/* raw saving */
+
+- (NSException *)primarySaveContentString:(NSString *)_iCalString;
+- (NSException *)primaryDelete;
+
+/* "iCal multifolder saves" */
+
+- (NSException *)saveContentString:(NSString *)_iCal baseSequence:(int)_v;
+- (NSException *)deleteWithBaseSequence:(int)_v;
+
+- (NSException *)saveContentString:(NSString *)_iCalString;
+- (NSException *)delete;
+
@end
#endif /* __Appointments_SOGoAppointmentObject_H__ */
return [self contentAsString];
}
+/* raw saving */
+
+- (NSException *)primarySaveContentString:(NSString *)_iCalString {
+ return [super saveContentString:_iCalString];
+}
+- (NSException *)primaryDelete {
+ return [super delete];
+}
+
+/* "iCal multifolder saves" */
+
+- (NSException *)saveContentString:(NSString *)_iCal baseSequence:(int)_v {
+ /*
+ Note: we need to delete in all participants folders and send iMIP messages
+ for all external accounts.
+
+ Steps:
+ - fetch stored content
+ - parse old content
+ - check if sequence matches (or if 0=ignore)
+ - extract old attendee list + organizer (make unique)
+ - parse new content (ensure that sequence is increased!)
+ - extract new attendee list + organizer (make unique)
+ - make a diff => new, same, removed
+ - write to new, same
+ - delete in removed folders
+ - send iMIP mail for all folders not found
+ */
+#warning TODO: implement proper "multi-saves"
+ return [self primarySaveContentString:_iCal];
+}
+
+- (NSException *)deleteWithBaseSequence:(int)_v {
+ /*
+ Note: We need to delete in all participants folders and send iMIP messages
+ for all external accounts.
+ Delete is basically identical to save with all attendees and the
+ organizer being deleted.
+ */
+#warning TODO: implement proper "multi-saves"
+ return [self primaryDelete];
+}
+
+- (NSException *)saveContentString:(NSString *)_iCalString {
+ return [self saveContentString:_iCalString baseSequence:0];
+}
+- (NSException *)delete {
+ return [self deleteWithBaseSequence:0];
+}
+
@end /* SOGoAppointmentObject */
# $Id: Version,v 1.9 2004/05/19 14:30:45 helge Exp $
-SUBMINOR_VERSION:=6
+SUBMINOR_VERSION:=7
+2004-08-16 Helge Hess <helge.hess@skyrix.com>
+
+ * SOGoContentObject.m: updated multi-save things (which belong into the
+ SOGoAppointmentObject class), implement -sleep to release the content
+ (v0.9.10)
+
2004-08-15 Helge Hess <helge.hess@skyrix.com>
* SOGoContentObject.m: implement first version of -delete (v0.9.9)
[super dealloc];
}
+/* notifications */
+
+- (void)sleep {
+ [self->content release]; self->content = nil;
+ [super sleep];
+}
+
/* accessors */
- (BOOL)isFolderish {
if (self->content != nil)
return self->content;
-
+
if ((folder = [self ocsFolder]) == nil) {
[self logWithFormat:@"did not find folder of appointment."];
return nil;
}
- (NSException *)saveContentString:(NSString *)_str {
+ /* Note: "iCal multifolder saves" are implemented in the apt subclass! */
OCSFolder *folder;
NSException *ex;
-#warning TODO: implement proper "multi-saves"
-
if ((folder = [self ocsFolder]) == nil) {
[self logWithFormat:@"did not find folder of appointment."];
return nil;
}
-
if ((ex = [folder writeContent:_str toName:[self nameInContainer]])) {
[self logWithFormat:@"write failed: %@", ex];
return ex;
}
-
return nil;
}
- (NSException *)delete {
+ /* Note: "iCal multifolder saves" are implemented in the apt subclass! */
OCSFolder *folder;
NSException *ex;
-
-#warning TODO: implement proper "multi-saves"
if ((folder = [self ocsFolder]) == nil) {
[self logWithFormat:@"did not find folder of appointment."];
[self logWithFormat:@"delete failed: %@", ex];
return ex;
}
-
return nil;
}
# $Id: Version 170 2004-08-11 10:45:40Z helge $
-SUBMINOR_VERSION:=9
+SUBMINOR_VERSION:=10