blob: 439e0d44164fe0a140ee1af7308ac4e51ce50366 (
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
#ifndef MAILCORE_MCMESSAGEHEADER_H
#define MAILCORE_MCMESSAGEHEADER_H
#include <MailCore/MCBaseTypes.h>
#include <time.h>
#ifdef __cplusplus
namespace mailcore {
class Address;
class MAILCORE_EXPORT MessageHeader : public Object {
public:
MessageHeader();
virtual ~MessageHeader();
virtual void setMessageID(String * messageID);
virtual String * messageID();
virtual bool isMessageIDAutoGenerated();
virtual void setReferences(Array * /* String */ references);
virtual Array * /* String */ references();
virtual void setInReplyTo(Array * /* String */ inReplyTo);
virtual Array * /* String */ inReplyTo();
virtual void setDate(time_t date);
virtual time_t date();
virtual void setReceivedDate(time_t date);
virtual time_t receivedDate();
virtual void setSender(Address * sender);
virtual Address * sender();
virtual void setFrom(Address * from);
virtual Address * from();
virtual void setTo(Array * /* Address */ to);
virtual Array * /* Address */ to();
virtual void setCc(Array * /* Address */ cc);
virtual Array * /* Address */ cc();
virtual void setBcc(Array * /* Address */ bcc);
virtual Array * /* Address */ bcc();
virtual void setReplyTo(Array * /* Address */ replyTo);
virtual Array * /* Address */ replyTo();
virtual void setSubject(String * subject);
virtual String * subject();
virtual void setUserAgent(String * userAgent);
virtual String * userAgent();
virtual void setExtraHeader(String *name, String * value);
virtual void removeExtraHeader(String *name);
virtual String * extraHeaderValueForName(String *name);
virtual Array * allExtraHeadersNames();
String * extractedSubject();
virtual String * partialExtractedSubject();
virtual void importHeadersData(Data * data);
virtual MessageHeader * replyHeader(bool replyAll, Array * addressesExcludedFromRecipient);
virtual MessageHeader * forwardHeader();
public: // subclass behavior
MessageHeader(MessageHeader * other);
virtual String * description();
virtual Object * copy();
virtual HashMap * serializable();
virtual void importSerializable(HashMap * serializable);
public: // private
virtual void importIMAPEnvelope(struct mailimap_envelope * env);
virtual void importIMAPReferences(Data * data);
virtual void importIMAPInternalDate(struct mailimap_date_time * date);
virtual struct mailimf_fields * createIMFFieldsAndFilterBcc(bool filterBcc);
virtual void importIMFFields(struct mailimf_fields * fields);
private:
String * mMessageID;
bool mMessageIDAutoGenerated;
Array * /* String */ mReferences;
Array * /* String */ mInReplyTo;
Address * mSender;
Address * mFrom;
Array * /* Address */ mTo;
Array * /* Address */ mCc;
Array * /* Address */ mBcc;
Array * /* Address */ mReplyTo;
String * mSubject;
time_t mDate;
time_t mReceivedDate;
HashMap * mExtraHeaders;
void init(bool generateDate, bool generateMessageID);
void setExtraHeaders(HashMap *headers);
Array * recipientWithReplyAll(bool replyAll, bool includeTo, bool includeCc, Array * senderEmails);
};
}
#endif
#endif
|