Monotone-Parent: 9402acf99e73ef8bdcad7719c88dc1d6a3ee27d4
Monotone-Revision: 4f866f7ebe374b79f2e28ceb3dca60ca3cc709bc Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-09T15:43:48 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
5886e82c79
commit
3251564891
|
@ -1,5 +1,10 @@
|
||||||
2008-07-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2008-07-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* SoObjects/Appointments/SOGoAppointmentObject.m
|
||||||
|
([SOGoAppointmentObject -postCalDAVEventCancelTo:recipients]): new
|
||||||
|
method that implements support for the CalDAV "CANCEL" method for
|
||||||
|
POSTs.
|
||||||
|
|
||||||
* SoObjects/SOGo/SOGoContentObject.m ([SOGoContentObject
|
* SoObjects/SOGo/SOGoContentObject.m ([SOGoContentObject
|
||||||
-PUTAction:_ctx]): the version passed to
|
-PUTAction:_ctx]): the version passed to
|
||||||
saveContentString:baseVersion: is the current value of "version".
|
saveContentString:baseVersion: is the current value of "version".
|
||||||
|
|
|
@ -403,15 +403,34 @@
|
||||||
return ex;
|
return ex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSDictionary *) _caldavSuccessCodeWithRecipient: (NSString *) recipient
|
||||||
|
{
|
||||||
|
NSMutableArray *element;
|
||||||
|
NSDictionary *code;
|
||||||
|
|
||||||
|
element = [NSMutableArray new];
|
||||||
|
[element addObject: davElementWithContent (@"recipient", XMLNS_CALDAV,
|
||||||
|
recipient)];
|
||||||
|
[element addObject: davElementWithContent (@"request-status",
|
||||||
|
XMLNS_CALDAV,
|
||||||
|
@"2.0;Success")];
|
||||||
|
code = davElementWithContent (@"response", XMLNS_CALDAV,
|
||||||
|
element);
|
||||||
|
[element release];
|
||||||
|
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSArray *) postCalDAVEventRequestTo: (NSArray *) recipients
|
- (NSArray *) postCalDAVEventRequestTo: (NSArray *) recipients
|
||||||
{
|
{
|
||||||
NSMutableArray *elements, *element;
|
NSMutableArray *elements;
|
||||||
NSEnumerator *recipientsEnum;
|
NSEnumerator *recipientsEnum;
|
||||||
NSString *recipient, *uid;
|
NSString *recipient, *uid;
|
||||||
iCalEvent *event;
|
iCalEvent *event;
|
||||||
iCalPerson *person;
|
iCalPerson *person;
|
||||||
|
|
||||||
elements = [NSMutableArray array];
|
elements = [NSMutableArray array];
|
||||||
|
|
||||||
event = [self component: NO secure: NO];
|
event = [self component: NO secure: NO];
|
||||||
recipientsEnum = [recipients objectEnumerator];
|
recipientsEnum = [recipients objectEnumerator];
|
||||||
while ((recipient = [recipientsEnum nextObject]))
|
while ((recipient = [recipientsEnum nextObject]))
|
||||||
|
@ -427,15 +446,40 @@
|
||||||
forOldObject: nil andNewObject: event
|
forOldObject: nil andNewObject: event
|
||||||
toAttendees: [NSArray arrayWithObject: person]];
|
toAttendees: [NSArray arrayWithObject: person]];
|
||||||
[person release];
|
[person release];
|
||||||
element = [NSMutableArray new];
|
[elements
|
||||||
[element addObject: davElementWithContent (@"recipient", XMLNS_CALDAV,
|
addObject: [self _caldavSuccessCodeWithRecipient: recipient]];
|
||||||
recipient)];
|
}
|
||||||
[element addObject: davElementWithContent (@"request-status",
|
|
||||||
XMLNS_CALDAV,
|
return elements;
|
||||||
@"2.0;Success")];
|
}
|
||||||
[elements addObject: davElementWithContent (@"response", XMLNS_CALDAV,
|
|
||||||
element)];
|
- (NSArray *) postCalDAVEventCancelTo: (NSArray *) recipients
|
||||||
[element release];
|
{
|
||||||
|
NSMutableArray *elements;
|
||||||
|
NSEnumerator *recipientsEnum;
|
||||||
|
NSString *recipient, *uid;
|
||||||
|
iCalEvent *event;
|
||||||
|
iCalPerson *person;
|
||||||
|
|
||||||
|
elements = [NSMutableArray array];
|
||||||
|
|
||||||
|
event = [self component: NO secure: NO];
|
||||||
|
recipientsEnum = [recipients objectEnumerator];
|
||||||
|
while ((recipient = [recipientsEnum nextObject]))
|
||||||
|
if ([[recipient lowercaseString] hasPrefix: @"mailto:"])
|
||||||
|
{
|
||||||
|
person = [iCalPerson new];
|
||||||
|
[person setValue: 0 to: recipient];
|
||||||
|
uid = [person uid];
|
||||||
|
if (uid)
|
||||||
|
[self _removeEventFromUID: uid];
|
||||||
|
#warning fix this when sendEmailUsing blabla has been cleaned up
|
||||||
|
[self sendEMailUsingTemplateNamed: @"Deletion"
|
||||||
|
forOldObject: nil andNewObject: event
|
||||||
|
toAttendees: [NSArray arrayWithObject: person]];
|
||||||
|
[person release];
|
||||||
|
[elements
|
||||||
|
addObject: [self _caldavSuccessCodeWithRecipient: recipient]];
|
||||||
}
|
}
|
||||||
|
|
||||||
return elements;
|
return elements;
|
||||||
|
@ -459,7 +503,7 @@
|
||||||
|
|
||||||
- (NSArray *) postCalDAVEventReplyTo: (NSArray *) recipients
|
- (NSArray *) postCalDAVEventReplyTo: (NSArray *) recipients
|
||||||
{
|
{
|
||||||
NSMutableArray *elements, *element;
|
NSMutableArray *elements;
|
||||||
NSEnumerator *recipientsEnum;
|
NSEnumerator *recipientsEnum;
|
||||||
NSString *recipient, *uid, *eventUID;
|
NSString *recipient, *uid, *eventUID;
|
||||||
iCalEvent *event;
|
iCalEvent *event;
|
||||||
|
@ -493,15 +537,8 @@
|
||||||
forOldObject: nil andNewObject: event
|
forOldObject: nil andNewObject: event
|
||||||
toAttendees: [NSArray arrayWithObject: person]];
|
toAttendees: [NSArray arrayWithObject: person]];
|
||||||
[person release];
|
[person release];
|
||||||
element = [NSMutableArray new];
|
[elements
|
||||||
[element addObject: davElementWithContent (@"recipient", XMLNS_CALDAV,
|
addObject: [self _caldavSuccessCodeWithRecipient: recipient]];
|
||||||
recipient)];
|
|
||||||
[element addObject: davElementWithContent (@"request-status",
|
|
||||||
XMLNS_CALDAV,
|
|
||||||
@"2.0;Success")];
|
|
||||||
[elements addObject: davElementWithContent (@"response", XMLNS_CALDAV,
|
|
||||||
element)];
|
|
||||||
[element release];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return elements;
|
return elements;
|
||||||
|
|
Loading…
Reference in a new issue