browserutilities/downloadmgr/DownloadMgrClntSrv/src/DownloadMgrSrvSession.cpp
changeset 37 cb62a4f66ebe
parent 0 dd21522fd290
child 65 5bfc169077b2
child 73 a1a5d4e727e8
equal deleted inserted replaced
36:0ed94ceaa377 37:cb62a4f66ebe
    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 
       
    20 // INCLUDE FILES
    19 // INCLUDE FILES
    21 #include "DownloadMgrLogger.h"
    20 #include "DownloadMgrLogger.h"
    22 #include "DownloadMgrServer.h"
    21 #include "DownloadMgrServer.h"
    23 #include "DownloadMgrDef.h"
    22 #include "DownloadMgrDef.h"
    24 #include "DownloadMgrEventQueue.h"
    23 #include "DownloadMgrEventQueue.h"
    25 
    24 
    26 #include <HttpClientAppInstance.h>
    25 #include "HttpClientAppInstance.h"
    27 #include <HttpDownload.h>
    26 #include "HttpDownload.h"
    28 #include <e32svr.h>
    27 #include <e32svr.h>
    29 #include <basched.h>
    28 #include <basched.h>
    30 
    29 
    31 // CONSTANTS
    30 // CONSTANTS
    32 
    31 
   172         }
   171         }
   173         
   172         
   174     // check for session-relative requests
   173     // check for session-relative requests
   175 	switch( aMessage.Function() )
   174 	switch( aMessage.Function() )
   176 		{
   175 		{
       
   176 	    case EHttpDownMgrNumOfSubSessions:
       
   177 	         {
       
   178 	         GetNumberOfSubsession();
       
   179 	         return;
       
   180 	         }
   177         case EHttpDownloadMgrInitialize:
   181         case EHttpDownloadMgrInitialize:
   178             {
   182             {
   179             InitializeL();
   183             InitializeL();
   180             return;
   184             return;
   181             }
   185             }
   307 // ---------------------------------------------------------
   311 // ---------------------------------------------------------
   308 //
   312 //
   309 const RMessage2& CDownloadMgrSession::CurrentMessage() const
   313 const RMessage2& CDownloadMgrSession::CurrentMessage() const
   310     {
   314     {
   311     return iCurrentMessage;
   315     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 );    
   312     }
   334     }
   313 
   335 
   314 // ---------------------------------------------------------
   336 // ---------------------------------------------------------
   315 // CDownloadMgrSession::InitializeL
   337 // CDownloadMgrSession::InitializeL
   316 // ---------------------------------------------------------
   338 // ---------------------------------------------------------