|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Class to wrap a CVCommand object |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 |
|
21 #include <vcommandapi.h> |
|
22 |
|
23 #include "vcommanduientry.h" |
|
24 |
|
25 #include "rubydebug.h" |
|
26 |
|
27 |
|
28 // ================= MEMBER FUNCTIONS ======================= |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // CVCommandUiEntry::NewL |
|
32 // Two-phased constructor. |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 CVCommandUiEntry* CVCommandUiEntry::NewL( const CVCommand& aCommand ) |
|
36 { |
|
37 CVCommandUiEntry* self = new (ELeave) CVCommandUiEntry( aCommand ); |
|
38 return self; |
|
39 } |
|
40 |
|
41 // ---------------------------------------------------------------------------- |
|
42 // CVCommandUiEntry::CVCommandUiEntry |
|
43 // C++ constructor |
|
44 // ---------------------------------------------------------------------------- |
|
45 // |
|
46 CVCommandUiEntry::CVCommandUiEntry( const CVCommand& aCommand ): |
|
47 iCommand( aCommand ) |
|
48 { |
|
49 } |
|
50 |
|
51 // ---------------------------------------------------------------------------- |
|
52 // CVCommandUiEntry::~CVCommandUiEntry |
|
53 // Destructor |
|
54 // ---------------------------------------------------------------------------- |
|
55 // |
|
56 CVCommandUiEntry::~CVCommandUiEntry() |
|
57 { |
|
58 } |
|
59 |
|
60 // ---------------------------------------------------------------------------- |
|
61 // CVCommandUiEntry::UserText |
|
62 // ---------------------------------------------------------------------------- |
|
63 // |
|
64 const TDesC& CVCommandUiEntry::UserText() const |
|
65 { |
|
66 return iCommand.CommandUi().UserText(); |
|
67 } |
|
68 |
|
69 // ---------------------------------------------------------------------------- |
|
70 // CVCommandUiEntry::WrittenText |
|
71 // ---------------------------------------------------------------------------- |
|
72 // |
|
73 const TDesC& CVCommandUiEntry::WrittenText() const |
|
74 { |
|
75 return iCommand.CommandUi().WrittenText(); |
|
76 } |
|
77 |
|
78 // ---------------------------------------------------------------------------- |
|
79 // CVCommandUiEntry::SpokenText |
|
80 // ---------------------------------------------------------------------------- |
|
81 // |
|
82 const TDesC& CVCommandUiEntry::SpokenText() const |
|
83 { |
|
84 return iCommand.SpokenText(); |
|
85 } |
|
86 |
|
87 // ---------------------------------------------------------------------------- |
|
88 // CVCommandUiEntry::AlternativeSpokenText |
|
89 // ---------------------------------------------------------------------------- |
|
90 // |
|
91 const TDesC& CVCommandUiEntry::AlternativeSpokenText() const |
|
92 { |
|
93 return iCommand.AlternativeSpokenText(); |
|
94 } |
|
95 |
|
96 // ---------------------------------------------------------------------------- |
|
97 // CVCommandUiEntry::IconLC |
|
98 // ---------------------------------------------------------------------------- |
|
99 // |
|
100 CGulIcon* CVCommandUiEntry::IconLC() const |
|
101 { |
|
102 return iCommand.CommandUi().IconLC(); |
|
103 } |
|
104 |
|
105 // ---------------------------------------------------------------------------- |
|
106 // CVCommandUiEntry::FolderListedName |
|
107 // ---------------------------------------------------------------------------- |
|
108 // |
|
109 const TDesC& CVCommandUiEntry::FolderListedName() const |
|
110 { |
|
111 return iCommand.CommandUi().FolderInfo().ListedName(); |
|
112 } |
|
113 |
|
114 // ---------------------------------------------------------------------------- |
|
115 // CVCommandUiEntry::FolderTitle |
|
116 // ---------------------------------------------------------------------------- |
|
117 // |
|
118 const TDesC& CVCommandUiEntry::FolderTitle() const |
|
119 { |
|
120 return iCommand.CommandUi().FolderInfo().Title(); |
|
121 } |
|
122 |
|
123 // ---------------------------------------------------------------------------- |
|
124 // CVCommandUiEntry::FolderIconLC |
|
125 // ---------------------------------------------------------------------------- |
|
126 // |
|
127 CGulIcon* CVCommandUiEntry::FolderIconLC() const |
|
128 { |
|
129 return iCommand.CommandUi().FolderInfo().IconLC(); |
|
130 } |
|
131 |
|
132 // ---------------------------------------------------------------------------- |
|
133 // CVCommandUiEntry::Tooltip |
|
134 // ---------------------------------------------------------------------------- |
|
135 // |
|
136 const TDesC& CVCommandUiEntry::Tooltip() const |
|
137 { |
|
138 return iCommand.CommandUi().Tooltip(); |
|
139 } |
|
140 |
|
141 // ---------------------------------------------------------------------------- |
|
142 // CVCommandUiEntry::PlaySpokenTextL |
|
143 // ---------------------------------------------------------------------------- |
|
144 // |
|
145 void CVCommandUiEntry::PlaySpokenTextL( CVCommandHandler& aService, |
|
146 MNssPlayEventHandler& aPlayEventHandler ) const |
|
147 { |
|
148 iCommand.PlaySpokenTextL( aService, aPlayEventHandler ); |
|
149 } |
|
150 |
|
151 // ---------------------------------------------------------------------------- |
|
152 // CVCommandUiEntry::PlayAlternativeSpokenTextL |
|
153 // ---------------------------------------------------------------------------- |
|
154 // |
|
155 void CVCommandUiEntry::PlayAlternativeSpokenTextL( CVCommandHandler& aService, |
|
156 MNssPlayEventHandler& aPlayEventHandler ) const |
|
157 { |
|
158 iCommand.PlayAlternativeSpokenTextL( aService, aPlayEventHandler ); |
|
159 } |
|
160 |
|
161 // ---------------------------------------------------------------------------- |
|
162 // CVCommandUiEntry::CancelPlaybackL |
|
163 // ---------------------------------------------------------------------------- |
|
164 // |
|
165 void CVCommandUiEntry::CancelPlaybackL( CVCommandHandler& aService ) const |
|
166 { |
|
167 iCommand.CancelPlaybackL( aService ); |
|
168 } |
|
169 |
|
170 // ---------------------------------------------------------------------------- |
|
171 // CVCommandUiEntry::Command |
|
172 // ---------------------------------------------------------------------------- |
|
173 // |
|
174 const CVCommand& CVCommandUiEntry::Command() const |
|
175 { |
|
176 return iCommand; |
|
177 } |
|
178 |
|
179 // ---------------------------------------------------------------------------- |
|
180 // CVCommandUiEntry::IsEqual |
|
181 // ---------------------------------------------------------------------------- |
|
182 // |
|
183 TBool CVCommandUiEntry::operator==( const CVCommandUiEntry& aCommand ) const |
|
184 { |
|
185 return iCommand.Runnable() == aCommand.Command().Runnable(); |
|
186 } |
|
187 |
|
188 // End of File |