16 */ |
16 */ |
17 |
17 |
18 #ifndef NMAPIMESSAGEBODY_H |
18 #ifndef NMAPIMESSAGEBODY_H |
19 #define NMAPIMESSAGEBODY_H |
19 #define NMAPIMESSAGEBODY_H |
20 |
20 |
21 #include <QString> |
|
22 #include <QExplicitlySharedDataPointer> |
21 #include <QExplicitlySharedDataPointer> |
23 #include "nmenginedef.h" |
22 #include <nmapidef.h> |
|
23 |
|
24 class QString; |
24 |
25 |
25 namespace EmailClientApi |
26 namespace EmailClientApi |
26 { |
27 { |
27 |
28 |
28 class NmMessageBodyPrivate : public QSharedData |
29 class NmApiMessageBodyPrivate; |
|
30 |
|
31 class NMAPI_EXPORT NmApiMessageBody |
29 { |
32 { |
30 public: |
33 public: |
31 NmMessageBodyPrivate(); |
34 /*! |
32 virtual ~NmMessageBodyPrivate(); |
35 constructor for NmApiMessageBody |
33 |
|
34 quint64 totalSize; |
|
35 quint64 fetchedSize; |
|
36 QString content; |
|
37 }; |
|
38 |
|
39 class NMENGINE_EXPORT NmMessageBody |
|
40 { |
|
41 public: |
|
42 /* |
|
43 * constructor for nmmessagebody |
|
44 */ |
36 */ |
45 NmMessageBody(); |
37 NmApiMessageBody(); |
46 |
38 /*! |
47 virtual ~NmMessageBody(); |
39 copying constructor for NmApiMessageBody |
|
40 */ |
|
41 NmApiMessageBody(const NmApiMessageBody &apiMessageBody); |
|
42 |
|
43 /*! |
|
44 assignment operator for NmApiMessageBody |
|
45 */ |
|
46 NmApiMessageBody& operator=(const NmApiMessageBody &apiMessageBody); |
|
47 |
|
48 /*! |
|
49 Compare data from \a apiMessageBody |
|
50 */ |
|
51 bool operator==(const NmApiMessageBody &apiMessageBody); |
|
52 |
|
53 virtual ~NmApiMessageBody(); |
48 |
54 |
49 /*! |
55 /*! |
50 * getter for total size of message body in bytes |
56 getter for total size of message body in bytes |
51 */ |
57 */ |
52 quint64 totalSize() const; |
58 quint64 totalSize() const; |
53 |
59 |
54 /*! |
60 /*! |
55 * getter for bytes available in local mailbox store |
61 getter for bytes available in local mailbox store |
56 */ |
62 */ |
57 quint64 fetchedSize() const; |
63 quint64 fetchedSize() const; |
58 |
64 |
59 /*! |
65 /*! |
60 * getter for fetched content |
66 getter for fetched content |
61 */ |
67 */ |
62 QString content() const; |
68 QString content() const; |
63 |
69 |
64 /* |
70 /*! |
65 * setter for total size of message body in bytes |
71 setter for total size of message body in bytes |
66 */ |
72 */ |
67 void setTotalSize(quint64 size); |
73 void setTotalSize(quint64 size); |
68 |
74 |
69 /* |
75 /*! |
70 * setter for bytes available on local mailbox store |
76 setter for bytes available on local mailbox store |
71 */ |
77 */ |
72 void setFetchedSize(quint64 size); |
78 void setFetchedSize(quint64 size); |
73 |
79 |
74 /* |
80 /*! |
75 * setter for content |
81 setter for content |
76 */ |
82 */ |
77 void setContent(const QString& content); |
83 void setContent(const QString &content); |
78 |
84 |
79 private: |
85 private: |
80 QExplicitlySharedDataPointer<NmMessageBodyPrivate> d; |
86 QExplicitlySharedDataPointer<NmApiMessageBodyPrivate> d; |
81 }; |
87 }; |
82 } |
88 } |
83 #endif |
89 #endif |