|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This file was generated automatically from the template eventsource.tmpl |
|
15 // on Wed, 25 Jul 2007 17:00:41 (time stamp) |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #include <bluetooth/hci/maxslotschangeevent.h> |
|
25 #include <bluetooth/hci/hcierrors.h> |
|
26 #include <bluetooth/hci/hciopcodes.h> |
|
27 #include "symbiancommandseventsutils.h" |
|
28 |
|
29 #ifdef __FLOG_ACTIVE |
|
30 _LIT8(KLogComponent, LOG_COMPONENT_COMMANDSEVENTS_SYMBIAN); |
|
31 #endif |
|
32 |
|
33 // Construct an event object to wrap existing event data received from the Controller |
|
34 EXPORT_C TMaxSlotsChangeEvent::TMaxSlotsChangeEvent(const TDesC8& aEventData) |
|
35 : THCIEventBase(aEventData) |
|
36 { |
|
37 |
|
38 } |
|
39 |
|
40 // Construct a faked event, storing the supplied event parameters into the supplied empty event data buffer. |
|
41 EXPORT_C TMaxSlotsChangeEvent::TMaxSlotsChangeEvent(THCIConnectionHandle aConnectionHandle, TUint8 aLMPMaxSlots, TDes8& aEventData) |
|
42 : THCIEventBase(EMaxSlotsChangeEvent, 3, aEventData) |
|
43 { |
|
44 |
|
45 PutConnectionHandle(aConnectionHandle, aEventData); |
|
46 PutTUint8(aLMPMaxSlots, aEventData); |
|
47 iEventData.Set(aEventData); |
|
48 } |
|
49 |
|
50 // Destructor |
|
51 EXPORT_C TMaxSlotsChangeEvent::~TMaxSlotsChangeEvent() |
|
52 { |
|
53 } |
|
54 |
|
55 // The static Cast method is used to obtain a pointer to the derived class object |
|
56 EXPORT_C TMaxSlotsChangeEvent& TMaxSlotsChangeEvent::Cast(const THCIEventBase& aEvent) |
|
57 { |
|
58 __ASSERT_DEBUG(aEvent.EventCode() == EMaxSlotsChangeEvent, PANIC(KSymbianCommandsEventsPanicCat, EWrongEventCode)); |
|
59 return *(reinterpret_cast<TMaxSlotsChangeEvent*>(&const_cast<THCIEventBase&>(aEvent))); |
|
60 } |
|
61 |
|
62 // Accessor methods for the parameters of the event |
|
63 |
|
64 EXPORT_C THCIConnectionHandle TMaxSlotsChangeEvent::ConnectionHandle() const |
|
65 { |
|
66 return AsConnectionHandle(2); |
|
67 } |
|
68 |
|
69 EXPORT_C TUint8 TMaxSlotsChangeEvent::LMPMaxSlots() const |
|
70 { |
|
71 return AsTUint8(4); |
|
72 } |
|
73 |
|
74 |