|
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:52 (time stamp) |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #include <bluetooth/hci/inquirycancelcommand.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 CInquiryCancelCommand* CInquiryCancelCommand::NewL() |
|
40 { |
|
41 CInquiryCancelCommand* self = new (ELeave) CInquiryCancelCommand(); |
|
42 CleanupStack::PushL(self); |
|
43 self->CHCICommandBase::BaseConstructL(); |
|
44 CleanupStack::Pop(self); |
|
45 return self; |
|
46 } |
|
47 |
|
48 // Constructors |
|
49 |
|
50 CInquiryCancelCommand::CInquiryCancelCommand() |
|
51 : CHCICommandBase(KInquiryCancelOpcode) |
|
52 { |
|
53 SetExpectsCommandStatusEvent(EFalse); |
|
54 } |
|
55 |
|
56 // Destructor |
|
57 CInquiryCancelCommand::~CInquiryCancelCommand() |
|
58 { |
|
59 |
|
60 } |
|
61 |
|
62 /*virtual*/ void CInquiryCancelCommand::Match(const THCIEventBase& aEvent, TBool& aMatchesCmd, TBool& aConcludesCmd, TBool& aContinueMatching) const |
|
63 { |
|
64 if (aEvent.EventCode() == ECommandCompleteEvent) |
|
65 { |
|
66 THCICommandCompleteEvent& event = THCICommandCompleteEvent::Cast(aEvent); |
|
67 if (event.CommandOpcode() == KInquiryCancelOpcode) |
|
68 { |
|
69 aMatchesCmd = ETrue; |
|
70 aConcludesCmd = ETrue; |
|
71 aContinueMatching = ETrue; |
|
72 } |
|
73 } |
|
74 // Command Status Event and default Command Complete Event matching |
|
75 // is implemented in the base class. If we haven't matched already |
|
76 // then we should try the default matching. |
|
77 if (!aMatchesCmd) |
|
78 { |
|
79 CHCICommandBase::Match(aEvent, aMatchesCmd, aConcludesCmd, aContinueMatching); |
|
80 } |
|
81 } |
|
82 |
|
83 |
|
84 // Override of pure virtual from CHCICommandBase. This method embodies the knowledge |
|
85 // of how to format the specifics of this command into the HCTL command frame. |
|
86 void CInquiryCancelCommand::Format(CHctlCommandFrame& /*aCommandFrame*/) const |
|
87 { |
|
88 |
|
89 } |
|
90 |
|
91 // Assign new values to the parameters of this command |
|
92 EXPORT_C void CInquiryCancelCommand::Reset() |
|
93 { |
|
94 |
|
95 } |
|
96 |
|
97 // Accessor methods for the parameters of the command |
|
98 |
|
99 |
|
100 |
|
101 // Extension function. Use this to retrieve any extension interfaces from CInquiryCancelCommand |
|
102 // or any class from which it derives. |
|
103 /*virtual*/ TInt CInquiryCancelCommand::Extension_(TUint aExtensionId, TAny*& aInterface, TAny* aData) |
|
104 { |
|
105 // To add an additional interface implementation specific for this class check the |
|
106 // provided ID and return an appropriate interface. |
|
107 |
|
108 // If a specific interface implementation is not provided - forward the call to the base class. |
|
109 return CHCICommandBase::Extension_(aExtensionId, aInterface, aData); |
|
110 } |
|
111 |