From 12738978840d9917e940da85cdf266b0f8400ddd Mon Sep 17 00:00:00 2001 From: helge Date: Sun, 15 Aug 2004 20:31:59 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/trunk@236 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/SoObjects/SOGo/ChangeLog | 2 ++ SOGo/SoObjects/SOGo/SOGoContentObject.h | 1 + SOGo/SoObjects/SOGo/SOGoContentObject.m | 21 +++++++++++++++++++++ SOGo/SoObjects/SOGo/Version | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/SOGo/SoObjects/SOGo/ChangeLog b/SOGo/SoObjects/SOGo/ChangeLog index cc0d66ea..e6d25a55 100644 --- a/SOGo/SoObjects/SOGo/ChangeLog +++ b/SOGo/SoObjects/SOGo/ChangeLog @@ -1,5 +1,7 @@ 2004-08-15 Helge Hess + * SOGoContentObject.m: implement first version of -delete (v0.9.9) + * SOGoObject.[hm], SOGoUserFolder.[hm]: implemented SOPE -ownerInContext: (v0.9.8) diff --git a/SOGo/SoObjects/SOGo/SOGoContentObject.h b/SOGo/SoObjects/SOGo/SOGoContentObject.h index 1bb949c0..afa6e6be 100644 --- a/SOGo/SoObjects/SOGo/SOGoContentObject.h +++ b/SOGo/SoObjects/SOGo/SOGoContentObject.h @@ -47,6 +47,7 @@ - (NSString *)contentAsString; - (NSException *)saveContentString:(NSString *)_str; +- (NSException *)delete; @end diff --git a/SOGo/SoObjects/SOGo/SOGoContentObject.m b/SOGo/SoObjects/SOGo/SOGoContentObject.m index 4713650f..69fb7b34 100644 --- a/SOGo/SoObjects/SOGo/SOGoContentObject.m +++ b/SOGo/SoObjects/SOGo/SOGoContentObject.m @@ -95,6 +95,8 @@ - (NSException *)saveContentString:(NSString *)_str { OCSFolder *folder; NSException *ex; + +#warning TODO: implement proper "multi-saves" if ((folder = [self ocsFolder]) == nil) { [self logWithFormat:@"did not find folder of appointment."]; @@ -109,6 +111,25 @@ return nil; } +- (NSException *)delete { + 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 deleteContentWithName:[self nameInContainer]])) { + [self logWithFormat:@"delete failed: %@", ex]; + return ex; + } + + return nil; +} + /* description */ - (void)appendAttributesToDescription:(NSMutableString *)_ms { diff --git a/SOGo/SoObjects/SOGo/Version b/SOGo/SoObjects/SOGo/Version index 702b2674..f77de926 100644 --- a/SOGo/SoObjects/SOGo/Version +++ b/SOGo/SoObjects/SOGo/Version @@ -1,3 +1,3 @@ # $Id: Version 170 2004-08-11 10:45:40Z helge $ -SUBMINOR_VERSION:=8 +SUBMINOR_VERSION:=9 -- 2.39.5