2 Copyright (C) 2004-2005 SKYRIX Software AG
4 This file is part of OpenGroupware.org.
6 OGo is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with OGo; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __Mailer_SOGoDraftObject_H__
23 #define __Mailer_SOGoDraftObject_H__
25 #include <Mailer/SOGoMailBaseObject.h>
29 Parent object: SOGoDraftsFolder
30 Child objects: draft attachments?
32 The SOGoDraftObject is used for composing new messages. It is necessary
33 because we can't cache objects in a session. So the contents of the drafts
34 folder are some kind of "mail creation transaction".
36 TODO: store-info should be an own object, not NSDictionary.
39 @class NSString, NSArray, NSDictionary, NSData, NSException;
40 @class NGMimeMessage, NGImap4Envelope;
42 @interface SOGoDraftObject : SOGoMailBaseObject
45 NSDictionary *info; /* stores the envelope information */
46 NGImap4Envelope *envelope;
51 - (NSDictionary *)fetchInfo;
52 - (NSException *)storeInfo:(NSDictionary *)_info;
56 - (NSArray *)fetchAttachmentNames;
57 - (BOOL)isValidAttachmentName:(NSString *)_name;
58 - (NSException *)saveAttachment:(NSData *)_attach withName:(NSString *)_name;
59 - (NSException *)deleteAttachmentWithName:(NSString *)_name;
61 /* NGMime representations */
63 - (NGMimeMessage *)mimeMessage;
65 - (NSString *)saveMimeMessageToTemporaryFile;
66 - (NSString *)saveMimeMessageToTemporaryFileWithHeaders:(NSDictionary *)_addh;
67 - (NSException *)sendMimeMessageAtPath:(NSString *)_path;
69 - (NSException *)sendMail;
73 - (NSException *)delete;
75 /* fake being a SOGoMailObject */
77 - (id)fetchParts:(NSArray *)_parts;
81 #endif /* __Mailer_SOGoDraftObject_H__ */