ncdengine/debuglogger/obex/src/btservicesearcher.cpp
branchRCL_3
changeset 25 7333d7932ef7
parent 0 ba25891c3a9e
child 26 8b7f4e561641
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
    25     {
    25     {
    26     }
    26     }
    27 
    27 
    28 CBTServiceSearcher::~CBTServiceSearcher()
    28 CBTServiceSearcher::~CBTServiceSearcher()
    29 {
    29 {
       
    30 #ifdef _0
    30     if (iIsDeviceSelectorConnected)
    31     if (iIsDeviceSelectorConnected)
    31 	{
    32 	{
    32         iDeviceSelector.CancelNotifier(KDeviceSelectionNotifierUid);
    33         iDeviceSelector.CancelNotifier(KDeviceSelectionNotifierUid);
    33         iDeviceSelector.Close();
    34         iDeviceSelector.Close();
    34 	}
    35 	}
       
    36 #endif
       
    37     
    35     delete iSdpSearchPattern;
    38     delete iSdpSearchPattern;
    36     iSdpSearchPattern = NULL;
    39     iSdpSearchPattern = NULL;
    37 	
    40 	
    38     delete iAgent;
    41     delete iAgent;
    39     iAgent = NULL;
    42     iAgent = NULL;
    44 	}
    47 	}
    45 }
    48 }
    46 
    49 
    47 void CBTServiceSearcher::Cancel() {
    50 void CBTServiceSearcher::Cancel() {
    48 
    51 
       
    52 #ifdef _0
    49     if (iIsDeviceSelectorConnected)
    53     if (iIsDeviceSelectorConnected)
    50 	{
    54 	{
    51         iDeviceSelector.CancelNotifier(KDeviceSelectionNotifierUid);
    55         iDeviceSelector.CancelNotifier(KDeviceSelectionNotifierUid);
    52     
    56     
    53 	}
    57 	}
       
    58 #endif
       
    59     
    54     delete iSdpSearchPattern;
    60     delete iSdpSearchPattern;
    55     iSdpSearchPattern = NULL;
    61     iSdpSearchPattern = NULL;
    56 	
    62 	
    57     delete iAgent;
    63     delete iAgent;
    58     iAgent = NULL;
    64     iAgent = NULL;
    64 
    70 
    65 
    71 
    66 
    72 
    67 }
    73 }
    68 
    74 
    69 void CBTServiceSearcher::SelectDeviceByDiscoveryL(TRequestStatus& aObserverRequestStatus)
    75 void CBTServiceSearcher::SelectDeviceByDiscoveryL(TRequestStatus& /* aObserverRequestStatus */)
    70     {
    76     {
       
    77     
       
    78 #ifdef _0
    71     if (!iIsDeviceSelectorConnected)
    79     if (!iIsDeviceSelectorConnected)
    72         {
    80         {
    73         User::LeaveIfError(iDeviceSelector.Connect());
    81         User::LeaveIfError(iDeviceSelector.Connect());
    74         iIsDeviceSelectorConnected = ETrue;
    82         iIsDeviceSelectorConnected = ETrue;
    75         }
    83         }
       
    84 #endif
    76 
    85 
    77     //  Request a device selection 
    86     //  Request a device selection 
    78     TBTDeviceSelectionParamsPckg selectionFilter;
    87     TBTDeviceSelectionParamsPckg selectionFilter;
    79     selectionFilter().SetUUID(ServiceClass());
    88     selectionFilter().SetUUID(ServiceClass());
    80 
    89     
       
    90 #ifdef _0
    81     iDeviceSelector.StartNotifierAndGetResponse(
    91     iDeviceSelector.StartNotifierAndGetResponse(
    82         aObserverRequestStatus, 
    92         aObserverRequestStatus, 
    83         KDeviceSelectionNotifierUid, 
    93         KDeviceSelectionNotifierUid, 
    84         selectionFilter, 
    94         selectionFilter, 
    85         iResponse);
    95         iResponse);
       
    96 #endif
    86     }
    97     }
    87 
    98 
    88 
    99 
    89 void CBTServiceSearcher::FindServiceL(TRequestStatus& aObserverRequestStatus)
   100 void CBTServiceSearcher::FindServiceL(TRequestStatus& aObserverRequestStatus)
    90     {
   101     {