equal
deleted
inserted
replaced
33 mMailClient(mailClient), |
33 mMailClient(mailClient), |
34 mLastProgressValue(0), |
34 mLastProgressValue(0), |
35 mRequestId(0) |
35 mRequestId(0) |
36 |
36 |
37 { |
37 { |
38 |
38 NM_FUNCTION; |
39 } |
39 } |
40 |
40 |
41 /*! |
41 /*! |
42 |
42 |
43 */ |
43 */ |
44 NmFwaMessagePartFetchingOperation::~NmFwaMessagePartFetchingOperation() |
44 NmFwaMessagePartFetchingOperation::~NmFwaMessagePartFetchingOperation() |
45 { |
45 { |
|
46 NM_FUNCTION; |
|
47 |
46 doCancelOperation(); |
48 doCancelOperation(); |
47 NMLOG("NmFwaMessagePartFetchingOperation::~NmFwaMessagePartFetchingOperation --->"); |
|
48 } |
49 } |
49 |
50 |
50 /*! |
51 /*! |
51 |
52 |
52 */ |
53 */ |
53 void NmFwaMessagePartFetchingOperation::RequestResponseL(TFSProgress aEvent, TInt aRequestId) |
54 void NmFwaMessagePartFetchingOperation::RequestResponseL(TFSProgress aEvent, TInt aRequestId) |
54 { |
55 { |
|
56 NM_FUNCTION; |
|
57 |
55 if (aRequestId == mRequestId) { |
58 if (aRequestId == mRequestId) { |
56 if (aEvent.iProgressStatus == TFSProgress::EFSStatus_RequestComplete ) { |
59 if (aEvent.iProgressStatus == TFSProgress::EFSStatus_RequestComplete ) { |
57 completeOperation(aEvent.iError); |
60 completeOperation(aEvent.iError); |
58 } |
61 } |
59 else if (aEvent.iProgressStatus == TFSProgress::EFSStatus_RequestCancelled) { |
62 else if (aEvent.iProgressStatus == TFSProgress::EFSStatus_RequestCancelled) { |
79 /*! |
82 /*! |
80 |
83 |
81 */ |
84 */ |
82 void NmFwaMessagePartFetchingOperation::doRunAsyncOperation() |
85 void NmFwaMessagePartFetchingOperation::doRunAsyncOperation() |
83 { |
86 { |
|
87 NM_FUNCTION; |
|
88 |
84 TRAPD(err, doRunAsyncOperationL()); |
89 TRAPD(err, doRunAsyncOperationL()); |
85 if (err != KErrNone) { |
90 if (err != KErrNone) { |
86 completeOperation(NmGeneralError); |
91 completeOperation(NmGeneralError); |
87 } |
92 } |
88 } |
93 } |
90 /*! |
95 /*! |
91 Leaving version from doRunAsyncOperation |
96 Leaving version from doRunAsyncOperation |
92 */ |
97 */ |
93 void NmFwaMessagePartFetchingOperation::doRunAsyncOperationL() |
98 void NmFwaMessagePartFetchingOperation::doRunAsyncOperationL() |
94 { |
99 { |
|
100 NM_FUNCTION; |
|
101 |
95 const TFSMailMsgId mailboxId(mMailboxId.pluginId32(), mMailboxId.id32()); |
102 const TFSMailMsgId mailboxId(mMailboxId.pluginId32(), mMailboxId.id32()); |
96 const TFSMailMsgId folderId(mFolderId.pluginId32(), mFolderId.id32()); |
103 const TFSMailMsgId folderId(mFolderId.pluginId32(), mFolderId.id32()); |
97 const TFSMailMsgId messageId(mMessageId.pluginId32(), mMessageId.id32()); |
104 const TFSMailMsgId messageId(mMessageId.pluginId32(), mMessageId.id32()); |
98 const TFSMailMsgId messagePartId(mMessagePartId.pluginId32(), mMessagePartId.id32()); |
105 const TFSMailMsgId messagePartId(mMessagePartId.pluginId32(), mMessagePartId.id32()); |
99 |
106 |
121 /*! |
128 /*! |
122 * Complete the operation |
129 * Complete the operation |
123 */ |
130 */ |
124 void NmFwaMessagePartFetchingOperation::doCompleteOperation() |
131 void NmFwaMessagePartFetchingOperation::doCompleteOperation() |
125 { |
132 { |
|
133 NM_FUNCTION; |
|
134 |
126 mRequestId = NmNotFoundError; |
135 mRequestId = NmNotFoundError; |
127 } |
136 } |
128 |
137 |
129 /*! |
138 /*! |
130 Cancels the async operation. \sa NmOperation |
139 Cancels the async operation. \sa NmOperation |
131 */ |
140 */ |
132 void NmFwaMessagePartFetchingOperation::doCancelOperation() |
141 void NmFwaMessagePartFetchingOperation::doCancelOperation() |
133 { |
142 { |
|
143 NM_FUNCTION; |
|
144 |
134 if (mRequestId >= 0) { |
145 if (mRequestId >= 0) { |
135 TRAP_IGNORE(mMailClient.CancelL(mRequestId)); |
146 TRAP_IGNORE(mMailClient.CancelL(mRequestId)); |
136 mRequestId = NmNotFoundError; |
147 mRequestId = NmNotFoundError; |
137 } |
148 } |
138 } |
149 } |