|
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 #ifndef IRQSETTINGS_H_ |
|
18 #define IRQSETTINGS_H_ |
|
19 |
|
20 #include <QString> |
|
21 #include <etelmm.h> |
|
22 |
|
23 #include "irqenums.h" |
|
24 #include "irviewdefinitions.h" |
|
25 |
|
26 enum TNetworkConnection |
|
27 { |
|
28 EIRAlwaysAsk, |
|
29 EIRDefaultConnection, |
|
30 EIRDestination, |
|
31 EIRConnectionMethod |
|
32 }; |
|
33 |
|
34 class CIRSettings; |
|
35 |
|
36 /** |
|
37 * This class provides the interface to IR settings component |
|
38 * |
|
39 * IRQSettings follows a singleton pattern |
|
40 * hence the destructor is private and to destroy it we need to use an API |
|
41 * |
|
42 */ |
|
43 |
|
44 class IRQSettings |
|
45 { |
|
46 public: |
|
47 |
|
48 /** |
|
49 * Get the instance of IRQSettings |
|
50 * @return IRQSettings* |
|
51 */ |
|
52 IMPORT_C static IRQSettings* openInstance(); |
|
53 IMPORT_C void closeInstance(); |
|
54 |
|
55 IMPORT_C bool isFlagCostWarning(bool& aFlag); |
|
56 IMPORT_C void setFlagCostWarning(); |
|
57 IMPORT_C void reSetFlagCostWarning(); |
|
58 IMPORT_C bool isFlagTermsAndConditions(bool& aFlag); |
|
59 IMPORT_C void setFlagTermsAndConditions(); |
|
60 IMPORT_C void reSetFlagTermsAndConditions(); |
|
61 IMPORT_C void setIrappVersion(const QString& aIRAppVersion); |
|
62 IMPORT_C bool getIrappVersion(QString& aIrappVersion); |
|
63 |
|
64 IMPORT_C void setIRID(const QString& aIrid); |
|
65 IMPORT_C bool getIRID(QString& aIRID); |
|
66 IMPORT_C bool getISDSBaseUrl(QString& aISDSBaseUrl); |
|
67 IMPORT_C void setISDSBaseUrl(const QString& aIsdsUrl); |
|
68 IMPORT_C int getVolumeSetting(); |
|
69 IMPORT_C void setVolumeSetting(int aPlayVolume); |
|
70 IMPORT_C int getManuallyAddedChId(); |
|
71 IMPORT_C void setManuallyAddedChId(); |
|
72 IMPORT_C bool isUpdateAvailable(bool& aFlag); |
|
73 IMPORT_C void setUpdateAvailable(); |
|
74 IMPORT_C void reSetUpdateAvailable(); |
|
75 IMPORT_C int getLogRunningNo(); |
|
76 IMPORT_C void setLogRunningNo(); |
|
77 IMPORT_C void setTimeOut(int aTimeOut); |
|
78 IMPORT_C int getTimeOut(); |
|
79 IMPORT_C void setSilencePeriod(unsigned int aSilencePeriod); |
|
80 IMPORT_C bool getSilencePeriod(unsigned int& aSilencePeriod); |
|
81 IMPORT_C void setSilencePeriodStart(const QString& aSilencePeriodStart); |
|
82 IMPORT_C bool getSilencePeriodStart(QString& aSilencePeriodStart); |
|
83 IMPORT_C bool displayAccessPoint(bool& aFlag); |
|
84 IMPORT_C void setDisplayAccessPoint(); |
|
85 IMPORT_C void reSetDisplayAccessPoint(); |
|
86 IMPORT_C void setBearerId(unsigned long aBearerId); |
|
87 IMPORT_C bool getBearerId(unsigned long& aBearerId); |
|
88 IMPORT_C void setNetworkId(unsigned long aBearerId); |
|
89 IMPORT_C bool getNetworkId(unsigned long& aNetworkId); |
|
90 IMPORT_C void setApId(unsigned long aBearerId); |
|
91 IMPORT_C bool getApId(unsigned long& aApId); |
|
92 IMPORT_C void setUserSavedApSettings( unsigned long aBearerId,unsigned long aNetworkId,unsigned long aApId); |
|
93 IMPORT_C bool getUserSavedApSettings( unsigned long& aBearerId, |
|
94 unsigned long& aNetworkId,unsigned long& aApId); |
|
95 IMPORT_C void setGPRSBitrateQuality(int aBitrate); |
|
96 IMPORT_C int getGPRSBitrateQuality(); |
|
97 IMPORT_C void setWiFiBitrateQuality(int aBitrate); |
|
98 IMPORT_C int getWiFiBitrateQuality(); |
|
99 IMPORT_C void set3GBitrateQuality(int aBitrate); |
|
100 IMPORT_C int get3GBitrateQuality(); |
|
101 IMPORT_C void setMaxPresetCount(int aMaxCount); |
|
102 IMPORT_C int maxPresetCount(); |
|
103 IMPORT_C void setTimeCorrection(int aCorrection); |
|
104 IMPORT_C int timeCorrection(); |
|
105 IMPORT_C QString privatePath(); |
|
106 IMPORT_C void setStereoMode(int val); |
|
107 IMPORT_C int getStereoMode(); |
|
108 IMPORT_C int getSongHistoryShow(); |
|
109 IMPORT_C void setSongHistoryShow(int aShowFlag); |
|
110 |
|
111 |
|
112 //Methods to determine if any channel was added to favorites |
|
113 IMPORT_C bool isFlagIfAnyFav(bool& aFlag); |
|
114 IMPORT_C void setFlagIfAnyFav(); |
|
115 |
|
116 //Added for ALR/SNAP |
|
117 /** |
|
118 * setUserDefinedSelection() |
|
119 * Sets the UserDefinedSelection in cenrep |
|
120 */ |
|
121 IMPORT_C void setUserDefinedSelection(unsigned long aUserDefinedSelection); |
|
122 |
|
123 /** |
|
124 * getUserDefinedSelection() |
|
125 * Gets the UserDefinedSelection from cenrep |
|
126 */ |
|
127 IMPORT_C bool getUserDefinedSelection(TNetworkConnection& aSelection); |
|
128 |
|
129 /** |
|
130 * setDestinationId() |
|
131 * Sets the DestinationId in cenrep |
|
132 */ |
|
133 IMPORT_C void setDestinationId(unsigned long aDestinationId); |
|
134 |
|
135 /** |
|
136 * getDestinationId() |
|
137 * Gets the DestinationId from cenrep |
|
138 */ |
|
139 IMPORT_C bool getDestinationId(unsigned long& aDestinationId); |
|
140 |
|
141 /** |
|
142 * Returns the current saved subscriber identifier (IMSI code). |
|
143 * |
|
144 * @return The saved subscriber identifier. |
|
145 */ |
|
146 IMPORT_C bool subscriberId(RMobilePhone::TMobilePhoneSubscriberId& aIRMobilePhoneSubscriberId); |
|
147 |
|
148 /** |
|
149 * Sets the subscriber identifier (IMSI code). |
|
150 * |
|
151 * @param Subscriber identifier to set. |
|
152 */ |
|
153 IMPORT_C void setSubscriberId( const RMobilePhone::TMobilePhoneSubscriberId& aSubscriberId ); |
|
154 |
|
155 /** |
|
156 * setStartingViewId() |
|
157 * Sets the starting view Id in cenrep |
|
158 */ |
|
159 IMPORT_C void setStartingViewId(unsigned long aStartingViewId); |
|
160 |
|
161 /** |
|
162 * getStartingViewId() |
|
163 * Gets the starting view Id from cenrep |
|
164 */ |
|
165 IMPORT_C bool getStartingViewId(TIRViewId& aStartingViewId); |
|
166 |
|
167 /** |
|
168 * setStartingViewParameter() |
|
169 * Sets the starting view parameter in cenrep |
|
170 */ |
|
171 IMPORT_C void setStartingViewParameter(unsigned long aParameter); |
|
172 |
|
173 /** |
|
174 * getStartingViewParameter() |
|
175 * Gets the starting view parameter from cenrep |
|
176 */ |
|
177 IMPORT_C bool getStartingViewParameter(TIRViewParameter& aParameter); |
|
178 |
|
179 /** |
|
180 * setStickyViewFlag() |
|
181 * Sets the sticky view flag in cenrep |
|
182 */ |
|
183 IMPORT_C void setStickyViewFlag(bool aFlag); |
|
184 |
|
185 /** |
|
186 * getStickyViewFlag() |
|
187 * Gets the sticky view flag from cenrep |
|
188 */ |
|
189 IMPORT_C bool getStickyViewFlag(bool& aFlag); |
|
190 |
|
191 /** |
|
192 * setPreferredQuality() |
|
193 * Sets the Preferred Quality in cenrep |
|
194 */ |
|
195 |
|
196 IMPORT_C void setPreferredQuality(IRQPreferredQuality aQualityValue); |
|
197 |
|
198 /** |
|
199 * getPreferredQuality() |
|
200 * Gets the Preferred Quality from cenrep |
|
201 */ |
|
202 IMPORT_C IRQPreferredQuality getPreferredQuality() const; |
|
203 |
|
204 /** |
|
205 * getGlobalAdvFlag() |
|
206 * Gets the global adv flag from cenrep. True: enable NAE adv |
|
207 */ |
|
208 IMPORT_C bool getGlobalAdvFlag(bool& aFlag); |
|
209 |
|
210 private: |
|
211 |
|
212 /** |
|
213 * Default constructor must be private |
|
214 */ |
|
215 IRQSettings(); |
|
216 |
|
217 ~IRQSettings(); |
|
218 |
|
219 /** |
|
220 * Creates IRQSettings instance |
|
221 */ |
|
222 static IRQSettings* createInstanceL(); |
|
223 |
|
224 void constructL(); |
|
225 |
|
226 private: |
|
227 |
|
228 /** |
|
229 * IRQSettings singleton instance |
|
230 */ |
|
231 CIRSettings* iSettings; |
|
232 |
|
233 /** |
|
234 * Number of objects currently referring to the singleton object IRQSettings |
|
235 */ |
|
236 int iSingletonInstances; |
|
237 }; |
|
238 |
|
239 #endif /* IRQSETTINGS_H_ */ |