Monotone-Parent: dd40f80285290c9b934e5644f0e30ea7b3ef0577

Monotone-Revision: 8e107fb288c79a6ab48898f0f819a6f622daaab3

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-06-19T15:34:22
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2009-06-19 15:34:22 +00:00
parent 988779e098
commit c2656306ed
2 changed files with 28 additions and 12 deletions

View File

@ -1,5 +1,10 @@
2009-06-19 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Appointments/SOGoAppointmentFolder.m
(-davResourceType): return the "schedule-inbox" and
"schedule-inbox" caldav types when the user is the owner and the
collection is its personal calendar.
* SoObjects/SOGo/SOGoGCSFolder.m (davSyncCollection:): new method
that implements the draft webdav sync specification
(http://ietfreport.isoc.org/idref/draft-daboo-webdav-sync/).

View File

@ -2210,20 +2210,31 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir
- (NSArray *) davResourceType
{
static NSArray *colType = nil;
NSArray *cdCol, *gdRT, *gdVEventCol, *gdVTodoCol;
NSMutableArray *colType;
NSArray *gdRT, *gdVEventCol, *gdVTodoCol;
NSString *login;
if (!colType)
colType = [NSMutableArray arrayWithCapacity: 10];
[colType addObject: @"collection"];
[colType addObject: [NSArray arrayWithObjects: @"calendar", XMLNS_CALDAV, nil]];
gdRT = [self groupDavResourceType];
gdVEventCol = [NSArray arrayWithObjects: [gdRT objectAtIndex: 0],
XMLNS_GROUPDAV, nil];
[colType addObject: gdVEventCol];
gdVTodoCol = [NSArray arrayWithObjects: [gdRT objectAtIndex: 1],
XMLNS_GROUPDAV, nil];
[colType addObject: gdVTodoCol];
if ([nameInContainer isEqualToString: @"personal"])
{
gdRT = [self groupDavResourceType];
gdVEventCol = [NSArray arrayWithObjects: [gdRT objectAtIndex: 0],
XMLNS_GROUPDAV, nil];
gdVTodoCol = [NSArray arrayWithObjects: [gdRT objectAtIndex: 1],
XMLNS_GROUPDAV, nil];
cdCol = [NSArray arrayWithObjects: @"calendar", XMLNS_CALDAV, nil];
colType = [NSArray arrayWithObjects: @"collection", cdCol,
gdVEventCol, gdVTodoCol, nil];
[colType retain];
login = [[context activeUser] login];
if ([login isEqualToString: [self ownerInContext: self]])
{
[colType addObject: [NSArray arrayWithObjects: @"schedule-inbox",
XMLNS_CALDAV, nil]];
[colType addObject: [NSArray arrayWithObjects: @"schedule-outbox",
XMLNS_CALDAV, nil]];
}
}
return colType;