From 629491e2fb9eab10551dfff6ee9e9ecc461eb70e Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 19 Nov 2007 15:02:25 +0000 Subject: [PATCH] Monotone-Parent: 92ce389a1151c9f1a5f222e3ad03a757f3be2bdd Monotone-Revision: 9cbf90659764ea3f6e6865022fda54ac0159d18f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-19T15:02:25 Monotone-Branch: ca.inverse.sogo --- SoObjects/Mailer/SOGoMailObject.h | 52 +++++++++++++++----------- SoObjects/Mailer/SOGoMailObject.m | 4 +- UI/MailPartViewers/UIxMailPartViewer.m | 2 +- 3 files changed, 33 insertions(+), 25 deletions(-) diff --git a/SoObjects/Mailer/SOGoMailObject.h b/SoObjects/Mailer/SOGoMailObject.h index e5d11e821..fa0b54584 100644 --- a/SoObjects/Mailer/SOGoMailObject.h +++ b/SoObjects/Mailer/SOGoMailObject.h @@ -37,8 +37,15 @@ would address the MIME part 1.2.3 of the mail 12345 in the folder INBOX. */ -@class NSData, NSString, NSArray, NSCalendarDate, NSException, NSDictionary; -@class NGImap4Envelope, NGImap4EnvelopeAddress; +@class NSArray; +@class NSCalendarDate; +@class NSData; +@class NSDictionary; +@class NSException; +@class NSString; + +@class NGImap4Envelope; +@class NGImap4EnvelopeAddress; @interface SOGoMailObject : SOGoMailBaseObject { @@ -53,42 +60,43 @@ /* core infos */ -- (BOOL)doesMailExist; -- (id)fetchCoreInfos; // TODO: what does it do? +- (BOOL) doesMailExist; +- (id) fetchCoreInfos; // TODO: what does it do? -- (NGImap4Envelope *)envelope; -- (NSString *)subject; -- (NSString *)decodedSubject; -- (NSCalendarDate *)date; -- (NSArray *)fromEnvelopeAddresses; -- (NSArray *)toEnvelopeAddresses; -- (NSArray *)ccEnvelopeAddresses; +- (NGImap4Envelope *) envelope; +- (NSString *) subject; +- (NSString *) decodedSubject; +- (NSCalendarDate *) date; +- (NSArray *) fromEnvelopeAddresses; +- (NSArray *) replyToEnvelopeAddresses; +- (NSArray *) toEnvelopeAddresses; +- (NSArray *) ccEnvelopeAddresses; - (NSDictionary *) mailHeaders; -- (id)bodyStructure; -- (id)lookupInfoForBodyPart:(id)_path; +- (id) bodyStructure; +- (id) lookupInfoForBodyPart:(id)_path; /* content */ -- (NSData *)content; -- (NSString *)contentAsString; +- (NSData *) content; +- (NSString *) contentAsString; /* bulk fetching of plain/text content */ -- (NSArray *)plainTextContentFetchKeys; -- (NSDictionary *)fetchPlainTextParts:(NSArray *)_fetchKeys; -- (NSDictionary *)fetchPlainTextParts; -- (NSDictionary *)fetchPlainTextStrings:(NSArray *)_fetchKeys; +- (NSArray *) plainTextContentFetchKeys; +- (NSDictionary *) fetchPlainTextParts:(NSArray *)_fetchKeys; +- (NSDictionary *) fetchPlainTextParts; +- (NSDictionary *) fetchPlainTextStrings:(NSArray *)_fetchKeys; /* flags */ -- (NSException *)addFlags:(id)_f; -- (NSException *)removeFlags:(id)_f; +- (NSException *) addFlags:(id)_f; +- (NSException *) removeFlags:(id)_f; /* deletion */ -- (BOOL)isDeletionAllowed; +- (BOOL) isDeletionAllowed; - (NSException *) trashInContext:(id)_ctx; - (NSException *) copyToFolderNamed: (NSString *) folderName inContext: (id)_ctx; diff --git a/SoObjects/Mailer/SOGoMailObject.m b/SoObjects/Mailer/SOGoMailObject.m index ae9cf8388..c2a5bd0e4 100644 --- a/SoObjects/Mailer/SOGoMailObject.m +++ b/SoObjects/Mailer/SOGoMailObject.m @@ -938,13 +938,13 @@ static BOOL debugSoParts = NO; - (NSException *) copyToFolderNamed: (NSString *) folderName inContext: (id)_ctx { - SOGoMailAccounts *destFolder; + SOGoMailFolder *destFolder; NSEnumerator *folders; NSString *currentFolderName, *reason; // TODO: check for safe HTTP method - destFolder = [self mailAccountsFolder]; + destFolder = (SOGoMailFolder *) [self mailAccountsFolder]; folders = [[folderName componentsSeparatedByString: @"/"] objectEnumerator]; currentFolderName = [folders nextObject]; currentFolderName = [folders nextObject]; diff --git a/UI/MailPartViewers/UIxMailPartViewer.m b/UI/MailPartViewers/UIxMailPartViewer.m index a8a78fa13..3639789c2 100644 --- a/UI/MailPartViewers/UIxMailPartViewer.m +++ b/UI/MailPartViewers/UIxMailPartViewer.m @@ -312,7 +312,7 @@ if (![url hasSuffix: @"/"]) url = [url stringByAppendingString: @"/"]; - /* if we get a message with an image/* or applicatio/* + /* if we get a message with an image/* or application/* Content-Type, we must generate a 'fake' part since our decoded mail won't have any. Also see SOGoMailBodyPart: -fetchBLOB and SOGoMailObject: -lookupImap4BodyPartKey: inContext for