Monotone-Parent: 884877bd53c2d3dbf1a3a0b3b87f122ccdec9640

Monotone-Revision: ed5df203630a48a2ac353943b36f22b0ba1acd7c

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-08-17T02:11:34
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2007-08-17 02:11:34 +00:00
parent 4598af7651
commit 5c60bd943f
3 changed files with 714 additions and 534 deletions

View file

@ -1,5 +1,37 @@
2007-08-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Mailer/SOGoDraftObject.m ([SOGoDraftObject -init]):
new method, initializing the new ivars: IMAP4ID, headers, text,
sourceURL and sourceFlag.
([-spoolFileManager], [SOGoDraftObject -userSpoolFolderPath])
([-_ensureUserSpoolFolderPath])
([-saveMimeMessageToTemporaryFileWithHeaders:])
([SOGoDraftObject -mimeMessageWithHeaders:_headers])
([-deleteTemporaryMessageFile:], [-delete], [-content])
([-GETAction:_ctx], [-DELETEAction:_ctx], [-fetchParts:])
([-uid], [-flags], [-size], [-envelope]): removed methods.
([SOGoDraftObject -storeInfo]): rewrote method to take the new
ivars into account.
([SOGoDraftObject -setSourceURL:newSourceURL])
([SOGoDraftObject -setSourceFlag:newSourceFlag]): new accessor
methods to store the url of the original message between accesses
so that, depending on the action taken (forward or reply), the
correct flag can be given.
([SOGoDraftObject -setIMAP4ID:]): new accessor method that sets
the imap4 id that is returned for the message whenever it is saved
into the drafts folder.
([SOGoDraftObject -save]): new method that takes in charge the
saving of the message in the IMAP drafts folder.
([SOGoDraftObject -fetchMailForReplying:sourceMailtoAll:toAll]):
new method that fills the original data of the new message with
the reply content of the original message.
([SOGoDraftObject -fetchMailForForwarding:sourceMail]): same as
above for message forwarding.
([-spoolFileManager]): removed useless method (only returned the
default filemanager...)
([SOGoDraftObject -mimeMessageAsData]): new method that returns
the resulting message as an NSData chunk.
* SoObjects/Mailer/SOGoMailObject+Draft.m: new extension module
containing a rewrite of the mail action methods found in
UI/Mailer/, that needed to be put in the SOGoMailObject class.

View file

@ -22,7 +22,7 @@
#ifndef __Mailer_SOGoDraftObject_H__
#define __Mailer_SOGoDraftObject_H__
#include <Mailer/SOGoMailBaseObject.h>
#import "SOGoMailBaseObject.h"
/*
SOGoDraftsFolder
@ -36,20 +36,48 @@
TODO: store-info should be an own object, not NSDictionary.
*/
@class NSString, NSArray, NSDictionary, NSData, NSException;
@class NGMimeMessage, NGImap4Envelope;
@class NSArray;
@class NSData;
@class NSDictionary;
@class NSException;
@class NGImap4Envelope;
@class NGMimeMessage;
@class NSMutableDictionary;
@class NSString;
@class SOGoMailObject;
@interface SOGoDraftObject : SOGoMailBaseObject
{
NSString *path;
NSDictionary *info; /* stores the envelope information */
NSString *path;
NGImap4Envelope *envelope;
int IMAP4ID;
NSMutableDictionary *headers;
NSString *text;
NSString *sourceURL;
NSString *sourceFlag;
}
/* contents */
- (void) fetchInfo;
- (NSException *) storeInfo;
- (NSDictionary *) fetchInfo;
- (NSException *) storeInfo: (NSDictionary *) _info;
- (void) fetchMailForEditing: (SOGoMailObject *) sourceMail;
- (void) fetchMailForReplying: (SOGoMailObject *) sourceMail
toAll: (BOOL) toAll;
- (void) fetchMailForForwarding: (SOGoMailObject *) sourceMail;
- (void) setHeaders: (NSDictionary *) newHeaders;
- (NSDictionary *) headers;
- (void) setText: (NSString *) newText;
- (NSString *) text;
/* for replies and forwards */
- (void) setSourceURL: (NSString *) newSurceURL;
- (void) setSourceFlag: (NSString *) newSourceFlag;
- (void) setIMAP4ID: (int) newIMAPID;
- (int) IMAP4ID;
/* attachments */
@ -62,19 +90,16 @@
/* NGMime representations */
- (NGMimeMessage *) mimeMessage;
- (NSString *) saveMimeMessageToTemporaryFile;
- (NSString *) saveMimeMessageToTemporaryFileWithHeaders:(NSDictionary *)_addh;
- (NSException *) sendMail;
- (NSData *) mimeMessageAsData;
/* operations */
- (NSException *) delete;
- (NSException *) sendMail;
- (NSException *) save;
/* fake being a SOGoMailObject */
// /* fake being a SOGoMailObject */
- (id) fetchParts: (NSArray *) _parts;
// - (id) fetchParts: (NSArray *) _parts;
@end

File diff suppressed because it is too large Load diff