convergedconnectionhandler/cchclientapi/src/cchserviceimpl.cpp
branchRCL_3
changeset 11 6134b5029079
parent 9 bddb6d4447db
child 12 876a3df1f464
equal deleted inserted replaced
10:ed1e38b404e5 11:6134b5029079
   134 // ---------------------------------------------------------------------------
   134 // ---------------------------------------------------------------------------
   135 //
   135 //
   136 TInt CCchServiceImpl::Enable( TCCHSubserviceType aType )
   136 TInt CCchServiceImpl::Enable( TCCHSubserviceType aType )
   137     {
   137     {
   138     CCHLOGSTRING( "CCchServiceImpl::Enable: IN" );
   138     CCHLOGSTRING( "CCchServiceImpl::Enable: IN" );
   139 	
   139     TInt error = KErrNone;
   140     iAsynchroniser->Enable(aType);
   140     if (iCch.ConnectivityDialogsAllowed())
       
   141         {
       
   142         CCHLOGSTRING( "CCchServiceImpl::Enable: Async mode" );
       
   143         iAsynchroniser->Enable(aType);
       
   144         }
       
   145     else
       
   146         {
       
   147         CCHLOGSTRING( "CCchServiceImpl::Enable: Sync mode" );
       
   148         TServiceSelection selection( iServiceId, aType );
       
   149         TRequestStatus status = KErrNone;
       
   150         iCch.CchClient().EnableService( selection, status, EFalse );
       
   151    
       
   152         //even the cchclient api seems to be asynchronous, 
       
   153         //this method is completed immediately
       
   154         User::WaitForRequest( status );
       
   155         error = status.Int();
       
   156         }
       
   157         
       
   158     CCHLOGSTRING2( " CCchServiceImpl::Enable: return  %d", error );
       
   159     
   141 	CCHLOGSTRING( "CCchServiceImpl::Enable: OUT" );
   160 	CCHLOGSTRING( "CCchServiceImpl::Enable: OUT" );
   142     return KErrNone;
   161     return error;
   143     }
   162     }
   144 
   163 
   145 // ---------------------------------------------------------------------------
   164 // ---------------------------------------------------------------------------
   146 // CCchServiceImpl::Disable
   165 // CCchServiceImpl::Disable
   147 // ---------------------------------------------------------------------------
   166 // ---------------------------------------------------------------------------