bluetooth/btstack/linkmgr/physicallinks.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 19 Aug 2010 11:01:00 +0300
branchRCL_3
changeset 22 786b94c6f0a4
parent 17 32ba20339036
child 25 99439b07e980
permissions -rw-r--r--
Revision: 201031 Kit: 201033
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16
9f17f914e828 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 12
diff changeset
     1
// Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
// All rights reserved.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
//
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
// Initial Contributors:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
//
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
// Contributors:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
//
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
// Description:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
//
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
#ifndef _PHYSICALLINKS_H
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
#define _PHYSICALLINKS_H
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
#include "linkmgr.h"
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
#include "RegistryHelpers.h"
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
#include "MBtHostControllerEventInternalNotifier.h"
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
#include "basebandsap.h"
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
#include "bluetooth/physicallinksstate.h"
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
#include "physicallinkmetrics.h"
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
#include <bt_sock.h>
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
#include <btmanclient.h>
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
#include <bluetooth/hcicommandqueueclient.h>
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
#include <bluetooth/hcicmdqcontroller.h>
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
static const TBTDevRemoteHwVersion KInvalidRemoteHwVersion={0xFF};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
static const TUint64 KInvalidRemoteFeatures = KMaxTUint64; 
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
static const TInt KBTArbitrationDelay = 1000000;	// 1s
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    37
class CPhysicalLink;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
class CBTSynchronousLink;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    39
class CBTProxySAP;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
class MPINCodeResponseHandler;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    41
class MLinkKeyResponseHandler;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
class CBTRegistryHelperBase;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    43
class MPhysicalLinkObserver;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    44
class CBTPinRequester;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
class CACLLink;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
class CRoleSwitcher;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
class CBTNumericComparator;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
class CBTPasskeyEntry;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
enum TPhysicalLinkSimplePairingMode
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
	{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
	EPhySimplePairingUndefined,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
	EPhySimplePairingDisabled,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
	EPhySimplePairingEnabled,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    55
	};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
