18 |
18 |
19 #ifndef NMVIEWERVIEWNETREPLY_H_ |
19 #ifndef NMVIEWERVIEWNETREPLY_H_ |
20 #define NMVIEWERVIEWNETREPLY_H_ |
20 #define NMVIEWERVIEWNETREPLY_H_ |
21 |
21 |
22 #include <QNetworkReply> |
22 #include <QNetworkReply> |
|
23 #include "nmcommon.h" |
|
24 |
|
25 class NmOperation; |
|
26 class NmMessage; |
|
27 class NmUiEngine; |
23 |
28 |
24 class NmViewerViewNetReply : public QNetworkReply |
29 class NmViewerViewNetReply : public QNetworkReply |
25 { |
30 { |
26 Q_OBJECT |
31 Q_OBJECT |
27 public: |
32 public: |
28 NmViewerViewNetReply(QVariant data); |
33 NmViewerViewNetReply(QVariant data, NmUiEngine &uiEngine); |
|
34 NmViewerViewNetReply(QVariant data, NmUiEngine &uiEngine, |
|
35 const NmId &mailboxId, const NmId &folderId, const NmId &messageId, |
|
36 const NmId &messagePartId); |
29 ~NmViewerViewNetReply(); |
37 ~NmViewerViewNetReply(); |
30 void setOriginalRequest(const QNetworkRequest &request); |
38 void setOriginalRequest(const QNetworkRequest &request); |
31 qint64 readData(char *data, qint64 maxlen); |
39 qint64 readData(char *data, qint64 maxlen); |
32 qint64 readBufferSize () const; |
40 qint64 readBufferSize () const; |
33 qint64 bytesAvailable () const; |
41 qint64 bytesAvailable () const; |
34 bool isSequential () const; |
42 bool isSequential () const; |
35 void abort(); |
43 void abort(); |
36 |
44 |
37 public slots: |
45 public slots: |
38 void signalReady(); |
46 void signalReady(); |
|
47 void fetchCompleted(int result); |
|
48 void fetchCancelled(); |
39 |
49 |
40 private: |
50 private: |
41 QByteArray mDataArray; |
51 QByteArray mDataArray; |
|
52 NmUiEngine &mUiEngine; |
|
53 NmId mMailboxId; |
|
54 NmId mFolderId; |
|
55 NmId mMessageId; |
|
56 NmId mMessagePartId; |
|
57 NmOperation *mOperation; |
42 qint64 mReadIndex; |
58 qint64 mReadIndex; |
43 }; |
59 }; |
44 |
60 |
45 #endif /* NMVIEWERVIEWNETREPLY_H_ */ |
61 #endif /* NMVIEWERVIEWNETREPLY_H_ */ |