mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-05 20:10:33 +00:00
Monotone-Parent: f050642fcfd85a888681137f9572e2646d4cadc9
Monotone-Revision: 4836e88278f663b165807bc739419dea0b0b3c73 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-06-05T04:46:12 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#import <Foundation/NSDictionary.h>
|
||||
#import <Foundation/NSEnumerator.h>
|
||||
#import <Foundation/NSURL.h>
|
||||
|
||||
#import <NGObjWeb/WORequest.h>
|
||||
|
||||
@@ -39,12 +40,19 @@
|
||||
if ((self = [super init]))
|
||||
{
|
||||
calendar = [self clientObject];
|
||||
baseCalDAVURL = nil;
|
||||
reloadTasks = NO;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
[baseCalDAVURL release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString *) calendarID
|
||||
{
|
||||
return [calendar folderReference];
|
||||
@@ -241,4 +249,36 @@
|
||||
return [self jsCloseWithRefreshMethod: action];
|
||||
}
|
||||
|
||||
- (NSString *) _baseCalDAVURL
|
||||
{
|
||||
NSString *davURL;
|
||||
|
||||
if (!baseCalDAVURL)
|
||||
{
|
||||
davURL = [[calendar realDavURL] absoluteString];
|
||||
if ([davURL hasSuffix: @"/"])
|
||||
baseCalDAVURL = [davURL substringToIndex: [davURL length] - 1];
|
||||
else
|
||||
baseCalDAVURL = davURL;
|
||||
[baseCalDAVURL retain];
|
||||
}
|
||||
|
||||
return baseCalDAVURL;
|
||||
}
|
||||
|
||||
- (NSString *) calDavURL
|
||||
{
|
||||
return [NSString stringWithFormat: @"%@/", [self _baseCalDAVURL]];
|
||||
}
|
||||
|
||||
- (NSString *) webDavICSURL
|
||||
{
|
||||
return [NSString stringWithFormat: @"%@.ics", [self _baseCalDAVURL]];
|
||||
}
|
||||
|
||||
- (NSString *) webDavXMLURL
|
||||
{
|
||||
return [NSString stringWithFormat: @"%@.xml", [self _baseCalDAVURL]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user