|
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 commandsource.tmpl |
|
15 // on Thu, 29 May 2008 15:17:51 (time stamp) |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #include <bluetooth/hci/rolediscoverycommand.h> |
|
25 #include <bluetooth/hci/event.h> |
|
26 #include <bluetooth/hci/commandcompleteevent.h> |
|
27 #include <bluetooth/hci/hciframe.h> |
|
28 #include <bluetooth/hci/hciopcodes.h> |
|
29 |
|
30 |
|
31 #ifdef __FLOG_ACTIVE |
|
32 _LIT8(KLogComponent, LOG_COMPONENT_COMMANDSEVENTS_SYMBIAN); |
|
33 #endif |
|
34 |
|
35 |
|
36 |
|
37 // Factory methods |
|
38 |
|
39 EXPORT_C CRoleDiscoveryCommand* CRoleDiscoveryCommand::NewL(THCIConnectionHandle aConnectionHandle) |
|
40 { |
|
41 CRoleDiscoveryCommand* self = new (ELeave) CRoleDiscoveryCommand(aConnectionHandle); |
|
42 CleanupStack::PushL(self); |
|
43 self->CHCICommandBase::BaseConstructL(); |
|
44 CleanupStack::Pop(self); |
|
45 return self; |
|
46 } |
|
47 |
|
48 EXPORT_C CRoleDiscoveryCommand* CRoleDiscoveryCommand::NewL() |
|
49 { |
|
50 CRoleDiscoveryCommand* self = new (ELeave) CRoleDiscoveryCommand(); |
|
51 CleanupStack::PushL(self); |
|
52 self->CHCICommandBase::BaseConstructL(); |
|
53 CleanupStack::Pop(self); |
|
54 return self; |
|
55 } |
|
56 |
|
57 // Constructors |
|
58 |
|
59 CRoleDiscoveryCommand::CRoleDiscoveryCommand(THCIConnectionHandle aConnectionHandle) |
|
60 : CHCICommandBase(KRoleDiscoveryOpcode) |
|
61 , iConnectionHandle(aConnectionHandle) |
|
62 { |
|
63 SetExpectsCommandStatusEvent(EFalse); |
|
64 } |
|
65 |
|
66 CRoleDiscoveryCommand::CRoleDiscoveryCommand() |
|
67 : CHCICommandBase(KRoleDiscoveryOpcode) |
|
68 { |
|
69 SetExpectsCommandStatusEvent(EFalse); |
|
70 } |
|
71 |
|
72 // Destructor |
|
73 CRoleDiscoveryCommand::~CRoleDiscoveryCommand() |
|
74 { |
|
75 |
|
76 } |
|
77 |
|
78 |
|
79 |
|
80 // Override of pure virtual from CHCICommandBase. This method embodies the knowledge |
|
81 // of how to format the specifics of this command into the HCTL command frame. |
|
82 void CRoleDiscoveryCommand::Format(CHctlCommandFrame& aCommandFrame) const |
|
83 { |
|
84 aCommandFrame.PutConnectionHandle(iConnectionHandle); |
|
85 } |
|
86 |
|
87 // Assign new values to the parameters of this command |
|
88 EXPORT_C void CRoleDiscoveryCommand::Reset(THCIConnectionHandle aConnectionHandle) |
|
89 { |
|
90 iConnectionHandle = aConnectionHandle; |
|
91 } |
|
92 |
|
93 // Accessor methods for the parameters of the command |
|
94 |
|
95 EXPORT_C THCIConnectionHandle CRoleDiscoveryCommand::ConnectionHandle() const |
|
96 { |
|
97 return iConnectionHandle; |
|
98 } |
|
99 |
|
100 |
|
101 |
|
102 // Extension function. Use this to retrieve any extension interfaces from CRoleDiscoveryCommand |
|
103 // or any class from which it derives. |
|
104 /*virtual*/ TInt CRoleDiscoveryCommand::Extension_(TUint aExtensionId, TAny*& aInterface, TAny* aData) |
|
105 { |
|
106 // To add an additional interface implementation specific for this class check the |
|
107 // provided ID and return an appropriate interface. |
|
108 |
|
109 // If a specific interface implementation is not provided - forward the call to the base class. |
|
110 return CHCICommandBase::Extension_(aExtensionId, aInterface, aData); |
|
111 } |
|
112 |