mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-13 07:47:12 +00:00
SoObjects/Appointments/GNUmakefile
Monotone-Parent: 18c8420c0a0c752ea4dd761f934a473b321568f8 Monotone-Revision: b2699a981cd5458fbd1da1a9a72992020a29a4fc Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-12-14T21:20:13 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
1 parent
87dd80e801
commit
dc40718409
51 files changed
+1420
-969
No files matched your search
+42
-24
@@ -19,6 +19,8 @@
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <NGObjWeb/SoObject.h>
|
||||
|
||||
#include "SOGoFolder.h"
|
||||
#include "common.h"
|
||||
#include <GDLContentStore/GCSFolderManager.h>
|
||||
@@ -26,6 +28,8 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#import "SOGoAclsFolder.h"
|
||||
|
||||
@implementation SOGoFolder
|
||||
|
||||
+ (int)version {
|
||||
@@ -143,35 +147,49 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (NSArray *)toOneRelationshipKeys {
|
||||
- (NSArray *) davResourceType
|
||||
{
|
||||
NSArray *rType, *groupDavCollection;
|
||||
|
||||
if ([self respondsToSelector: @selector (groupDavResourceType)])
|
||||
{
|
||||
groupDavCollection = [NSArray arrayWithObjects: [self groupDavResourceType],
|
||||
@"http://groupdav.org/", @"G", nil];
|
||||
rType = [NSArray arrayWithObjects: @"collection", groupDavCollection, nil];
|
||||
}
|
||||
else
|
||||
rType = [NSArray arrayWithObject: @"collection"];
|
||||
|
||||
return rType;
|
||||
}
|
||||
|
||||
- (NSArray *) toOneRelationshipKeys {
|
||||
/* toOneRelationshipKeys are the 'files' contained in a folder */
|
||||
NSMutableArray *ma;
|
||||
NSArray *names;
|
||||
NSString *ext;
|
||||
NSString *name, *ext;
|
||||
unsigned i, count;
|
||||
NSRange r;
|
||||
|
||||
if ((names = [self fetchContentObjectNames]) == nil)
|
||||
return names;
|
||||
|
||||
if ((count = [names count]) == 0)
|
||||
return names;
|
||||
|
||||
if ((ext = [self defaultFilenameExtension]) == nil)
|
||||
return names;
|
||||
|
||||
ma = [NSMutableArray arrayWithCapacity:count];
|
||||
for (i = 0; i < count; i++) {
|
||||
NSRange r;
|
||||
NSString *name;
|
||||
|
||||
name = [names objectAtIndex:i];
|
||||
r = [name rangeOfString:@"."];
|
||||
if (r.length == 0)
|
||||
name = [[name stringByAppendingString:@"."] stringByAppendingString:ext];
|
||||
|
||||
[ma addObject:name];
|
||||
}
|
||||
return ma;
|
||||
names = [self fetchContentObjectNames];
|
||||
count = [names count];
|
||||
ext = [self defaultFilenameExtension];
|
||||
if (count && [ext length] > 0)
|
||||
{
|
||||
ma = [NSMutableArray arrayWithCapacity: count];
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
name = [names objectAtIndex: i];
|
||||
r = [name rangeOfString: @"."];
|
||||
if (r.length == 0)
|
||||
name = [[name stringByAppendingString:@"."] stringByAppendingString: ext];
|
||||
[ma addObject:name];
|
||||
}
|
||||
|
||||
names = ma;
|
||||
}
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
/* WebDAV */
|
||||
|
||||
Reference in new issue
Block a user