bluetoothcommsprofiles/btpan/panhelpersvr/panhelperdevicediscoverer.h
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef PANHELPERDEVICEDISCOVERER_H
       
    17 #define PANHELPERDEVICEDISCOVERER_H
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <e32std.h>
       
    21 #include <btsdp.h>
       
    22 #include <es_sock.h>
       
    23 #include <bt_sock.h>
       
    24 
       
    25 namespace PanHelper
       
    26 	{
       
    27 	
       
    28 const TUint KCharComma = ',';
       
    29 
       
    30 NONSHARABLE_CLASS(CPanHelperDeviceDiscoverer) : public CActive
       
    31 /**
       
    32 Helper class to perform the device discovery
       
    33 @internalTechnology
       
    34 */
       
    35 	{
       
    36 public:
       
    37 	static CPanHelperDeviceDiscoverer* NewL();
       
    38 	~CPanHelperDeviceDiscoverer();
       
    39 	
       
    40 	// CActive methods
       
    41 	virtual void RunL();
       
    42 	virtual void DoCancel();
       
    43 	
       
    44 	void FindDevice(TDesC& aDeviceAddrList, TDes8& aDeviceAddr, TRequestStatus& aStatus);
       
    45 	void CancelFindDevice();
       
    46 	
       
    47 
       
    48 private:
       
    49 	CPanHelperDeviceDiscoverer();
       
    50 	void ConstructL();
       
    51 	
       
    52 	void ConvertListToArray(TDesC& aDeviceAddrList);
       
    53 public:
       
    54 
       
    55 private:
       
    56 	RSocketServ iSockServ;
       
    57 	RHostResolver iHostResolver;
       
    58 	TInquirySockAddr iInquiryAddr;
       
    59 	TNameEntry iNameEntry;
       
    60 	RArray<TBTDevAddr> iDeviceAddresses;
       
    61 	TPckgBuf<TBTDevAddr>* iRemDevAddrBuf;
       
    62 	TRequestStatus* iClientStatus;
       
    63 	};
       
    64 	}
       
    65 #endif //PANHELPERDEVICEDISCOVERER_H