equal
deleted
inserted
replaced
102 Q_GLOBAL_STATIC(CMTMEngine,mtmEngine); |
102 Q_GLOBAL_STATIC(CMTMEngine,mtmEngine); |
103 |
103 |
104 CMTMEngine::CMTMEngine() |
104 CMTMEngine::CMTMEngine() |
105 : CActive(EPriorityStandard) |
105 : CActive(EPriorityStandard) |
106 { |
106 { |
|
107 connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), this, SLOT(cleanupMTMBackend())); |
|
108 |
107 iFsSession.Connect(); |
109 iFsSession.Connect(); |
108 CActiveScheduler::Add(this); |
110 CActiveScheduler::Add(this); |
109 iTimer.CreateLocal(); |
111 iTimer.CreateLocal(); |
110 |
112 |
111 TRAPD(err, |
113 TRAPD(err, |
159 Q_UNUSED(err2) |
161 Q_UNUSED(err2) |
160 } |
162 } |
161 |
163 |
162 CMTMEngine::~CMTMEngine() |
164 CMTMEngine::~CMTMEngine() |
163 { |
165 { |
|
166 |
|
167 } |
|
168 |
|
169 void CMTMEngine::cleanupMTMBackend() |
|
170 { |
164 iCmsvEntryPoolFree.ResetAndDestroy(); |
171 iCmsvEntryPoolFree.ResetAndDestroy(); |
165 iCmsvEntryPoolInUse.ResetAndDestroy(); |
172 iCmsvEntryPoolInUse.ResetAndDestroy(); |
166 |
173 |
167 delete ipPop3Mtm; |
174 delete ipPop3Mtm; |
168 delete ipImap4Mtm; |
175 delete ipImap4Mtm; |
170 delete ipMmsMtm; |
177 delete ipMmsMtm; |
171 delete ipSmsMtm; |
178 delete ipSmsMtm; |
172 |
179 |
173 delete ipClientMtmReg; |
180 delete ipClientMtmReg; |
174 delete ipMsvSession; |
181 delete ipMsvSession; |
175 |
182 |
176 TRAPD(error, |
183 TRAPD(error, |
177 TBuf<KMaxPath> privatePath; |
184 TBuf<KMaxPath> privatePath; |
178 FsSession().CreatePrivatePath(EDriveC); |
185 FsSession().CreatePrivatePath(EDriveC); |
179 FsSession().PrivatePath(privatePath); |
186 FsSession().PrivatePath(privatePath); |
180 TBuf<KMaxPath> path; |
187 TBuf<KMaxPath> path; |
189 Q_UNUSED(error) |
196 Q_UNUSED(error) |
190 |
197 |
191 Cancel(); |
198 Cancel(); |
192 iTimer.Close(); |
199 iTimer.Close(); |
193 iFsSession.Close(); |
200 iFsSession.Close(); |
|
201 |
194 } |
202 } |
195 |
203 |
196 CMTMEngine* CMTMEngine::instance() |
204 CMTMEngine* CMTMEngine::instance() |
197 { |
205 { |
198 return mtmEngine(); |
206 return mtmEngine(); |
5726 void CAsynchronousMTMOperation::DoCancel() |
5734 void CAsynchronousMTMOperation::DoCancel() |
5727 { |
5735 { |
5728 ipMsvOperation->Cancel(); |
5736 ipMsvOperation->Cancel(); |
5729 } |
5737 } |
5730 |
5738 |
|
5739 #include "moc_qmtmengine_symbian_p.cpp"; |
|
5740 |
5731 QTM_END_NAMESPACE |
5741 QTM_END_NAMESPACE |