syncmlfw/common/obex/obexclient/src/Btobexsearcher.cpp
branchRCL_3
changeset 61 b183ec05bd8c
parent 58 4af31167ea77
child 62 19bba8228ff0
equal deleted inserted replaced
59:13d7c31c74e0 61:b183ec05bd8c
    78 CBTObexSearcher::~CBTObexSearcher()
    78 CBTObexSearcher::~CBTObexSearcher()
    79     {
    79     {
    80 	Cancel();
    80 	Cancel();
    81     delete iServiceSearcher;
    81     delete iServiceSearcher;
    82     delete iSettings;   
    82     delete iSettings;   
    83     if ( iNotifier.Handle() )
    83 /*    if ( iNotifier.Handle() )
    84         {
    84         {
    85         iNotifier.Close();
    85         iNotifier.Close();
    86         }
    86         }
       
    87 */        
    87     }
    88     }
    88 
    89 
    89 //----------------------------------------------------------------------------
    90 //----------------------------------------------------------------------------
    90 // CBTObexSearcher::RunL()
    91 // CBTObexSearcher::RunL()
    91 //----------------------------------------------------------------------------
    92 //----------------------------------------------------------------------------
   135 			{
   136 			{
   136             case EIdle:
   137             case EIdle:
   137                 {
   138                 {
   138                 if( iWaitingForBTPower && iOffline() != EFalse )
   139                 if( iWaitingForBTPower && iOffline() != EFalse )
   139                     {
   140                     {
   140                     if ( iNotifier.Handle() )
   141  /*                   if ( iNotifier.Handle() )
   141 				        {
   142 				        {
   142 				        iNotifier.Close();
   143 				        iNotifier.Close();
   143 				        }
   144 				        }
       
   145  */
   144                     TInt err = iSettings->ChangePowerStateTemporarily( );
   146                     TInt err = iSettings->ChangePowerStateTemporarily( );
   145                     if( err )
   147                     if( err )
   146                         {
   148                         {
   147                         NotifyDeviceErrorL( err );
   149                         NotifyDeviceErrorL( err );
   148                         }
   150                         }
   176 				}
   178 				}
   177 
   179 
   178 			}
   180 			}
   179 		}
   181 		}
   180 	}
   182 	}
   181 
       
   182 // ----------------------------------------------------------------------------
   183 // ----------------------------------------------------------------------------
   183 // CBTObexSearcher::RunError
   184 // CBTObexSearcher::RunError
   184 // ----------------------------------------------------------------------------
   185 // ----------------------------------------------------------------------------
   185 TInt CBTObexSearcher::RunError ( TInt /*aError*/ )
   186 TInt CBTObexSearcher::RunError ( TInt /*aError*/ )
   186     {
   187     {
   187         return KErrNone;
   188         return KErrNone;
   188     }	
   189 	}
   189 
   190 
   190 //----------------------------------------------------------------------------
   191 //----------------------------------------------------------------------------
   191 // CBTObexSearcher::DoCancel()
   192 // CBTObexSearcher::DoCancel()
   192 //----------------------------------------------------------------------------
   193 //----------------------------------------------------------------------------
   193 //
   194 //
   299     TBTEnabledInOfflineMode offlineAllowed = EBTDisabledInOfflineMode;
   300     TBTEnabledInOfflineMode offlineAllowed = EBTDisabledInOfflineMode;
   300     User::LeaveIfError( iSettings->GetOfflineModeSettings( offline, offlineAllowed ) );
   301     User::LeaveIfError( iSettings->GetOfflineModeSettings( offline, offlineAllowed ) );
   301     if( offline == ECoreAppUIsNetworkConnectionNotAllowed && 
   302     if( offline == ECoreAppUIsNetworkConnectionNotAllowed && 
   302          offlineAllowed == EBTEnabledInOfflineMode )
   303          offlineAllowed == EBTEnabledInOfflineMode )
   303         {
   304         {
   304         User::LeaveIfError( iNotifier.Connect() );
   305 /*        User::LeaveIfError( iNotifier.Connect() );
   305         TBTGenericQueryNotiferParamsPckg pckg;
   306         TBTGenericQueryNotiferParamsPckg pckg;
   306         pckg().iMessageType = EBTActivateOffLineQuery;
   307         pckg().iMessageType = EBTActivateOffLineQuery;
   307         pckg().iNameExists = EFalse;
   308         pckg().iNameExists = EFalse;
   308         iNotifier.StartNotifierAndGetResponse( iStatus, KBTGenericQueryNotifierUid, 
   309         iNotifier.StartNotifierAndGetResponse( iStatus, KBTGenericQueryNotifierUid, 
   309                                                 pckg, iOffline );
   310                                                 pckg, iOffline );
   310         SetActive();
   311         SetActive();
       
   312 */        
   311         }
   313         }
   312     else if( offline == ECoreAppUIsNetworkConnectionNotAllowed && 
   314     else if( offline == ECoreAppUIsNetworkConnectionNotAllowed && 
   313             offlineAllowed == EBTDisabledInOfflineMode )
   315             offlineAllowed == EBTDisabledInOfflineMode )
   314            {
   316            {
   315            NotifyDeviceErrorL( KErrNotSupported );
   317            NotifyDeviceErrorL( KErrNotSupported );