|
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 Thu, 29 May 2008 15:23:56 (time stamp) |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #include <bluetooth/hci/iocapabilityresponseevent.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 TIOCapabilityResponseEvent::TIOCapabilityResponseEvent(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 TIOCapabilityResponseEvent::TIOCapabilityResponseEvent(const TBTDevAddr& aBDADDR, TUint8 aIOCapability, TUint8 aOOBDataPresent, TUint8 aAuthenticationRequirements, TDes8& aEventData) |
|
42 : THCIEventBase(EIOCapabilityResponseEvent, 9, aEventData) |
|
43 { |
|
44 |
|
45 PutDevAddr(aBDADDR, aEventData); |
|
46 PutTUint8(aIOCapability, aEventData); |
|
47 PutTUint8(aOOBDataPresent, aEventData); |
|
48 PutTUint8(aAuthenticationRequirements, aEventData); |
|
49 iEventData.Set(aEventData); |
|
50 } |
|
51 |
|
52 // Destructor |
|
53 EXPORT_C TIOCapabilityResponseEvent::~TIOCapabilityResponseEvent() |
|
54 { |
|
55 } |
|
56 |
|
57 // The static Cast method is used to obtain a pointer to the derived class object |
|
58 EXPORT_C TIOCapabilityResponseEvent& TIOCapabilityResponseEvent::Cast(const THCIEventBase& aEvent) |
|
59 { |
|
60 __ASSERT_DEBUG(aEvent.EventCode() == EIOCapabilityResponseEvent, PANIC(KSymbianCommandsEventsPanicCat, EWrongEventCode)); |
|
61 return *(reinterpret_cast<TIOCapabilityResponseEvent*>(&const_cast<THCIEventBase&>(aEvent))); |
|
62 } |
|
63 |
|
64 // Accessor methods for the parameters of the event |
|
65 |
|
66 EXPORT_C TBTDevAddr TIOCapabilityResponseEvent::BDADDR() const |
|
67 { |
|
68 return AsDevAddr(2); |
|
69 } |
|
70 |
|
71 EXPORT_C TUint8 TIOCapabilityResponseEvent::IOCapability() const |
|
72 { |
|
73 return AsTUint8(8); |
|
74 } |
|
75 |
|
76 EXPORT_C TUint8 TIOCapabilityResponseEvent::OOBDataPresent() const |
|
77 { |
|
78 return AsTUint8(9); |
|
79 } |
|
80 |
|
81 EXPORT_C TUint8 TIOCapabilityResponseEvent::AuthenticationRequirements() const |
|
82 { |
|
83 return AsTUint8(10); |
|
84 } |
|
85 |
|
86 |