contentpublishingsrv/contentpublishingserver/cpserver/src/cpserver.cpp
branchRCL_3
changeset 74 edd621764147
parent 19 502e5d91ad42
equal deleted inserted replaced
64:b276298d5729 74:edd621764147
    91     CP_DEBUG( _L8("CCPServer::ConstructL()" ) );
    91     CP_DEBUG( _L8("CCPServer::ConstructL()" ) );
    92     StartL(KCPServerName);
    92     StartL(KCPServerName);
    93     iBURListener = CCPServerBURListener::NewL(this);
    93     iBURListener = CCPServerBURListener::NewL(this);
    94     iCountSession = 0;
    94     iCountSession = 0;
    95     iBURLock = iBURListener->CheckBUR();
    95     iBURLock = iBURListener->CheckBUR();
    96     iDataManager = CCPDataManager::NewL(iBURLock);
    96     iDataManager = CCPDataManager::NewL(iDataMapCache, iBURLock);
    97     iActionHandlerThread = CCPActionHandlerThread::NewL();
    97     iActionHandlerThread = CCPActionHandlerThread::NewL();
    98     if (!iBURLock)
    98     if (!iBURLock)
    99         {
    99         {
   100         TRAP_IGNORE( DeactivatePublishersL() );
   100         TRAP_IGNORE( DeactivatePublishersL() );
   101         }
   101         }
   121 // -------------------------------------- ---------------------------------------
   121 // -------------------------------------- ---------------------------------------
   122 //    
   122 //    
   123 CCPServer::~CCPServer()
   123 CCPServer::~CCPServer()
   124     {
   124     {
   125     CP_DEBUG( _L8("CCPServer::~CCPServer()" ) );
   125     CP_DEBUG( _L8("CCPServer::~CCPServer()" ) );
       
   126     iDataMapCache.Reset();
   126     for ( TInt i(0); i< iNotifications.Count( ); i++ )
   127     for ( TInt i(0); i< iNotifications.Count( ); i++ )
   127         {
   128         {
   128         iNotifications[i]->Close( );
   129         iNotifications[i]->Close( );
   129         }
   130         }
   130     iNotifications.Close( );    
   131     iNotifications.Close( );    
   169         iBURLock = ETrue;
   170         iBURLock = ETrue;
   170         iDataManager->CloseDatabase( );
   171         iDataManager->CloseDatabase( );
   171         }
   172         }
   172     else
   173     else
   173         {
   174         {
   174         iDataManager->OpenDatabaseL( );
   175         iDataManager->OpenDatabaseL(iDataMapCache);
   175         iBURLock = EFalse;
   176         iBURLock = EFalse;
   176         }
   177         }
   177     }
   178     }
   178 
   179 
   179 // ---------------------------------------------------------------------------
   180 // ---------------------------------------------------------------------------
   190 // -----------------------------------------------------------------------------
   191 // -----------------------------------------------------------------------------
   191 //
   192 //
   192 RPointerArray<CLiwDefaultList>& CCPServer::GetNotifications( ) 
   193 RPointerArray<CLiwDefaultList>& CCPServer::GetNotifications( ) 
   193     {
   194     {
   194     return iNotifications;
   195     return iNotifications;
       
   196     }
       
   197 
       
   198 // -----------------------------------------------------------------------------
       
   199 // CCPServer::GetDataMapCache
       
   200 // -----------------------------------------------------------------------------
       
   201 //
       
   202 TLiwVariant& CCPServer::GetDataMapCache()
       
   203     {
       
   204     return iDataMapCache;
   195     }
   205     }
   196 
   206 
   197 
   207 
   198 // -----------------------------------------------------------------------------
   208 // -----------------------------------------------------------------------------
   199 // CCPServer::NewSessionL
   209 // CCPServer::NewSessionL