bluetoothmgmt/bluetoothclientlib/btlib/btphysicallinkshelpers.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 17:48:21 +0300
branchRCL_3
changeset 14 f8503e232b0c
parent 0 29b1cd4cb562
permissions -rw-r--r--
Revision: 201011 Kit: 201017

// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
// btbbsockethelpers.h
// BT socket interface types
// 
//

#ifndef BTBBSOCKETHELPERS_H
#define BTBBSOCKETHELPERS_H
//=============================================================================
//Active Objects
//

//CBluetoothPhysicalLinks Active Objects...
NONSHARABLE_CLASS(CBTBasebandConnecter) : public CActive
	{
public:
	static CBTBasebandConnecter* NewL(CBluetoothPhysicalLinks& aParent);
	void BasebandConnect(const TBTDevAddr& aBDAddr);

	~CBTBasebandConnecter();


private:
	CBTBasebandConnecter(CBluetoothPhysicalLinks& aParent);
	void ConstructL();
	void DoCancel();
	void RunL();
	TInt RunError(TInt aError);

	CBluetoothPhysicalLinks& iParent;
	};


NONSHARABLE_CLASS(CBTDisconnector) : public CActive
	{
public:
	static CBTDisconnector* NewL(CBluetoothPhysicalLinks& aParent);
	void Disconnect(const TBTDevAddr& aBDAddr);
	void DisconnectAll();
	void DisconnectAllForPowerOff();
	~CBTDisconnector();


private:
	enum TCurrentRequest
		{
		ENone,
		EDisconnect,
		EDisconnectAll,
		};
	CBTDisconnector(CBluetoothPhysicalLinks& aParent);
	void ConstructL();
	void DoCancel();
	void RunL();
	TInt RunError(TInt aError);

	CBluetoothPhysicalLinks& iParent;
	TCurrentRequest iCurrentRequest;
	};

#endif