28 #include <LogsDomainCRKeys.h> |
28 #include <LogsDomainCRKeys.h> |
29 #include <BTSapDomainPSKeys.h> |
29 #include <BTSapDomainPSKeys.h> |
30 #include <NumberGroupingCRKeys.h> |
30 #include <NumberGroupingCRKeys.h> |
31 #include <hbglobal.h> |
31 #include <hbglobal.h> |
32 #include <CoreApplicationUIsSDKCRKeys.h> |
32 #include <CoreApplicationUIsSDKCRKeys.h> |
|
33 #include <telephonyvariant.hrh> |
|
34 #include <telinternalcrkeys.h> |
|
35 #include <ctsydomainpskeys.h> |
33 #include "cptelephonyutilsdefs.h" |
36 #include "cptelephonyutilsdefs.h" |
34 #include "cpplugincommon.h" |
37 #include "cpplugincommon.h" |
35 #include "cppluginlogging.h" |
38 #include "cppluginlogging.h" |
36 |
39 |
37 const int CenrepKeyValueOff = 0; |
40 const int CenrepKeyValueOff = 0; |
77 case KErrGsmSSCallBarred: |
80 case KErrGsmSSCallBarred: |
78 case KErrGsmSSDataMissing: |
81 case KErrGsmSSDataMissing: |
79 errorText = hbTrId("txt_phone_info_not_allowed"); |
82 errorText = hbTrId("txt_phone_info_not_allowed"); |
80 break; |
83 break; |
81 case KErrGsmSSIncompatibility: |
84 case KErrGsmSSIncompatibility: |
82 errorText = hbTrId("Services in conflict"); |
85 errorText = hbTrId("txt_phone_info_conflict_error"); |
83 break; |
86 break; |
84 case KErrGsmSSSystemFailure: |
87 case KErrGsmSSSystemFailure: |
85 errorText = hbTrId("txt_phone_info_result_unknown"); |
88 errorText = hbTrId("txt_phone_info_result_unknown"); |
86 break; |
89 break; |
87 case KErrGsmSSUnexpectedDataValue: |
90 case KErrGsmSSUnexpectedDataValue: |
167 cenrepValue = CenrepKeyValueOff; |
170 cenrepValue = CenrepKeyValueOff; |
168 } |
171 } |
169 return writeCenrepValue(KCRUidLogs.iUid, KLogsShowCallDuration, cenrepValue ); |
172 return writeCenrepValue(KCRUidLogs.iUid, KLogsShowCallDuration, cenrepValue ); |
170 } |
173 } |
171 |
174 |
|
175 int CpSettingsWrapper::readVtVideoSending() |
|
176 { |
|
177 DPRINT << ": IN"; |
|
178 return readCenrepValue(KCRUidTelephonySettings.iUid, KSettingsVTVideoSending).toInt(); |
|
179 } |
|
180 |
|
181 int CpSettingsWrapper::writeVtVideoSending(int value) |
|
182 { |
|
183 DPRINT << ": IN"; |
|
184 return writeCenrepValue(KCRUidTelephonySettings.iUid, KSettingsVTVideoSending, value); |
|
185 } |
|
186 |
172 void CpSettingsWrapper::readSoftRejectText(QString &text, bool &userDefined ) |
187 void CpSettingsWrapper::readSoftRejectText(QString &text, bool &userDefined ) |
173 { |
188 { |
174 if (SoftRejectTextDefault == |
189 if (SoftRejectTextDefault == |
175 readCenrepValue(KCRUidTelephonySettings.iUid, KSettingsSoftRejectDefaultInUse ).toInt()) { |
190 readCenrepValue(KCRUidTelephonySettings.iUid, KSettingsSoftRejectDefaultInUse ).toInt()) { |
176 userDefined = false; |
191 userDefined = false; |
198 |
213 |
199 bool CpSettingsWrapper::numberGroupingSupported() const |
214 bool CpSettingsWrapper::numberGroupingSupported() const |
200 { |
215 { |
201 return readCenrepValue(KCRUidNumberGrouping.iUid, KNumberGrouping).toBool(); |
216 return readCenrepValue(KCRUidNumberGrouping.iUid, KNumberGrouping).toBool(); |
202 } |
217 } |
|
218 |
|
219 bool CpSettingsWrapper::forbiddenIconSupported() const |
|
220 { |
|
221 int keyValue = readCenrepValue(KCRUidTelVariation.iUid, KTelVariationFlags).toInt(); |
|
222 return (KTelephonyLVFlagForbiddenIcon & keyValue); |
|
223 } |
203 |
224 |
204 QVariant CpSettingsWrapper::readCenrepValue( |
225 QVariant CpSettingsWrapper::readCenrepValue( |
205 const long int uid, const unsigned long int key) const |
226 const long int uid, const unsigned long int key) const |
206 { |
227 { |
207 XQSettingsKey settingsKey(XQSettingsKey::TargetCentralRepository, uid, key); |
228 XQSettingsKey settingsKey(XQSettingsKey::TargetCentralRepository, uid, key); |
208 QVariant ret = m_Settings->readItemValue(settingsKey); |
229 QVariant ret = m_Settings->readItemValue(settingsKey); |
209 DPRINT << "ret: " << ret; |
230 DPRINT << "ret: " << ret; |
|
231 return ret; |
|
232 } |
|
233 |
|
234 QVariant CpSettingsWrapper::readPubSubValue( |
|
235 const long int uid, const unsigned long int key) const |
|
236 { |
|
237 XQSettingsKey settingsKey(XQSettingsKey::TargetPublishAndSubscribe, uid, key); |
|
238 QVariant ret = m_Settings->readItemValue(settingsKey); |
|
239 DPRINT << "PubSub ret: " << ret; |
210 return ret; |
240 return ret; |
211 } |
241 } |
212 |
242 |
213 QString CpSettingsWrapper::readCenrepString( |
243 QString CpSettingsWrapper::readCenrepString( |
214 const long int uid, const unsigned long int key) const |
244 const long int uid, const unsigned long int key) const |
244 KCRUidCoreApplicationUIs.iUid, |
274 KCRUidCoreApplicationUIs.iUid, |
245 KCoreAppUIsNetworkConnectionAllowed).toBool(); |
275 KCoreAppUIsNetworkConnectionAllowed).toBool(); |
246 } |
276 } |
247 return offLinesupport; |
277 return offLinesupport; |
248 } |
278 } |
|
279 |
|
280 bool CpSettingsWrapper::isOngoingCall() const |
|
281 { |
|
282 bool callOngoing(false); |
|
283 if (EPSCTsyCallStateNone < |
|
284 readPubSubValue(KPSUidCtsyCallInformation.iUid, KCTsyCallState).toInt()) { |
|
285 callOngoing = true; |
|
286 } |
|
287 return callOngoing; |
|
288 } |
|
289 |