From ad49c5dca77e60e9407875a67f9c2cc12ed931c1 Mon Sep 17 00:00:00 2001 From: C Robert Date: Thu, 1 Oct 2009 14:07:59 +0000 Subject: [PATCH] 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 --- SoObjects/Mailer/SOGoMailObject.m | 130 ------------------------------ 1 file changed, 130 deletions(-) diff --git a/SoObjects/Mailer/SOGoMailObject.m b/SoObjects/Mailer/SOGoMailObject.m index 0545fbf33..ff34c46b3 100644 --- a/SoObjects/Mailer/SOGoMailObject.m +++ b/SoObjects/Mailer/SOGoMailObject.m @@ -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 */