diff -r 000000000000 -r 29b1cd4cb562 bthci/hci2implementations/CommandsEvents/symbian/src/VendorDebugEvent.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bthci/hci2implementations/CommandsEvents/symbian/src/VendorDebugEvent.cpp Fri Jan 15 08:13:17 2010 +0200 @@ -0,0 +1,60 @@ +// Copyright (c) 2005-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: +// Implementation of TVendorDebugEvent. +// +// + +/** + @file + @internalComponent +*/ + +#include +#include +#include + +#include "symbiancommandseventsutils.h" + +#ifdef __FLOG_ACTIVE +_LIT8(KLogComponent, LOG_COMPONENT_COMMANDSEVENTS_SYMBIAN); +#endif + +EXPORT_C TVendorDebugEvent::TVendorDebugEvent(const TDesC8& aEventData) + : THCIEventBase(aEventData) + { + } + +EXPORT_C TVendorDebugEvent::TVendorDebugEvent(THCIEventCode aEventCode, + const TDesC8& aEventPayload, TDes8& aEventData) + : THCIEventBase(aEventCode, aEventPayload.Length(), aEventData) + { + PutString(aEventPayload, aEventData); // vendor-defined payload data + iEventData.Set(aEventData); + } + +EXPORT_C TVendorDebugEvent& TVendorDebugEvent::Cast(const THCIEventBase& aEvent) + { + __ASSERT_DEBUG(aEvent.EventCode() == EVendorDebugEvent, PANIC(KSymbianCommandsEventsPanicCat, EWrongEventCode)); + return *(reinterpret_cast(&const_cast(aEvent))); + } + +EXPORT_C TPtrC8 TVendorDebugEvent::VendorDebugData() const + { + return AsString(2); + } + +EXPORT_C TPtrC8 TVendorDebugEvent::VendorDebugEvent() const + { + return AsString(0); + }