|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Api's email message implementation. |
|
16 */ |
|
17 |
|
18 #include "nmapiheaders.h" |
|
19 |
|
20 namespace EmailClientApi |
|
21 { |
|
22 |
|
23 /*! |
|
24 Class constructor. |
|
25 */ |
|
26 NmApiMessagePrivate::NmApiMessagePrivate() |
|
27 { |
|
28 NM_FUNCTION; |
|
29 } |
|
30 |
|
31 /*! |
|
32 Class destructor. |
|
33 */ |
|
34 NmApiMessagePrivate::~NmApiMessagePrivate() |
|
35 { |
|
36 NM_FUNCTION; |
|
37 } |
|
38 |
|
39 /*! |
|
40 \fn plainTextContent |
|
41 \return Message plain text content. |
|
42 |
|
43 Returns message plain text content. |
|
44 */ |
|
45 NmApiTextContent NmApiMessagePrivate::plainTextContent() |
|
46 { |
|
47 NM_FUNCTION; |
|
48 return mPlainTextContent; |
|
49 } |
|
50 |
|
51 /*! |
|
52 \fn htmlContent |
|
53 \return Message html text content. |
|
54 |
|
55 Returns message html text content. |
|
56 */ |
|
57 NmApiTextContent NmApiMessagePrivate::htmlContent() |
|
58 { |
|
59 NM_FUNCTION; |
|
60 return mHtmlContent; |
|
61 } |
|
62 |
|
63 /*! |
|
64 \fn isComplete |
|
65 \return Message complete state. |
|
66 |
|
67 Returns message complete state. |
|
68 */ |
|
69 bool NmApiMessagePrivate::isComplete() |
|
70 { |
|
71 NM_FUNCTION; |
|
72 return mComplete; |
|
73 } |
|
74 |
|
75 /*! |
|
76 \fn getAttachments |
|
77 \return Message attachment list. |
|
78 |
|
79 Returns message attachment list. |
|
80 */ |
|
81 QList<NmApiAttachment> NmApiMessagePrivate::attachments() |
|
82 { |
|
83 NM_FUNCTION; |
|
84 return mAttachments; |
|
85 } |
|
86 |
|
87 |
|
88 /*! |
|
89 \fn addAttachment |
|
90 \param attachment Attachment. |
|
91 |
|
92 Add attachment to message. |
|
93 */ |
|
94 void NmApiMessagePrivate::addAttachment(NmApiAttachment &attachment) |
|
95 { |
|
96 NM_FUNCTION; |
|
97 mAttachments.append(attachment); |
|
98 } |
|
99 |
|
100 /*! |
|
101 \fn envelope |
|
102 \return Message envelope. |
|
103 |
|
104 Returns message envelope. |
|
105 */ |
|
106 NmApiMessageEnvelope& NmApiMessagePrivate::envelope() |
|
107 { |
|
108 NM_FUNCTION; |
|
109 return mEnvelope; |
|
110 } |
|
111 |
|
112 /*! |
|
113 \fn setPlainTextContent |
|
114 \param textContent Content. |
|
115 |
|
116 Setter for plain text content. |
|
117 */ |
|
118 void NmApiMessagePrivate::setPlainTextContent(NmApiTextContent &textContent) |
|
119 { |
|
120 NM_FUNCTION; |
|
121 mPlainTextContent = textContent; |
|
122 } |
|
123 |
|
124 /*! |
|
125 \fn setHtmlContent |
|
126 \param textContent Content. |
|
127 |
|
128 Setter for html text content. |
|
129 */ |
|
130 void NmApiMessagePrivate::setHtmlContent(NmApiTextContent &textContent) |
|
131 { |
|
132 NM_FUNCTION; |
|
133 mHtmlContent = textContent; |
|
134 } |
|
135 |
|
136 /*! |
|
137 \fn setComplete |
|
138 \param complete Complete state. |
|
139 |
|
140 Setter for message complete state. |
|
141 */ |
|
142 void NmApiMessagePrivate::setComplete(bool complete) |
|
143 { |
|
144 NM_FUNCTION; |
|
145 mComplete = complete; |
|
146 } |
|
147 |
|
148 /*! |
|
149 \fn setAttachments |
|
150 \param attachments Attachments. |
|
151 |
|
152 Setter for set attachments to message. |
|
153 */ |
|
154 void NmApiMessagePrivate::setAttachments(QList<NmApiAttachment> &attachments) |
|
155 { |
|
156 NM_FUNCTION; |
|
157 mAttachments = attachments; |
|
158 |
|
159 } |
|
160 |
|
161 /*! |
|
162 \fn setEnvelope |
|
163 \param envelope Envelope. |
|
164 |
|
165 Setter for message envelope. |
|
166 */ |
|
167 void NmApiMessagePrivate::setEnvelope(NmApiMessageEnvelope &envelope) |
|
168 { |
|
169 NM_FUNCTION; |
|
170 mEnvelope = envelope; |
|
171 } |
|
172 |
|
173 } |