enum TAuthStates
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
	{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    59
	EAuthenticationRequestPending = 0x1,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    60
	ELinkKeyRequestPending = 0x2,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
	EPinRequestPending = 0x4,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
	ESimplePairingPending = 0x8,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    63
	};	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    64
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    65
NONSHARABLE_CLASS(CArbitrationDelayTimer) : public CTimer
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    66
/**
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    67
	This class provides a timer which is used when the physical link goes into active mode
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    68
	to prevent an early switch back into a low power mode.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    69
**/
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    70
	{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    71
public:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    72
	static CArbitrationDelayTimer* NewL(CPhysicalLink* aParent);
17
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
    73
	TInt Start(TBool aImmediate, TBool aLocalPriority);
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
    74
	void Restart();
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
    75
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    76
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    77
	CArbitrationDelayTimer(CPhysicalLink* aParent);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    78
	void ConstructL();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    79
	void RunL();
17
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
    80
	void DoCancel();
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
    81
	TInt DoArbitrate();
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
    82
	void CancelButPreserveLocalPriority();
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
    83
3
4e39398d58ed Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 0
diff changeset
    84
private:
17
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
    85
	CPhysicalLink* iParent;
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
    86
	TBool iLocalPriority;
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    87
	};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    88
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    89
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    90
NONSHARABLE_STRUCT(TLogicalLinkListener)
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    91
	{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    92
	MLogicalLink*		iObserver;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    93
	TPhysicalLinkPort	iPort;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    94
	};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    95
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    96
/**
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    97
	The following class controls low power mode command requests and related events. 
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    98
	It bypasses HCI_Facade to keep deep control of all events including errors. 
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    99
	Its aim is also to forbid having more than one outstanding low power mode command.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   100
	It doesn't manage the trasmission of the "cancel" command when the other one has
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   101
	completed; it simply doesn't send a command if another one is pending.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   102
	However, using the Arbitrate and SAPSetOption mechanism, if a command is first dropped
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   103
	because another one is pending, it will be executed (if necessary) when the new
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   104
	arbitrate method will be called.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   105
	The class has a flag set when a new command is delivered and reset when the modechange
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   106
	event is received or an error occurs. When the flag is set no other commands are executed.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   107
**/
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   108
NONSHARABLE_CLASS(TLowPowModeCmdController) : public MHCICommandQueueClient
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   109
	{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   110
public:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   111
	TLowPowModeCmdController(CPhysicalLink& aLink, MHCICommandQueue& aCmdController);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   112
	void Abort();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   113
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   114
	TInt ExitMode(TBTLinkMode aMode, THCIConnHandle aHandle);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   115
	TInt ChangeMode(TBTLinkMode aMode, THCIConnHandle aHandle);
22
786b94c6f0a4 Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   116
	
786b94c6f0a4 Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   117
	TInt ExecuteModeChange(TBTLinkMode aTargetMode);
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   118
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   119
private:	// events from MHCICommandQueueClient
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   120
	virtual void MhcqcCommandEventReceived(const THCIEventBase& aEvent, const CHCICommandBase* aRelatedCommand);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   121
	virtual void MhcqcCommandErrored(TInt aErrorCode, const CHCICommandBase* aCommand);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   122
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   123
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   124
	void DoChangeModeL(TBTLinkMode aMode, THCIConnHandle aConnHandle);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   125
	void DoExitModeL(TBTLinkMode aMode, THCIConnHandle aConnHandle);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   126
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   127
	void SniffL(THCIConnHandle aHandleToRemote);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   128
	void ExitSniffL(THCIConnHandle aHandleToRemote);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   129
	void HoldL(THCIConnHandle aHandle);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   130
	void ParkL(THCIConnHandle aHandleToRemote);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   131
	void ExitParkL(THCIConnHandle aHandleToRemote);
22
786b94c6f0a4 Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   132
	
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   133
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   134
	CPhysicalLink&		iParent;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   135
	MHCICommandQueue&	iCmdController;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   136
	TBool				iOutstandingCmd;
22
786b94c6f0a4 Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 17
diff changeset
   137
	TBTLinkMode			iTargetMode;
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   138
	};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   139
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   140
/**
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   141
	The following class controls disconnect commands and related events. 
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   142
	It bypasses HCI_Facade to keep deep control of all events including errors. 
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   143
**/
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   144
NONSHARABLE_CLASS(TDisconnectCmdController) : public MHCICommandQueueClient
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   145
	{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   146
public:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   147
	TDisconnectCmdController(CPhysicalLink& aLink, MHCICommandQueue& aCmdController);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   148
	void Abort();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   149
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   150
	TInt Disconnect(THCIErrorCode aReason);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   151
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   152
private:	// events from MHCICommandQueueClient
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   153
	virtual void MhcqcCommandEventReceived(const THCIEventBase& aEvent, const CHCICommandBase* aRelatedCommand);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   154
	virtual void MhcqcCommandErrored(TInt aErrorCode, const CHCICommandBase* aCommand);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   155
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   156
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   157
	void DoDisconnectL(THCIErrorCode aReason);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   158
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   159
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   160
	CPhysicalLink&		iParent;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   161
	MHCICommandQueue&	iCmdController;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   162
	};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   163
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   164
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   165
/**
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   166
	The following class controls authentication requests and related events. 
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   167
	It bypasses HCI_Facade to keep deep control of all events including errors. 
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   168
**/
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   169
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   170
NONSHARABLE_CLASS(TAuthenticationCmdController) : public MHCICommandQueueClient
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   171
	{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   172
public:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   173
	TAuthenticationCmdController(CPhysicalLink& aLink, MHCICommandQueue& aCmdController);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   174
	void Abort();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   175
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   176
	// events from MLinkKeyResponseHandler
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   177
    TInt LinkKeyRequestReply(const TBTDevAddr& aBdaddr, const TDesC8& aLinkKey) const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   178
    TInt LinkKeyRequestNegativeReply(const TBTDevAddr& aBdaddr) const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   179
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   180
private:	// events from MHCICommandQueueClient
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   181
	virtual void MhcqcCommandEventReceived(const THCIEventBase& aEvent, const CHCICommandBase* aRelatedCommand);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   182
	virtual void MhcqcCommandErrored(TInt aErrorCode, const CHCICommandBase* aCommand);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   183
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   184
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   185
	CPhysicalLink&		iParent;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   186
	MHCICommandQueue&	iCmdController;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   187
	};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   188
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   189
/**
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   190
 * CEncryptionEnforcer.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   191
 * The following class avoid that a wanted encrypted connection becomes an unencrypted connection permanently.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   192
 * Due to the use of a timer, it switchs the encryption on when a previous "switch off" command is not paired
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   193
 * with the corrisponding "switch on" one. 
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   194
 * i.e.: due to a switch role the remote device disables the encryption but it doesn't enables it when the
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   195
 * operation is finished. In this case, after a while, CEncryptionEnforcer enables the encryption on its own.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   196
 * If a request to enable the encryption is refused CEncryptionEnforcer try to disconnect the physical link
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   197
 * because is not wanted that a requested encrypted connection is unencrypted.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   198
 **/
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   199
NONSHARABLE_CLASS(CEncryptionEnforcer) : public CActive
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   200
	{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   201
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   202
	enum TState
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   203
		{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   204
		EInactive,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   205
		ENoRoleSwitchTimerInProgress,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   206
		ERoleSwitchTimerInProgress,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   207
		EForcingInProgress,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   208
		};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   209
public:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   210
	~CEncryptionEnforcer();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   211
	static CEncryptionEnforcer* NewL(CPhysicalLink& aLink, THCIEncryptModeFlag aEncryptionMode);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   212
	static CEncryptionEnforcer* NewLC(CPhysicalLink& aLink, THCIEncryptModeFlag aEncryptionMode);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   213
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   214
	void EncryptionEnabled();
12
9b6d3ca0c601 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 11
diff changeset
   215
	void EncryptionDisabled(TBool aEncryptionPauseResumeSupported);
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   216
	void RoleSwitchEvent();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   217
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   218
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   219
	CEncryptionEnforcer(CPhysicalLink& aLink, THCIEncryptModeFlag aEncryptionMode);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   220
	void ConstructL();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   221
	void ChangeState(TState aState);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   222
	void Start(TInt delay);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   223
	void Stop();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   224
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   225
	// inherited from CActive
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   226
	void RunL();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   227
	void DoCancel();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   228
	TInt RunError(TInt aError);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   229
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   230
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   231
	static const TInt	KTimeOutDelay		= 	5000000;	// 5 secs delay
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   232
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   233
	CPhysicalLink&		iLink;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   234
	THCIEncryptModeFlag	iEncryptionMode;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   235
	TState				iState;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   236
	RTimer				iTimer;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   237
	};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   238
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   239
NONSHARABLE_CLASS(XAutoKeyRefreshToken): public MBluetoothControlPlaneToken
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   240
	{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   241
public:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   242
	TDblQueLink iQueLink;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   243
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   244
	virtual void Release();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   245
	};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   246
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   247
/**
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   248
 	This class avoid requesting to store device info to the registry, if a pending 
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   249
 	request for the same device info already exists.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   250
 **/
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   251
NONSHARABLE_CLASS(TRegistryDeviceBeingModified)
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   252
	{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   253
public:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   254
	TRegistryDeviceBeingModified();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   255
	TBool InUse() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   256
	TBool IsEqual(const TBTNamelessDevice& aDevice) const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   257
	void Begin(const TBTNamelessDevice& aDevice);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   258
	void RequestCompleted();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   259
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   260
	TInt					iReferenceCount;	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   261
	TBTNamelessDevice 		iDevice;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   262
	};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   263
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   264
/**
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   265
	The following class captures all the 'physical link' stuff such as
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   266
	whether parked/sniffed, role, etc; to a *given* device - as that is 
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   267
	what can be done: and is incorrect to talk about a parked 'ACL' transport
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   268
	as its a physical property that impacts SCO too.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   269
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   270
	At present the stack does not keep track of which of these are in the
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   271
	same piconet (hopping sequence): that would be a PhysicalLink class
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   272
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   273
	Whether there is need for that - possibly for piconet broadcast - then
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   274
	there might be a use for a CBTBroadcast connection - which would begin
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   275
	to reflect a piconet
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   276
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   277
 **/
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   278
NONSHARABLE_CLASS(CPhysicalLink) : public CBase,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   279
					  public MBTRegistryTaskNotifier,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   280
					  public MBtHostControllerEventInternalNotifier,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   281
					  public MPINCodeResponseHandler
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   282
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   283
	{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   284
public:			
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   285
	static CPhysicalLink* NewLC(CPhysicalLinksManager& aConnectionMan,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   286
								CRegistrySession& aRegSess, const TBTNamelessDevice& aDevice);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   287
	static CPhysicalLink* NewL(CPhysicalLinksManager& aConnectionMan,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   288
								CRegistrySession& aRegSess, const TBTNamelessDevice& aDevice);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   289
	~CPhysicalLink();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   290
	TInt SubscribeProxySAP(CBTProxySAP& aProxySAP);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   291
	void UnsubscribeProxySAP(CBTProxySAP& aProxySAP);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   292
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   293
	void SubscribeLinkObserver(MPhysicalLinkObserver& aSubscriber);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   294
	void UnsubscribeLinkObserver(MPhysicalLinkObserver& aSubscriber);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   295
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   296
	TInt TryToAndThenPreventHostEncryptionKeyRefresh(TAny* aOutToken);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   297
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   298
	inline const TBTDevAddr& BDAddr() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   299
	inline const TBTBasebandLinkState& LinkState() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   300
	inline TBool IsConnected() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   301
	inline TBool IsListening() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   302
	inline TBTBasebandRole Role() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   303
	void SetDeviceNamePending(TBool aBool);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   304
	TInt GetOption(TUint aLevel,TUint aName,TDes8& aOption) const;
17
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
   305
	void Connect(TBasebandPageTimePolicy aPolicy=EPagingNormal);
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   306
	TInt SCOConnect();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   307
	TInt SCOConnect(const TUint16 aUserHVPacketTypes);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   308
	TInt SynchronousConnect(TUint aTransmitBandwidth, TUint aReceiveBandwidth,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   309
		TUint16 aMaxLatency, TUint16 aVoiceSettings,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   310
		TUint8 aRetransmissionEffort, const TBTSyncPacketTypes aUserPacketTypes);
17
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
   311
	TInt Arbitrate(TBool aImmediately=EFalse, TBool aLocalPriority=EFalse); 
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
   312
	TInt DoArbitrate(TBool aLocalPriority);
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   313
	void SetPassKey(const TDesC8& aPassKey);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   314
	const TBTPinCode& PassKey() const;		
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   315
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   316
	void StartArbitrationTimer() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   317
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   318
	// from RegistryNotifier
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   319
	virtual void RegistryTaskComplete(CBTRegistryHelperBase* aHelper, TInt aResult);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   320
	virtual void RegistryTaskComplete(CBTRegistryHelperBase* aHelper, const TBTNamelessDevice& aDevice, TInt aResult);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   321
	virtual void RegistryTaskComplete(CBTRegistryHelperBase* aHelper, const TRegistryUpdateStatus aRegUpdateStatus, TInt aResult);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   322
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   323
	void SetModesAllowed(TUint8 aModesAllowed, TBool aRoleSwitchAllowed);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   324
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   325
	TBool IsModeSupportedRemotely(TBTLinkMode aMode) const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   326
	TBool IsEncryptionPauseResumeSupported() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   327
	TBool IsRoleSwitchSupported() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   328
	TBool IsEncryptionSupported() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   329
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   330
	inline TBool Authenticated() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   331
	inline TBool Encrypted() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   332
	TInt ChangeEncryption(THCIEncryptModeFlag aEnable);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   333
	TInt Authenticate(TBool aRequireAuthenticatedLinkKey);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   334
	TInt ChangeLinkKey();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   335
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   336
	TInt ChangeConnectionPacketType(TUint16 aType);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   337
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   338
	TInt RequestHold();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   339
	TInt RequestChangeRole(TBTBasebandRole aRole);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   340
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   341
	void ReadNewPhysicalLinkMetricValue(TUint aIoctlName, CBTProxySAP& aSAP, TInt aCurrentValue);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   342
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   343
	TInt OverridePark();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   344
	TInt UndoOverridePark();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   345
	TInt OverrideLPMWithTimeout(TUint aTimeout);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   346
	TInt OverrideLPM();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   347
	TInt UndoOverrideLPM();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   348
	inline TBool IsParked() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   349
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   350
	TBool ACLConnectPending() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   351
	TBool SyncConnectPending() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   352
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   353
	// events from MBtHostControllerEventInternalNotifier
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   354
	virtual void ConnectionComplete(THCIErrorCode aErr, const TBTConnect& aConn);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   355
	virtual void SynchronousConnectionComplete(THCIErrorCode aErr, const TBTConnect& aConn, const TBTSyncConnectOpts& aSyncOpts);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   356
	virtual void ConnectionRequest(const TBTConnect& aConn);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   357
	virtual void Disconnection(THCIErrorCode aErr, THCIConnHandle aConnH, THCIErrorCode aResult);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   358
	virtual void CompletedPackets(THCIConnHandle aConnH, TUint16 aNumPackets);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   359
	virtual void AuthenticationComplete(THCIErrorCode aErr, THCIConnHandle aConnH);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   360
	virtual void EncryptionChange(THCIErrorCode aErr, THCIConnHandle aConnH,TBool aEncrypted);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   361
	virtual void ACLDataReceived(THCIConnHandle aConnH, TUint8 aFlag, const TDesC8& aData);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   362
	virtual void SCODataReceived(THCIConnHandle aConnH, const TDesC8& aData);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   363
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   364
	virtual void PinRequest(const TBTDevAddr& aBDAddr, MPINCodeResponseHandler& aRequester);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   365
	virtual void NewLinkKey(const TBTDevAddr& aBDAddr, const TBTLinkKey& aLinkKey, THCILinkKeyType aLinkKeyType);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   366
	virtual void LinkKeyRequest(const TBTDevAddr& aBDAddr, MLinkKeyResponseHandler& aRequester);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   367
	virtual void ReadRemoteSupportedFeaturesComplete(THCIErrorCode aErr, THCIConnHandle aConnH, const TBTFeatures& aBitMask);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   368
	virtual void ReadRemoteExtendedFeaturesComplete(THCIErrorCode aErr, THCIConnHandle aConnH, TUint64 aBitMask, TUint8 aPageNumber, TUint8 aMaximumPageNumber);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   369
	virtual void ReadRemoteVersionInfoComplete(THCIErrorCode aErr, THCIConnHandle aConnH, const TBTDevRemoteHwVersion& aVer);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   370
	virtual void PacketTypeChange(THCIErrorCode aErr, THCIConnHandle aConnH, TUint16 aNewPacket);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   371
	virtual void LinkSupervisionTimeoutChange(THCIErrorCode aErr, THCIConnHandle aConnH, TUint16 aNewTimeout);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   372
	virtual void MaxSlotsChange(THCIConnHandle aConnH, TUint8 aSlots);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   373
	virtual void ModeChange(THCIErrorCode aErr, THCIConnHandle aConnH, TBTLinkMode aMode, TBasebandTime aInterval);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   374
	virtual void WriteLinkPolicySettingsCompleteEvent(THCIErrorCode aErr, THCIConnHandle aConnH);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   375
	virtual void RoleChange(THCIErrorCode aErr, const TBTDevAddr& aAddr, TBTBasebandRole aRole);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   376
	virtual void ClockOffset(THCIErrorCode aErr, THCIConnHandle aConnH, TBasebandTime aClockOffset);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   377
	virtual void RemoteName(THCIErrorCode aErr, const TBTDevAddr& aAddr, const TBTDeviceName8& aName);
17
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
   378
	
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
   379
	void ConnectionComplete(TInt aResult, const TBTConnect& aConn);
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   380
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   381
	TBool LinkKeyRequestPending();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   382
	void SetAuthenticationPending(TUint8 aFlag);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   383
	virtual void AuthenticationComplete(TUint8 aFlag);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   384
16
9f17f914e828 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 12
diff changeset
   385
	TBool IsAuthenticationRequestPending() const;
9f17f914e828 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 12
diff changeset
   386
9f17f914e828 Revision: 201017
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 12
diff changeset
   387
	
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   388
	static TInt OverrideLPMTimeoutCallback(TAny* aCPhysicalLink);// async callback
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   389
	static TInt TerminateCallback(TAny* aCPhysicalLink);// async callback
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   390
	TInt Terminate(THCIErrorCode aReason);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   391
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   392
	TInt AttachLogicalLink(TLinkType aLink, CBTBasebandSAP& aSAP);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   393
	void DetachLogicalLink(TLinkType aLink, CBTBasebandSAP& aSAP);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   394
	void PhysicalLinkUserIdle();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   395
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   396
	void PinRequestSent();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   397
	void PinRequestComplete();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   398
	void ConfirmationComplete();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   399
	void DeleteLinkKeyL();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   400
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   401
	TBool IsConnectionRequestPending() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   402
	void PendingConnectionRequest(TInt aError);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   403
	inline THCIConnHandle Handle() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   404
	TBool HasHandle(THCIConnHandle aConnH) const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   405
	inline const TBTNamelessDevice& RemoteDevice() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   406
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   407
	void GetCurrentBasebandState(TBTBasebandEventNotification & aEvent);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   408
	void TryToSend();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   409
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   410
	TBool HasSyncLink() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   411
	void GetDeviceFromRegistryL();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   412
	TBTLinkMode LinkMode() const; 
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   413
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   414
	void AsyncDeleteRoleSwitcher();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   415
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   416
	inline const TLinkPolicy& LinkPolicy() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   417
	inline const TBTFeatures& RemoteFeatures() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   418
	inline const TBTDeviceClass& DeviceClass() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   419
	TInt GetConnectionHandles(RHCIConnHandleArray& aConnectionHandles,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   420
							  TLinkType aLinkType) const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   421
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   422
	TInt GetNumPendingHandles(TInt& aConnectionHandles,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   423
							  TLinkType aLinkType) const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   424
	TBool IsEncryptionDisabledForRoleSwitch() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   425
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   426
	void IOCapabilityAskForResponse(THCIIoCapability aIOCapability, THCIOobDataPresence aOOBDataPresence, THCIAuthenticationRequirement aAuthenticationRequirement);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   427
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   428
	void SetLocalMITM(TBool aLocalMITM);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   429
	TBool AuthWithMITM() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   430
	TUint LSTO() const { return iLSTO; }
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   431
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   432
	TPhysicalLinkSimplePairingMode SimplePairingMode() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   433
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   434
	TBool HasRemoteOobData() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   435
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   436
	THCIAuthenticationRequirement AuthenticationRequirement() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   437
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   438
	void NewNumericComparatorL(const TBTDevAddr aAddr,CBTSecMan& aSecMan,TUint32 aNumericValue, TBool aInternallyInitiated);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   439
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   440
	CBTNumericComparator* InstanceNumericComparator() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   441
	TBool IsNumericComparatorActive()const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   442
	void DeleteNumericComparator();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   443
	void CancelNumericComparator();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   444
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   445
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   446
	void NewPasskeyEntryL(const TBTDevAddr aAddr,CBTSecMan& aSecMan,TUint32 aNumericValue, TBool aInternallyInitiated);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   447
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   448
	CBTPasskeyEntry* InstancePasskeyEntry() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   449
	TBool IsPasskeyEntryActive()const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   450
	void DeletePasskeyEntry();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   451
	void CancelPasskeyEntry();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   452
	void PasskeyEntryKeyPressed(THCIPasskeyEntryNotificationType aKey);
11
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   453
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   454
	void NewUserConfirmerL(const TBTDevAddr aAddr,CBTSecMan& aSecMan,TBool aInternallyInitiated);
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   455
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   456
	CBTUserConfirmer* InstanceUserConfirmer() const;
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   457
	TBool IsUserConfirmerActive()const;
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   458
	void DeleteUserConfirmer();
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   459
	void CancelUserConfirmer();
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   460
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   461
	
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   462
	TBasebandTime GetSniffInterval() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   463
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   464
	TBool IsPairable() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   465
11
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   466
	TBool IsPairingExpected() const;
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   467
	
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   468
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   469
	CPhysicalLink(CPhysicalLinksManager& aParent, CRegistrySession& aRegSess, const TBTNamelessDevice& aDevice);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   470
	void ConstructL();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   471
	void GetRemoteDetailsL(const TBTConnect& aConn);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   472
	void DoUpdateNameL(const TBTDeviceName8& aName);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   473
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   474
	void NotifyLogicalLinkUp(const TBTConnect& aConnect);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   475
	void NotifyLogicalSyncLinkUp(const TBTConnect& aConnect, const TBTSyncConnectOpts& aSyncOpts);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   476
	void NotifyLogicalLinkDown(TPhysicalLinkPort aPort);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   477
	void NotifyLogicalLinkError(TPhysicalLinkPort aPort, TInt aError);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   478
	void RejectConnection(const TBTConnect& aConn);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   479
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   480
	void DoPinRequestL(const TBTDevAddr& aAddr, MPINCodeResponseHandler& aRequester);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   481
	void UpdateFromInquiryCache();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   482
	void StoreDeviceL(TBool aPreventDeviceAddition);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   483
	void SetLinkKey(const TBTLinkKey& aLinkKey, TBTLinkKeyType aLinkKeyType);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   484
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   485
	void QueueIdleTimer(TInt aTime);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   486
	void RemoveIdleTimer();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   487
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   488
	void QueueLPMOverrideTimer(TInt aTimeout);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   489
	void NotifyStateChange(TBTBasebandEventNotification & aEvent);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   490
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   491
	TBool IsPhysicalLinkIdle() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   492
	TBasebandTime CalculatePageTimeout(TBasebandPageTimePolicy aPolicy, TUint8 aRepMode, TBool aValidClockOffset);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   493
	TBool IsPasskeyMinLengthOK();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   494
	TBool PeerSupportsLinkKeyRegeneration() const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   495
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   496
	void DeleteRoleSwitcher();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   497
	static TInt RoleSwitchCompleteCallBack(TAny* CPhysicalLink);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   498
	TInt ManageEncryptionEnforcement(THCIEncryptModeFlag aEnable);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   499
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   500
	void HandlePrefetch();
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   501
	void PINCodeRequestReply(const TBTDevAddr& aDevAddr,const TDesC8& aPin);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   502
	void PINCodeRequestNegativeReply(const TBTDevAddr& aDevAddr);
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   503
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   504
	inline TBool IsAuthenticationPending() const;
11
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   505
	
10
8a27654f7b62 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 3
diff changeset
   506
	void LinkKeyRequestResponseAttempt(TBool aForceResponse = EFalse);
8a27654f7b62 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 3
diff changeset
   507
	void DoLinkKeyResponse(TBool aPositive);
8a27654f7b62 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 3
diff changeset
   508
8a27654f7b62 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 3
diff changeset
   509
	void RemoteSimplePairingModeDetermined(TPhysicalLinkSimplePairingMode aSimplePairingMode);
8a27654f7b62 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 3
diff changeset
   510
	void SetPeerInSecurityMode3();
8a27654f7b62 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 3
diff changeset
   511
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   512
private: // from MPINCodeResponseHandler
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   513
	TInt PINCodeRequestReply(const TBTDevAddr& aDevAddr,const TDesC8& aPin) const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   514
	TInt PINCodeRequestNegativeReply(const TBTDevAddr& aDevAddr) const;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   515
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   516
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   517
	CPhysicalLinksManager&					iLinksMan; // The manager of remote physical link representations
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   518
	CRegistrySession&						iRegSess; // The RegistryServer session
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   519
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   520
	// the PHY's properties
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   521
	TBTNamelessDevice						iDevice; // names not stored here by in InqMgr
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   522
	TBTNamelessDevice						iRegistryDevice; // the view from the registry.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   523
	TBTBasebandLinkState					iLinkState;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   524
	THCIConnHandle							iHandle;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   525
	TBTFeatures								iRemoteFeatures;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   526
	TBTDevRemoteHwVersion					iRemoteVersion;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   527
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   528
	TInt									iDeviceResult; // Whether we got device from registry OK
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   529
	// the PHY's subscribers
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   530
	TDblQue<TPhysicalLinkObserverQLink>		iBasebandSubscribers;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   531
	// the PHY's outstanding registry helpers
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   532
	TSglQue<CBTRegistryHelperBase>			iRegistryHelpers;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   533
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   534
	// the PHY's UI handlers
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   535
	CBTPinRequester*						iPinRequester;	// looks after PIN entry UI/state
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   536
	CBTNumericComparator*					iNumericComparator; // looks after the numeric comparison UI/state
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   537
	CBTPasskeyEntry*						iPasskeyEntry; // looks after the passkey entry UI/state
11
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   538
	CBTUserConfirmer*					iUserConfirmer; // looks after the user confirmation UI/state
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   539
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   540
	CEncryptionEnforcer*					iEncryptionEnforcer;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   541
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   542
	// the PHY's supported logical links...
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   543
	RPointerArray<CACLLink>					iACLLogicalLinks;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   544
	CBTSynchronousLink*						iSyncLogicalLink; // stack only supports a signal one per PHY
10
8a27654f7b62 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 3
diff changeset
   545
8a27654f7b62 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 3
diff changeset
   546
	TBool						iLinkKeyRequestOutstanding;	// for if we have to wait for Registry or SSP support status
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   547
10
8a27654f7b62 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 3
diff changeset
   548
	MPINCodeResponseHandler*	iPinHandler;		// for forwarding responses to
8a27654f7b62 Revision: 201001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 3
diff changeset
   549
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   550
	TBTConnect 					iLastPendingConnection;		// for if we have to wait for Registry to decide whether to rject or accept a connection
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   551
	TBool						iPendingConnection;  // is a connection request waiting for a reply
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   552
	TSglQue<CBTProxySAP>		iProxySAPs;			// the proxies bound to us
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   553
	TDeltaTimerEntry			iIdleTimerEntry;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   554
	TBool						iIdleTimerQueued;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   555
	TDeltaTimerEntry			iOverrideLPMTimerEntry;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   556
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   557
	TLinkPolicy					iLinkPolicy;
17
32ba20339036 Revision: 201018
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 16
diff changeset
   558
	TUint16						iPreviousRequestedModeMask;
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   559
	TBool						iOverrideParkRequests; //for maybe temporary unpark
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   560
	TBool						iOverrideLPMRequests; //for maybe temporary force active
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   561
	TBool						iLPMOverrideTimerQueued;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   562
	TBool						iConnectionPacketTypeChanged; //for triggering h/w 
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   563
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   564
	TBool						iPreventLinkKeyUpdateReg; //for case e.g. user has called unpair when there is a paired logical channel
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   565
	TUint8						iAuthStateMask; // Authentication state mask to keep track of the authentication process
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   566
	TBool						iLinkKeyPending; //PIN has been sent, awaiting a link key.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   567
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   568
	TBool						iPeerInSecurityMode3;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   569
	TBasebandTime				iSniffInterval;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   570
	CArbitrationDelayTimer*		iArbitrationDelay; //for lower power modes
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   571
	CRoleSwitcher*				iRoleSwitcher; //class handles role switch, prevents LPM, removes encryption		
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   572
	CAsyncCallBack*				iRoleSwitchCompleteCallBack;// Async Callback to delete role swticher class.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   573
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   574
	TLowPowModeCmdController	iLowPowModeCtrl;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   575
	CPhysicalLinkMetrics*		iPhysicalLinkMetrics;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   576
	TDisconnectCmdController	iDisconnectCtrl;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   577
	TAuthenticationCmdController iAuthenticationCtrl;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   578
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   579
	TBool						iIOCapsReceived;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   580
	THCIIoCapability				iIOCapability;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   581
	THCIOobDataPresence			iOOBDataPresence;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   582
	THCIAuthenticationRequirement	iAuthenticationRequirement;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   583
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   584
	TBool						iRequireAuthenticatedLinkKey;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   585
	TBool						iLocalMITM; // Whether MITM protection was requested
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   586
	TUint						iLSTO;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   587
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   588
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   589
	TPhysicalLinkSimplePairingMode		iSimplePairingMode;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   590
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   591
	TDblQue<XAutoKeyRefreshToken>		iAutoKeyRefreshQue;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   592
	TRegistryDeviceBeingModified		iRegistryDevBeingMod;	// avoid duplicate equal registry device store req
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   593
	
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   594
	TInt						iIdleTimeout;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   595
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   596
	TBool						iNewPinCodeValid;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   597
	TBTPinCode					iNewPinCode;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   598
11
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   599
	TBool						iLinkKeyReturnedInThisAuthentication;
20fda83a6398 Revision: 201008
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 10
diff changeset
   600
	TBool						iLinkKeyObtainedThroughDedicatedBonding;
0
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   601
private:
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   602
	/**
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   603
	Enumeration to represent the current state of the physical links storage in the registry,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   604
	this is to cover the asynchronous properties of actions to the registry.
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   605
	*/
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   606
	enum TRemoteDeviceRecordedByStack
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   607
		{
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   608
		ENull,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   609
		EPending,
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   610
		EComplete
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   611
		};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   612
	TRemoteDeviceRecordedByStack	iRemoteDeviceRecordedByStack;
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   613
	TBool						iDisconnectRequested; //
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   614
	};
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   615
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   616
// Removed - LogicalLinkTrackers - if needed to prevent Park mode for legacy apps see in Perforce
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   617
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   618
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   619
#include "physicallinks.inl"
29b1cd4cb562 Revision: 200951_001
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   620
#endif //_PHYSICALLINKS_H