1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef M_RADIOSETTINGS_H |
|
19 #define M_RADIOSETTINGS_H |
|
20 |
|
21 // System includes |
|
22 #include <e32def.h> |
|
23 |
|
24 // User includes |
|
25 #include "radioengine.hrh" |
|
26 |
|
27 // Forward declarations |
|
28 class CRadioRegion; |
|
29 |
|
30 /** |
|
31 * Interface for managing persistent Visual Radio application FM radio specific settings. |
|
32 */ |
|
33 NONSHARABLE_CLASS( MRadioEngineSettings ) |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Retrieves the radio volume level that is used when audio is routed through the headset. |
|
40 * |
|
41 * @return The radio volume level. |
|
42 */ |
|
43 virtual TInt HeadsetVolume() const = 0; |
|
44 |
|
45 /** |
|
46 * Retrieves the radio volume level that is used when audio is routed through the speaker. |
|
47 * |
|
48 * @return The radio volume level. |
|
49 */ |
|
50 virtual TInt SpeakerVolume() const = 0; |
|
51 |
|
52 /** |
|
53 * Wrapper for retrieving the radio volume level of current output device |
|
54 * |
|
55 * @return The radio volume level. |
|
56 */ |
|
57 virtual TInt Volume() const = 0; |
|
58 |
|
59 /** |
|
60 * Retrieves the radio output mode currently in use. |
|
61 * |
|
62 * @return The radio output mode currently in use. |
|
63 */ |
|
64 virtual TInt OutputMode() const = 0; |
|
65 |
|
66 /** |
|
67 * Retrieves the radio audio route in use. |
|
68 * |
|
69 * @return The radio audio route in use. |
|
70 */ |
|
71 virtual TInt AudioRoute() const = 0; |
|
72 |
|
73 /** |
|
74 * Retrieves the muting state of radio when audio is routed through the headset. |
|
75 * |
|
76 * @return <code>ETrue</code> if radio audio is muted when routed through the headset, <code>EFalse</code> otherwise. |
|
77 */ |
|
78 virtual TBool IsHeadsetVolMuted() const = 0; |
|
79 |
|
80 /** |
|
81 * Retrieves the muting state of radio when audio is routed through the speaker. |
|
82 * |
|
83 * @return <code>ETrue</code> if radio audio is muted when routed through the speaker, <code>EFalse</code> otherwise. |
|
84 */ |
|
85 virtual TBool IsSpeakerVolMuted() const = 0; |
|
86 |
|
87 /** |
|
88 * Wrapper for retrieving the muting state of current output device |
|
89 * |
|
90 * @return <code>ETrue</code> if radio audio is muted, <code>EFalse</code> otherwise. |
|
91 */ |
|
92 virtual TBool IsVolMuted() const = 0; |
|
93 |
|
94 /** |
|
95 * Retrieves the power state of the radio. |
|
96 * |
|
97 * @return <code>ETrue</code> if the radio is powered on, <code>EFalse</code> otherwise. |
|
98 */ |
|
99 virtual TBool IsPowerOn() const = 0; |
|
100 |
|
101 /** |
|
102 * Retrieves the currently tuned frequency. |
|
103 * |
|
104 * @return The currently tuned frequency. |
|
105 */ |
|
106 virtual TUint32 TunedFrequency() const = 0; |
|
107 |
|
108 /** |
|
109 * Retrieves the default minimum volume level. |
|
110 * |
|
111 * @return The default minimum volume level. |
|
112 */ |
|
113 virtual TInt DefaultMinVolumeLevel() const = 0; |
|
114 |
|
115 /** |
|
116 * Retrieves the number of regions defined. |
|
117 * |
|
118 * @return The number of regions defined. |
|
119 */ |
|
120 virtual TInt CountRegions() const = 0; |
|
121 |
|
122 /** |
|
123 * Retrieves a region matching the supplied index. |
|
124 * |
|
125 * @param aIndex The index of the region. |
|
126 * @return The region matching the supplied index. |
|
127 */ |
|
128 virtual CRadioRegion& Region( TInt aIndex ) const = 0; |
|
129 |
|
130 /** |
|
131 * Retrieves the current region's ID. |
|
132 * |
|
133 * @return The region's ID. |
|
134 */ |
|
135 virtual TRadioRegion RegionId() const = 0; |
|
136 |
|
137 /** |
|
138 * Retrieves the frequency step size for the current region. |
|
139 * |
|
140 * @return The frequency step size for the current region. |
|
141 */ |
|
142 virtual TUint32 FrequencyStepSize() const = 0; |
|
143 |
|
144 /** |
|
145 * Retrieves the maximum frequency for the current region. |
|
146 * If region switching is ongoing, this might be zero. |
|
147 * |
|
148 * @return The maximum freqency for the current region. |
|
149 */ |
|
150 virtual TUint32 MaxFrequency() const = 0; |
|
151 |
|
152 /** |
|
153 * Retrieves the minimum frequency for the current region. |
|
154 * If region switching is ongoing, this might be zero. |
|
155 * |
|
156 * @return The minimum freqency for the current region. |
|
157 */ |
|
158 virtual TUint32 MinFrequency() const = 0; |
|
159 |
|
160 /** |
|
161 * Retrieves the frequency decimal count of the current region. |
|
162 * |
|
163 * @return Decimal count. |
|
164 */ |
|
165 virtual TInt DecimalCount() const = 0; |
|
166 |
|
167 /** |
|
168 * Retrieves the RDS alternate frequency search setting |
|
169 * |
|
170 * @return ETrue if AF search is enabled, otherwise EFalse |
|
171 */ |
|
172 virtual TBool RdsAfSearchEnabled() const = 0; |
|
173 |
|
174 /** |
|
175 * Retrieves the default region's ID. |
|
176 * |
|
177 * @return The region's ID. |
|
178 */ |
|
179 virtual TRadioRegion DefaultRegion() const = 0; |
|
180 |
|
181 /** |
|
182 * |
|
183 */ |
|
184 virtual TPtrC NetworkId() const = 0; |
|
185 |
|
186 /** |
|
187 * |
|
188 */ |
|
189 virtual TPtrC SubscriberId() const = 0; |
|
190 |
|
191 /** |
|
192 * |
|
193 */ |
|
194 virtual TPtrC CountryCode() const = 0; |
|
195 |
|
196 }; |
|
197 |
|
198 #endif // M_RADIOSETTINGS_H |
|
199 |
|
200 |
|