bluetooth/btstack/linkmgr/bredrcontrollerconfiguration.h
branchRCL_3
changeset 11 20fda83a6398
equal deleted inserted replaced
10:8a27654f7b62 11:20fda83a6398
       
     1 // Copyright (c) 2010 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 BREDRCONTROLLERCONFIGURATION_H
       
    17 #define BREDRCONTROLLERCONFIGURATION_H
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <bttypespartner.h>
       
    21 #include <bluetooth/hcicommandqueueclient.h>
       
    22 
       
    23 class MHCICommandQueue;
       
    24 class CLinkMgrProtocol;
       
    25 
       
    26 /**
       
    27 	Handles page scan parameters update requests. Maps KPageScanParametersInfo enums to actual page scan parameters
       
    28 	and sends appropriate HCI commands.
       
    29 	Before the first update the original settings are stored. If fetching of them fails the default values
       
    30 	from the Bluetooth specification are used instead of them.
       
    31 */
       
    32 NONSHARABLE_CLASS(CBrEdrControllerConfiguration) : public CBase, public MHCICommandQueueClient
       
    33 	{
       
    34 public:
       
    35 	static CBrEdrControllerConfiguration* NewL(MHCICommandQueue& aCommandQueue, CLinkMgrProtocol& aLinkMgrProtocol);
       
    36 	~CBrEdrControllerConfiguration();
       
    37 
       
    38 	// from MHCICommandQueueClient
       
    39 	void MhcqcCommandEventReceived(const THCIEventBase& aEvent, const CHCICommandBase* aRelatedCommand);
       
    40 	void MhcqcCommandErrored(TInt aErrorCode, const CHCICommandBase* aCommand);
       
    41 
       
    42 	void SetPageScanParameters(TPageScanParameterSettings aPageScanSettings);
       
    43 
       
    44 private:
       
    45 	CBrEdrControllerConfiguration(MHCICommandQueue& aCommandQueue, CLinkMgrProtocol& aLinkMgrProtocol);
       
    46 
       
    47 private:
       
    48 	void SetPageScanParametersL(TPageScanParameterSettings aPageScanSettings);
       
    49 
       
    50 private:
       
    51 // owned
       
    52 	TUint16		iOriginalPageScanInterval;
       
    53 	TUint16		iOriginalPageScanWindow;
       
    54 	TUint8		iOriginalPageScanType;
       
    55 
       
    56 	TInt		iPageScanParameters;
       
    57 
       
    58 // non-owned resources
       
    59 	MHCICommandQueue&	iCommandQueue;
       
    60 	CLinkMgrProtocol&	iLinkMgrProtocol;
       
    61 	};
       
    62 
       
    63 #endif