aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/imap/MCIMAPMessage.h
blob: 7053ef9296027724a293f06cb81668c96d2202a0 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef __MAILCORE_IMAP_MESSAGE_H_

#define __MAILCORE_IMAP_MESSAGE_H_

#include <MailCore/MCBaseTypes.h>
#include <MailCore/MCAbstractMessage.h>
#include <MailCore/MCMessageConstants.h>
#include <MailCore/MCAbstractPart.h>

#ifdef __cplusplus

namespace mailcore {
    
    class IMAPPart;
    class HTMLRendererIMAPCallback;
    class HTMLRendererTemplateCallback;
    
    class IMAPMessage : public AbstractMessage {
    public:
        IMAPMessage();
        ~IMAPMessage();
        
        virtual uint32_t uid();
        virtual void setUid(uint32_t uid);
        
        virtual void setFlags(MessageFlag flags);
        virtual MessageFlag flags();
        
        virtual void setOriginalFlags(MessageFlag flags);
        virtual MessageFlag originalFlags();
        
        virtual uint64_t modSeqValue();
        virtual void setModSeqValue(uint64_t uid);
        
        virtual void setMainPart(AbstractPart * mainPart);
        virtual AbstractPart * mainPart();
        
        virtual void setGmailLabels(Array * /* String */ labels);
        virtual Array * /* String */ gmailLabels();
        
        virtual void setGmailMessageID(uint64_t msgID);
        virtual uint64_t gmailMessageID();
        		
        virtual void setGmailThreadID(uint64_t threadID);
        virtual uint64_t gmailThreadID();
        
        virtual AbstractPart * partForPartID(String * partID);
        
        virtual AbstractPart * partForContentID(String * contentID);
        virtual AbstractPart * partForUniqueID(String * uniqueID);
        
        virtual String * htmlRendering(String * folder,
                                       HTMLRendererIMAPCallback * dataCallback,
                                       HTMLRendererTemplateCallback * htmlCallback = NULL);
        
    public: // subclass behavior
        IMAPMessage(IMAPMessage * other);
        virtual Object * copy();
        virtual String * description();
        
    private:
        uint64_t mModSeqValue;
        uint32_t mUid;
        MessageFlag mFlags;
        MessageFlag mOriginalFlags;
        AbstractPart * mMainPart;
        Array * /* String */ mLabels;
        uint64_t mMessageID;
        uint64_t mThreadID;
        void init();
    };
    
}

#endif

#endif