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