224 |
227 |
225 QVariant CpSettingsWrapper::readCenrepValue( |
228 QVariant CpSettingsWrapper::readCenrepValue( |
226 const long int uid, const unsigned long int key) const |
229 const long int uid, const unsigned long int key) const |
227 { |
230 { |
228 XQSettingsKey settingsKey(XQSettingsKey::TargetCentralRepository, uid, key); |
231 XQSettingsKey settingsKey(XQSettingsKey::TargetCentralRepository, uid, key); |
229 QVariant ret = m_Settings->readItemValue(settingsKey); |
232 QVariant ret = m_settings->readItemValue(settingsKey); |
230 DPRINT << "ret: " << ret; |
233 DPRINT << "ret: " << ret; |
231 return ret; |
234 return ret; |
232 } |
235 } |
233 |
236 |
234 QVariant CpSettingsWrapper::readPubSubValue( |
237 QVariant CpSettingsWrapper::readPubSubValue( |
235 const long int uid, const unsigned long int key) const |
238 const long int uid, const unsigned long int key) const |
236 { |
239 { |
237 XQSettingsKey settingsKey(XQSettingsKey::TargetPublishAndSubscribe, uid, key); |
240 XQSettingsKey settingsKey(XQSettingsKey::TargetPublishAndSubscribe, uid, key); |
238 QVariant ret = m_Settings->readItemValue(settingsKey); |
241 QVariant ret = m_settings->readItemValue(settingsKey); |
239 DPRINT << "PubSub ret: " << ret; |
242 DPRINT << "PubSub ret: " << ret; |
240 return ret; |
243 return ret; |
241 } |
244 } |
242 |
245 |
243 QString CpSettingsWrapper::readCenrepString( |
246 QString CpSettingsWrapper::readCenrepString( |
244 const long int uid, const unsigned long int key) const |
247 const long int uid, const unsigned long int key) const |
245 { |
248 { |
246 XQSettingsKey settingsKey(XQSettingsKey::TargetCentralRepository, uid, key); |
249 XQSettingsKey settingsKey(XQSettingsKey::TargetCentralRepository, uid, key); |
247 QString text = m_Settings->readItemValue(settingsKey, XQSettingsManager::TypeString).toString(); |
250 QString text = m_settings->readItemValue(settingsKey, XQSettingsManager::TypeString).toString(); |
248 DPRINT << "text: " << text; |
251 DPRINT << "text: " << text; |
249 return text; |
252 return text; |
250 } |
253 } |
251 |
254 |
252 int CpSettingsWrapper::writeCenrepValue( |
255 int CpSettingsWrapper::writeCenrepValue( |
253 const long int uid, const unsigned long int key, const QVariant &settingsKeyValue ) const |
256 const long int uid, const unsigned long int key, const QVariant &settingsKeyValue ) const |
254 { |
257 { |
255 DPRINT << "uid:" << uid << ", key:" << key << ", settingsKeyValue:" << settingsKeyValue; |
258 DPRINT << "uid:" << uid << ", key:" << key << ", settingsKeyValue:" << settingsKeyValue; |
256 XQSettingsKey settingsKey(XQSettingsKey::TargetCentralRepository, uid, key); |
259 XQSettingsKey settingsKey(XQSettingsKey::TargetCentralRepository, uid, key); |
257 int err = m_Settings->writeItemValue(settingsKey, settingsKeyValue ); |
260 int err = m_settings->writeItemValue(settingsKey, settingsKeyValue ); |
258 DPRINT << "err: " << err; |
261 DPRINT << "err: " << err; |
259 return err; |
262 return err; |
260 } |
263 } |
261 |
264 |
262 bool CpSettingsWrapper::isFeatureCallWaitingDistiquishNotProvisionedEnabled() |
265 bool CpSettingsWrapper::isFeatureCallWaitingDistiquishNotProvisionedEnabled() |
266 return enabled; |
269 return enabled; |
267 } |
270 } |
268 |
271 |
269 bool CpSettingsWrapper::isPhoneOffline() const |
272 bool CpSettingsWrapper::isPhoneOffline() const |
270 { |
273 { |
271 bool offLinesupport(false); |
274 return QSystemDeviceInfo::OfflineProfile == m_deviceInfo->currentProfile(); |
272 if (XQSysInfo::isSupported(KFeatureIdOfflineMode)) { |
|
273 offLinesupport = !readCenrepValue( |
|
274 KCRUidCoreApplicationUIs.iUid, |
|
275 KCoreAppUIsNetworkConnectionAllowed).toBool(); |
|
276 } |
|
277 return offLinesupport; |
|
278 } |
275 } |
279 |
276 |
280 bool CpSettingsWrapper::isOngoingCall() const |
277 bool CpSettingsWrapper::isOngoingCall() const |
281 { |
278 { |
282 bool callOngoing(false); |
279 bool callOngoing(false); |