bluetooth/btstack/linkmgr/linkqitem.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 09 Jun 2010 10:55:02 +0300
branchRCL_3
changeset 18 1f10b9300be6
parent 0 29b1cd4cb562
permissions -rw-r--r--
Revision: 201018 Kit: 2010123

// Copyright (c) 2001-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:
// The LL-level frames that are suitable for Q-ing
// 
//

#ifndef LINKQITEM_H__
#define LINKQITEM_H__

#include <e32std.h>
#include <e32base.h>
#include <bttypes.h>

#include <bluetooth/hci/hciframe.h>

class TDataPlaneElementHandle;
class TSockAddr;

NONSHARABLE_CLASS(CACLDataItem) : public CBase
	{
friend class CAclDataQ;
public:
	CACLDataItem();
	CHctlAclDataFrame*& Frame();
	static CACLDataItem* NewL();
	~CACLDataItem();

	inline void SetElementHandle(TSockAddr* aAddr);
	inline TDataPlaneElementHandle* ElementHandle() const;
private:
	TSglQueLink iLink;
	CHctlAclDataFrame* iFrame;

	TDataPlaneElementHandle* iElementHandle;  // Non-owned pointer.
	};

inline void CACLDataItem::SetElementHandle(TSockAddr* aAddr)
	{
	iElementHandle = reinterpret_cast<TDataPlaneElementHandle*>(aAddr);
	}

inline TDataPlaneElementHandle* CACLDataItem::ElementHandle() const
	{
	return iElementHandle;
	}

#endif