aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/abstract/MCAbstractMessage.h
blob: 1f567a52efd16db25ba17478e36ebc01f4b83e22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef MAILCORE_MCABSTRACTMESSAGE_H

#define MAILCORE_MCABSTRACTMESSAGE_H

#include <MailCore/MCBaseTypes.h>

#ifdef __cplusplus

namespace mailcore {
    
    class AbstractPart;
    class MessageHeader;
    
    class MAILCORE_EXPORT AbstractMessage : public Object {
    public:
        AbstractMessage();
        virtual ~AbstractMessage();
        
        /** Header of the message. */
        virtual MessageHeader * header();
        /** Set a header of the message. */
        virtual void setHeader(MessageHeader * header);
        
        /** Returns a part matching the given contentID. */
        virtual AbstractPart * partForContentID(String * contentID);
        /** Returns a part matching the given uniqueID */
        virtual AbstractPart * partForUniqueID(String * uniqueID);
        
        /** Returns the list of attachments, not part of the content of the message. */
        virtual Array * /* AbstractPart */ attachments();
        /** Returns the list of attachments that are shown inline in the content of the message. */
        virtual Array * /* AbstractPart */ htmlInlineAttachments();
        /** Returns the list of the text parts required to render the message properly. */
        virtual Array * /* AbstractPart */ requiredPartsForRendering();
        
    public: //subclass behavior
        AbstractMessage(AbstractMessage * other);
        virtual String * description();
        virtual Object * copy();
        virtual HashMap * serializable();
        virtual void importSerializable(HashMap * hashmap);
        
    private:
        MessageHeader * mHeader;
        void init();
        
    };
    
}

#endif

#endif