bluetoothmgmt/bluetoothclientlib/btlib/physicallinkmetrichelpers.h
changeset 0 29b1cd4cb562
equal deleted inserted replaced
-1:000000000000 0:29b1cd4cb562
       
     1 // Copyright (c) 2008-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 
       
    17 #ifndef PHYSICALLINKMETRICHELPERS_H
       
    18 #define PHYSICALLINKMETRICHELPERS_H
       
    19 
       
    20 #include <bt_sock.h>
       
    21 #include <bluetooth/lmoptions.h>
       
    22 
       
    23 NONSHARABLE_CLASS(CBluetoothPhysicalLinkMetricSubscriber): public CActive
       
    24 	{
       
    25 public:
       
    26 	static CBluetoothPhysicalLinkMetricSubscriber* NewL(
       
    27 								CBluetoothPhysicalLinkMetrics& aParent,
       
    28 								RSocketServ& aSockServ,
       
    29 								RSocket& aConnectedSocket);
       
    30 	
       
    31 	static CBluetoothPhysicalLinkMetricSubscriber* NewL(
       
    32 									CBluetoothPhysicalLinkMetrics& aParent,
       
    33 									RSocketServ& aSockServ,
       
    34 									const TBTDevAddr& aAddr);
       
    35 
       
    36 	~CBluetoothPhysicalLinkMetricSubscriber();
       
    37 	
       
    38 	void SubscribePhysicalLinkMetric(TBTLMIoctls aIoctl);
       
    39 	
       
    40 private:
       
    41 	CBluetoothPhysicalLinkMetricSubscriber(CBluetoothPhysicalLinkMetrics& aParent);
       
    42 	
       
    43 	void ConstructL(RSocketServ& aSockServ,	RSocket& aConnectedSocket);
       
    44 	void ConstructL(RSocketServ& aSockServ,	const TBTDevAddr& aAddr);
       
    45 	
       
    46 	void RunL();
       
    47 	TInt RunError(TInt aError);
       
    48 	void DoCancel();
       
    49 
       
    50 private:
       
    51 	RBTBaseband iBaseband;
       
    52 	CBluetoothPhysicalLinkMetrics& iParent;
       
    53 	TBTLMIoctls iPhysicalLinkMetric;
       
    54 	TPckgBuf<TInt> iValue;
       
    55 	};
       
    56 
       
    57 #endif // PHYSICALLINKMETRICHELPERS_H