|
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 Wed, 05 Dec 2007 14:54:27 (time stamp) |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #include <bluetooth/hci/writevoicesettingcommand.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 #pragma message("Value of iVoiceSetting member is closely related to hardware used. ") |
|
36 #pragma message("Bits: Input Coding, Input Data, Input Sample Size and Linear_PCM_Bit_pos, should be set...") |
|
37 #pragma message("...according to hardware capabilities, and OR-ed to create appropriate iVoiceSetting value.") |
|
38 |
|
39 // Factory methods |
|
40 |
|
41 EXPORT_C CWriteVoiceSettingCommand* CWriteVoiceSettingCommand::NewL(TUint16 aVoiceSetting) |
|
42 { |
|
43 CWriteVoiceSettingCommand* self = new (ELeave) CWriteVoiceSettingCommand(aVoiceSetting); |
|
44 CleanupStack::PushL(self); |
|
45 self->CHCICommandBase::BaseConstructL(); |
|
46 CleanupStack::Pop(self); |
|
47 return self; |
|
48 } |
|
49 |
|
50 EXPORT_C CWriteVoiceSettingCommand* CWriteVoiceSettingCommand::NewL() |
|
51 { |
|
52 CWriteVoiceSettingCommand* self = new (ELeave) CWriteVoiceSettingCommand(); |
|
53 CleanupStack::PushL(self); |
|
54 self->CHCICommandBase::BaseConstructL(); |
|
55 CleanupStack::Pop(self); |
|
56 return self; |
|
57 } |
|
58 |
|
59 // Constructors |
|
60 |
|
61 CWriteVoiceSettingCommand::CWriteVoiceSettingCommand(TUint16 aVoiceSetting) |
|
62 : CHCICommandBase(KWriteVoiceSettingOpcode) |
|
63 , iVoiceSetting(aVoiceSetting) |
|
64 { |
|
65 SetExpectsCommandStatusEvent(EFalse); |
|
66 } |
|
67 |
|
68 CWriteVoiceSettingCommand::CWriteVoiceSettingCommand() |
|
69 : CHCICommandBase(KWriteVoiceSettingOpcode) |
|
70 { |
|
71 SetExpectsCommandStatusEvent(EFalse); |
|
72 } |
|
73 |
|
74 // Destructor |
|
75 CWriteVoiceSettingCommand::~CWriteVoiceSettingCommand() |
|
76 { |
|
77 |
|
78 } |
|
79 |
|
80 |
|
81 |
|
82 // Override of pure virtual from CHCICommandBase. This method embodies the knowledge |
|
83 // of how to format the specifics of this command into the HCTL command frame. |
|
84 void CWriteVoiceSettingCommand::Format(CHctlCommandFrame& aCommandFrame) const |
|
85 { |
|
86 aCommandFrame.PutBytes16(iVoiceSetting); |
|
87 } |
|
88 |
|
89 // Assign new values to the parameters of this command |
|
90 EXPORT_C void CWriteVoiceSettingCommand::Reset(TUint16 aVoiceSetting) |
|
91 { |
|
92 iVoiceSetting = aVoiceSetting; |
|
93 } |
|
94 |
|
95 // Accessor methods for the parameters of the command |
|
96 |
|
97 EXPORT_C TUint16 CWriteVoiceSettingCommand::VoiceSetting() const |
|
98 { |
|
99 return iVoiceSetting; |
|
100 } |
|
101 |
|
102 |
|
103 |
|
104 // Extension function. Use this to retrieve any extension interfaces from CWriteVoiceSettingCommand |
|
105 // or any class from which it derives. |
|
106 /*virtual*/ TInt CWriteVoiceSettingCommand::Extension_(TUint aExtensionId, TAny*& aInterface, TAny* aData) |
|
107 { |
|
108 // To add an additional interface implementation specific for this class check the |
|
109 // provided ID and return an appropriate interface. |
|
110 |
|
111 // If a specific interface implementation is not provided - forward the call to the base class. |
|
112 return CHCICommandBase::Extension_(aExtensionId, aInterface, aData); |
|
113 } |
|
114 |