equal
deleted
inserted
replaced
14 * Description: |
14 * Description: |
15 * This file contains the declaration of the Download Mgr Server. |
15 * This file contains the declaration of the Download Mgr Server. |
16 * |
16 * |
17 */ |
17 */ |
18 |
18 |
|
19 |
19 // INCLUDE FILES |
20 // INCLUDE FILES |
20 #include "DownloadMgrLogger.h" |
21 #include "DownloadMgrLogger.h" |
21 #include "DownloadMgrServer.h" |
22 #include "DownloadMgrServer.h" |
22 #include "DownloadMgrDef.h" |
23 #include "DownloadMgrDef.h" |
23 #include "DownloadMgrEventQueue.h" |
24 #include "DownloadMgrEventQueue.h" |
24 |
25 |
25 #include "HttpClientAppInstance.h" |
26 #include <HttpClientAppInstance.h> |
26 #include "HttpDownload.h" |
27 #include <HttpDownload.h> |
27 #include <e32svr.h> |
28 #include <e32svr.h> |
28 #include <basched.h> |
29 #include <basched.h> |
29 |
30 |
30 // CONSTANTS |
31 // CONSTANTS |
31 |
32 |
171 } |
172 } |
172 |
173 |
173 // check for session-relative requests |
174 // check for session-relative requests |
174 switch( aMessage.Function() ) |
175 switch( aMessage.Function() ) |
175 { |
176 { |
176 case EHttpDownMgrNumOfSubSessions: |
|
177 { |
|
178 GetNumberOfSubsession(); |
|
179 return; |
|
180 } |
|
181 case EHttpDownloadMgrInitialize: |
177 case EHttpDownloadMgrInitialize: |
182 { |
178 { |
183 InitializeL(); |
179 InitializeL(); |
184 return; |
180 return; |
185 } |
181 } |
311 // --------------------------------------------------------- |
307 // --------------------------------------------------------- |
312 // |
308 // |
313 const RMessage2& CDownloadMgrSession::CurrentMessage() const |
309 const RMessage2& CDownloadMgrSession::CurrentMessage() const |
314 { |
310 { |
315 return iCurrentMessage; |
311 return iCurrentMessage; |
316 } |
|
317 |
|
318 // --------------------------------------------------------- |
|
319 // CDownloadMgrSession::GetNumberOfSubsession |
|
320 // --------------------------------------------------------- |
|
321 // |
|
322 void CDownloadMgrSession::GetNumberOfSubsession() |
|
323 { |
|
324 TInt32 value(0); |
|
325 for( TInt i = 0; i < iObjectIx->Count(); i++ ){ |
|
326 CDownloadSubSession* downloadSess |
|
327 = ( CDownloadSubSession* )(*iObjectIx)[i]; |
|
328 if( downloadSess != NULL ){ |
|
329 value++; |
|
330 } |
|
331 } |
|
332 TPckg<TInt32> pckg( value ); |
|
333 Write( 0, CurrentMessage(), pckg ); |
|
334 } |
312 } |
335 |
313 |
336 // --------------------------------------------------------- |
314 // --------------------------------------------------------- |
337 // CDownloadMgrSession::InitializeL |
315 // CDownloadMgrSession::InitializeL |
338 // --------------------------------------------------------- |
316 // --------------------------------------------------------- |