Reverted an accidental commit

Monotone-Parent: 8d4d276429e5192f98568aecf0d0c541440d22fc
Monotone-Revision: b5beb9beec402717a04f1250f79638aae4d70b55

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2009-10-01T14:07:59
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
C Robert
2009-10-01 14:07:59 +00:00
parent 77c219509e
commit ad49c5dca7

View File

@@ -1269,134 +1269,4 @@ static BOOL debugSoParts = NO;
return response;
}
// For DAV REPORT
- (id) _fetchProperty: (NSString *) property
{
NSArray *parts;
id rc, msgs;
rc = nil;
if (property)
{
parts = [NSArray arrayWithObjects: property, nil];
msgs = [self fetchParts: parts];
msgs = [msgs valueForKey: @"fetch"];
if ([msgs count]) {
rc = [msgs objectAtIndex: 0];
}
}
return rc;
}
- (BOOL) _hasFlag: (NSString *) flag
{
BOOL rc;
NSDictionary *values;
NSArray *flags;
rc = NO;
values = [self _fetchProperty: @"FLAGS"];
if (values)
{
flags = [values objectForKey: @"flags"];
rc = [flags containsObject: flag];
}
return rc;
}
- (NSArray *) _emailAddressesFrom: (NSArray *) enveloppeAddresses
{
NSMutableArray *rc;
NGImap4EnvelopeAddress *address;
NSString *email;
int count, max;
rc = nil;
max = [enveloppeAddresses count];
if (max > 0)
{
rc = [NSMutableArray array];
for (count = 0; count < max; count++)
{
address = [enveloppeAddresses objectAtIndex: count];
email = [NSString stringWithFormat: @"%@", [address email]];
[rc addObject: email]; //TODO: Bug with escaping...
}
}
return rc;
}
// Properties
//{urn:schemas:httpmail:}
// date is already done
- (BOOL) hasAttachment
{
return ([[self fetchAttachmentIds] count] > 0);
}
- (BOOL) read
{
return [self _hasFlag: @"seen"];
}
- (NSString *) textDescription
{
return @"TODO";
}
//{urn:schemas:mailheader:}
- (NSArray *) cc
{
return [self _emailAddressesFrom: [self ccEnvelopeAddresses]];
}
// date is already done
- (NSArray *) from
{
return [self _emailAddressesFrom: [self fromEnvelopeAddresses]];
}
- (NSString *) inReplyTo
{
return [[self envelope] inReplyTo];
}
- (NSString *) messageId
{
return [[self envelope] messageID]; //TODO Bug escaping
}
- (NSString *) received
{
return @"TODO";
}
- (NSString *) references
{
return @"TODO";
}
- (NSString *) davDisplayName
{
return [self subject];
}
- (NSArray *) to
{
return [self _emailAddressesFrom: [self toEnvelopeAddresses]];
}
@end /* SOGoMailObject */