convergedcallengine/serviceselector/src/cssconnectionhandler.cpp
branchRCL_3
changeset 19 7d48bed6ce0c
parent 0 ff3b6d0fd310
child 20 987c9837762f
equal deleted inserted replaced
18:594d59766373 19:7d48bed6ce0c
    55 // Symbian 2nd phase constructor can leave.
    55 // Symbian 2nd phase constructor can leave.
    56 // -----------------------------------------------------------------------------
    56 // -----------------------------------------------------------------------------
    57 //
    57 //
    58 void CSsConnectionHandler::ConstructL()
    58 void CSsConnectionHandler::ConstructL()
    59     {
    59     {
    60     iCch = CCch::NewL(); 
       
    61     }
    60     }
    62 
    61 
    63 // Destructor
    62 // Destructor
    64 CSsConnectionHandler::~CSsConnectionHandler()
    63 CSsConnectionHandler::~CSsConnectionHandler()
    65     {
    64     {
    66     delete iCch;
       
    67     }
    65     }
    68 
    66 
    69 // -----------------------------------------------------------------------------
    67 // -----------------------------------------------------------------------------
    70 // CSsServiceUtilities::IsVoipServiceRegistered
    68 // CSsServiceUtilities::IsVoipServiceRegistered
    71 // Checks is the service registered
    69 // Checks is the service registered
    72 // -----------------------------------------------------------------------------
    70 // -----------------------------------------------------------------------------
    73 //
    71 //
    74 TBool CSsConnectionHandler::IsVoipServiceRegistered
    72 TBool CSsConnectionHandler::IsVoipServiceRegistered
    75         ( 
    73         ( 
    76         TUint aServiceId 
    74         TUint /*aServiceId */
    77         ) const
    75         ) const
    78     {
    76     {
    79     TCchServiceStatus serviceStatus;
    77    
    80     TBool registered( EFalse );
    78     TBool registered( EFalse );     
    81     CCchService* service = iCch->GetService( aServiceId );
       
    82     if ( service )
       
    83         {
       
    84         service->GetStatus( ECCHVoIPSub, serviceStatus );
       
    85         registered = ( KErrNone == serviceStatus.Error() ) && 
       
    86                      ( ECCHEnabled == serviceStatus.State() );
       
    87         }
       
    88     
       
    89     CSSLOGSTRING4("CSSelector::IsRegistered: id:%d ,enabled:%d ,error:%d",
       
    90                 (TInt) aServiceId,
       
    91                 (TInt) ECCHEnabled == serviceStatus.State(),
       
    92                 (TInt) serviceStatus.Error());
       
    93      
       
    94     return registered;        
    79     return registered;        
    95     }
    80     }
    96 
    81 
    97 // ================= OTHER EXPORTED FUNCTIONS ===============================
    82 // ================= OTHER EXPORTED FUNCTIONS ===============================
    98 
    83