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_SOGoMailObject_H__
23 #define __Mailer_SOGoMailObject_H__
25 #include <SoObjects/Mailer/SOGoMailBaseObject.h>
29 Parent object: the SOGoMailFolder
30 Child objects: SOGoMailBodyPart's
32 Represents a single mail as retrieved using NGImap4. Since IMAP4 can parse
33 MIME structures on the server side, which we map into child objects of the
35 The child objects are accessed using integer IDs, eg:
37 would address the MIME part 1.2.3 of the mail 12345 in the folder INBOX.
40 @class NSData, NSString, NSArray, NSCalendarDate, NSException, NSDictionary;
41 @class NGImap4Envelope, NGImap4EnvelopeAddress;
43 @interface SOGoMailObject : SOGoMailBaseObject
47 NSDictionary *headers;
52 - (id)fetchParts:(NSArray *)_parts; /* Note: 'parts' are fetch keys here */
56 - (BOOL)doesMailExist;
57 - (id)fetchCoreInfos; // TODO: what does it do?
59 - (NGImap4Envelope *)envelope;
60 - (NSString *)subject;
61 - (NSCalendarDate *)date;
62 - (NSArray *)fromEnvelopeAddresses;
63 - (NSArray *)toEnvelopeAddresses;
64 - (NSArray *)ccEnvelopeAddresses;
67 - (id)lookupInfoForBodyPart:(id)_path;
72 - (NSString *)contentAsString;
74 /* bulk fetching of plain/text content */
76 - (NSArray *)plainTextContentFetchKeys;
77 - (NSDictionary *)fetchPlainTextParts:(NSArray *)_fetchKeys;
78 - (NSDictionary *)fetchPlainTextParts;
79 - (NSDictionary *)fetchPlainTextStrings:(NSArray *)_fetchKeys;
83 - (NSException *)addFlags:(id)_f;
84 - (NSException *)removeFlags:(id)_f;
88 - (BOOL)isDeletionAllowed;
89 - (NSException *)trashInContext:(id)_ctx;
93 #endif /* __Mailer_SOGoMailObject_H__ */