blob: 63f325d3e355d9a0848b3aaa3deb15c86b6f214b (
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
|
#ifndef __MAILCORE_MCMESSAGEBUILDER_H_
#define __MAILCORE_MCMESSAGEBUILDER_H_
#include <MailCore/MCBaseTypes.h>
#include <MailCore/MCAbstractMessage.h>
#ifdef __cplusplus
namespace mailcore {
class Attachment;
class HTMLRendererTemplateCallback;
class MessageBuilder : public AbstractMessage {
public:
MessageBuilder();
virtual ~MessageBuilder();
virtual void setHTMLBody(String * htmlBody);
virtual String * htmlBody();
virtual void setTextBody(String * textBody);
virtual String * textBody();
virtual void setAttachments(Array * /* Attachment */ attachments);
virtual Array * /* Attachment */ attachments();
virtual void addAttachment(Attachment * attachment);
// attachments (usually images) that are included in HTML.
// a Content-ID should be assigned to these part to be able to reference
// them in the HTML using a cid: URL.
virtual void setRelatedAttachments(Array * /* Attachment */ attachments);
virtual Array * /* Attachment */ relatedAttachments();
virtual void addRelatedAttachment(Attachment * attachment);
// When boundary needs to be prefixed (to go through spam filters).
virtual void setBoundaryPrefix(String * boundaryPrefix);
virtual String * boundaryPrefix();
virtual Data * data();
virtual String * htmlRendering(HTMLRendererTemplateCallback * htmlCallback = NULL);
public: // subclass behavior
MessageBuilder(MessageBuilder * other);
virtual String * description();
virtual Object * copy();
private:
String * mHTMLBody;
String * mTextBody;
Array * mAttachments;
Array * mRelatedAttachments;
String * mBoundaryPrefix;
void init();
Data * dataAndFilterBcc(bool filterBcc);
};
};
#endif
#endif
|