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