equal
deleted
inserted
replaced
27 #include "mussoundplayerobserver.h" |
27 #include "mussoundplayerobserver.h" |
28 #include <e32base.h> |
28 #include <e32base.h> |
29 #include <e32property.h> |
29 #include <e32property.h> |
30 |
30 |
31 |
31 |
32 |
32 class CMusIndicatorDsa; |
33 class CAknGlobalMsgQuery; |
33 class CAknGlobalMsgQuery; |
34 class CMusSoundPlayer; |
34 class CMusSoundPlayer; |
35 |
35 |
36 |
36 |
37 /** |
37 /** |
38 * MusIndicatorApi provides means to indicate availability |
38 * MusIndicatorApi provides means to show notes and indicate availability |
39 * of videosharing to user. |
39 * of videosharing to user. |
|
40 * |
|
41 * @code |
|
42 * // Shows roaming activation query |
|
43 * if ( MusIndicatorApi::ConfirmationQueryL( |
|
44 * MusIndicatorApi::EVsRoamingActivationQuery ) ) |
|
45 * { |
|
46 * // respond to user response "yes" |
|
47 * } |
|
48 * else |
|
49 * { |
|
50 * // respond to user response "no" |
|
51 * } |
|
52 * @endcode |
|
53 * |
40 * @lib musindicator.lib |
54 * @lib musindicator.lib |
41 */ |
55 */ |
42 class CMusIndicatorApi : public CActive, MMusSoundPlayerObserver |
56 class CMusIndicatorApi : public CActive, MMusSoundPlayerObserver |
43 { |
57 { |
44 |
58 |
83 * Destructor. |
97 * Destructor. |
84 */ |
98 */ |
85 ~CMusIndicatorApi(); |
99 ~CMusIndicatorApi(); |
86 |
100 |
87 /** |
101 /** |
|
102 * Shows a global query to user. |
|
103 * |
|
104 * @param aQuery Identifies displayed query. |
|
105 * @return Boolean value indicating if user accepted the query. |
|
106 */ |
|
107 IMPORT_C static TBool ConfirmationQueryL( TVsPopupQuery aQuery ); |
|
108 |
|
109 /** |
88 * Indicates availability of video sharing. |
110 * Indicates availability of video sharing. |
89 */ |
111 */ |
90 IMPORT_C void IndicateAvailabilityL(); |
112 IMPORT_C void IndicateAvailabilityL(); |
91 |
113 |
92 protected: |
114 protected: |
139 /** |
161 /** |
140 * Plays indication tone. |
162 * Plays indication tone. |
141 */ |
163 */ |
142 void PlayToneL(); |
164 void PlayToneL(); |
143 |
165 |
|
166 /** |
|
167 * Returns text from a resource file for a specified note/query. |
|
168 * |
|
169 * @param aQuery Identifies displayed query. |
|
170 * @return Text associated with specified query. Ownership is transferred. |
|
171 */ |
|
172 static HBufC* NoteTextLC( TVsPopupQuery aQuery ); |
|
173 |
|
174 /** |
|
175 * Asynchronous query. Result returned via observer interface. |
|
176 */ |
|
177 void ShowLiveSharingQueryL( TBool aPlayTone ); |
|
178 |
|
179 static TInt LiveSharingQueryTimeout( TAny* aThis ); |
|
180 |
144 void StartLiveSharingL(); |
181 void StartLiveSharingL(); |
|
182 void ToggleIndicatorL(); |
|
183 TBool IsSubscriber() const; |
145 |
184 |
146 |
185 |
147 private: // data |
186 private: // data |
148 |
187 |
|
188 /** |
|
189 * Pointer to indicator window |
|
190 * Own. |
|
191 */ |
|
192 CMusIndicatorDsa* iIndicatorWindow; |
|
193 |
|
194 /** |
|
195 * Pointer to global msg query. |
|
196 * Own. |
|
197 */ |
|
198 CAknGlobalMsgQuery* iQuery; |
149 |
199 |
150 /** |
200 /** |
151 * Sound player. |
201 * Sound player. |
152 * Own. |
202 * Own. |
153 */ |
203 */ |
156 /** |
206 /** |
157 * Reference to observer interface. |
207 * Reference to observer interface. |
158 * Own. |
208 * Own. |
159 */ |
209 */ |
160 MMusIndicatorObserver* iObserver; |
210 MMusIndicatorObserver* iObserver; |
|
211 |
|
212 CPeriodic* iLiveSharingQueryTimeout; |
161 |
213 |
162 RProperty iProperty; |
214 RProperty iProperty; |
163 |
215 |
164 MUS_UNITTEST( UT_CMusIndicatorApi ) |
216 MUS_UNITTEST( UT_CMusIndicatorApi ) |
165 |
217 |