// --------------------------------------------------------------------------- // IRQSettingsPrivate::setManuallyInputtedStationName(const QString& aName) // // --------------------------------------------------------------------------- // void IRQSettingsPrivate::setManuallyInputtedStationName(const QString& aName) { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRManuallyInputStationName); Q_ASSERT(mSettingsManager); mSettingsManager->writeItemValue(profileKey, QString::fromUtf16(aName.utf16())); }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::setVolumeSetting() // // --------------------------------------------------------------------------- // void IRQSettingsPrivate::setVolumeSetting(int aPlayVolume) { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRPlayerVolume); Q_ASSERT(mSettingsManager); mSettingsManager->writeItemValue(profileKey, aPlayVolume); }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::setTimeOut() // // --------------------------------------------------------------------------- // void IRQSettingsPrivate::setTimeOut(int aTimeOut) { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRHttpTimeout); Q_ASSERT(mSettingsManager); mSettingsManager->writeItemValue(profileKey, aTimeOut); }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::reSetFlagTermsAndConditions() // // --------------------------------------------------------------------------- // void IRQSettingsPrivate::reSetFlagTermsAndConditions() { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRTermsAndConditionsFlag); Q_ASSERT(mSettingsManager); mSettingsManager->writeItemValue(profileKey, 0); }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::setSearchText(const QString& aSearchText) // // --------------------------------------------------------------------------- // void IRQSettingsPrivate::setSearchText(const QString& aSearchText) { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRSearchText); Q_ASSERT(mSettingsManager); mSettingsManager->writeItemValue(profileKey, aSearchText.toUtf8()); }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::setStartingViewId() // Sets the starting view Id in cenrep // --------------------------------------------------------------------------- // void IRQSettingsPrivate::setStartingViewId(int aStartingViewId) { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRStartingViewId); Q_ASSERT(mSettingsManager); mSettingsManager->writeItemValue(profileKey, aStartingViewId); }
void IRQSettingsPrivate::setSongHistoryShow(int aShowFlag) { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRSongHistoryFTU); Q_ASSERT(mSettingsManager); mSettingsManager->writeItemValue(profileKey, aShowFlag); }
bool AndroidCamcorderProfile::hasProfile(jint cameraId, Quality quality) { if (g_camcorderProfiles->contains(profileKey().arg(cameraId).arg(quality))) return true; return QJNIObjectPrivate::callStaticMethod<jboolean>("android/media/CamcorderProfile", "hasProfile", "(II)Z", cameraId, quality); }
AndroidCamcorderProfile AndroidCamcorderProfile::get(jint cameraId, Quality quality) { const QString key = profileKey().arg(cameraId).arg(quality); QMap<QString, QJNIObjectPrivate>::const_iterator it = g_camcorderProfiles->constFind(key); if (it != g_camcorderProfiles->constEnd()) return AndroidCamcorderProfile(*it); QJNIObjectPrivate camProfile = QJNIObjectPrivate::callStaticObjectMethod("android/media/CamcorderProfile", "get", "(II)Landroid/media/CamcorderProfile;", cameraId, quality); return AndroidCamcorderProfile((*g_camcorderProfiles)[key] = camProfile); }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::getManuallyInputtedStationName(QString& aName) // // --------------------------------------------------------------------------- // bool IRQSettingsPrivate::getManuallyInputtedStationName(QString& aName) { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRManuallyInputStationName); Q_ASSERT(mSettingsManager); QVariant value = mSettingsManager->readItemValue(profileKey); bool br = !value.isNull(); if (br) { aName = QTextCodec::codecForName("UTF-16")->toUnicode(value.toByteArray()); } return br; }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::getGlobalAdvFlag() // Gets the global advertisement flag from cenrep // --------------------------------------------------------------------------- // bool IRQSettingsPrivate::getGlobalAdvFlag(bool& aFlag) { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRGlobalAdvEnabled); Q_ASSERT(mSettingsManager); QVariant value = mSettingsManager->readItemValue(profileKey); bool br = !value.isNull(); if (br) { aFlag = value.toBool(); } return br; }
int IRQSettingsPrivate::getSongHistoryShow() { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRSongHistoryFTU); Q_ASSERT(mSettingsManager); QVariant value = mSettingsManager->readItemValue(profileKey); int ir = 0; if (!value.isNull()) { ir = value.toInt(); } return ir; }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::getSearchText(QString& aSearchText) // // --------------------------------------------------------------------------- // bool IRQSettingsPrivate::getSearchText(QString& aSearchText) { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRSearchText); Q_ASSERT(mSettingsManager); QVariant value = mSettingsManager->readItemValue(profileKey); bool br = !value.isNull(); if (br) { aSearchText = value.toString(); } return br; }
int IRQSettingsPrivate::getSongRecognitionAppUid() { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRSongRecognitionAppUid); Q_ASSERT(mSettingsManager); QVariant value = mSettingsManager->readItemValue(profileKey); int retVal = 0; if (!value.isNull()) { retVal = value.toInt(); } return retVal; }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::getTimeOut() // // --------------------------------------------------------------------------- // int IRQSettingsPrivate::getTimeOut() { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRHttpTimeout); Q_ASSERT(mSettingsManager); QVariant value = mSettingsManager->readItemValue(profileKey); int ir = KDefaultHttpTimeOut; if (!value.isNull()) { ir = value.toInt(); } return ir; }
bool IRQSettingsPrivate::getIdentifySongEnabled() { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRIdentifySongEnabled); Q_ASSERT(mSettingsManager); QVariant value = mSettingsManager->readItemValue(profileKey); bool retVal = false; if (!value.isNull()) { retVal = value.toBool(); } return retVal; }
int IRQSettingsPrivate::getMinDiskSpaceRequired() { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRMinDiskSpaceRequired); Q_ASSERT(mSettingsManager); QVariant value = mSettingsManager->readItemValue(profileKey); int retVal = KIRDefaultMinDiskSpace; if (!value.isNull()) { retVal = value.toInt(); } return retVal; }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::setPreferredQuality() // // --------------------------------------------------------------------------- // void IRQSettingsPrivate::setPreferredQuality(IRQPreferredQuality aQualityValue) { TInt value = 0; switch (aQualityValue) { case EIRQHighQuality: value = 1; break; default: break; } XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRPreferredQuality); Q_ASSERT(mSettingsManager); mSettingsManager->writeItemValue(profileKey, value); }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::isFlagTermsAndConditions() // // --------------------------------------------------------------------------- // bool IRQSettingsPrivate::isFlagTermsAndConditions(bool& aFlag) { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRTermsAndConditionsFlag); Q_ASSERT(mSettingsManager); QVariant value = mSettingsManager->readItemValue(profileKey); bool br = !value.isNull(); if (br) { int nFlag = value.toInt(); aFlag = ( nFlag == 1 ); } return br; }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::getStartingViewId() // Gets the starting view Id from cenrep // --------------------------------------------------------------------------- // bool IRQSettingsPrivate::getStartingViewId(TIRViewId& aStartingViewId) { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRStartingViewId); Q_ASSERT(mSettingsManager); QVariant value = mSettingsManager->readItemValue(profileKey); bool br = !value.isNull(); if (br) { aStartingViewId = (TIRViewId) value.toInt(); } else { aStartingViewId = EIRView_CategoryView; } return br; }
QString IRQSettingsPrivate::getIsdsUrl() { #ifdef USE_TEST_ISDS_SERVER return KIRTestIsdsUrl; #else XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRIsdsUrl); Q_ASSERT(mSettingsManager); QVariant value = mSettingsManager->readItemValue(profileKey); QString retVal = KIRDefaultIsdsUrl; if (!value.isNull()) { retVal = QTextCodec::codecForName("UTF-16")->toUnicode(value.toByteArray());; } return retVal; #endif }
// --------------------------------------------------------------------------- // IRQSettingsPrivate::getPreferredQuality() // // --------------------------------------------------------------------------- // IRQPreferredQuality IRQSettingsPrivate::getPreferredQuality() const { XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository, KCRUidInternetRadio.iUid, KIRPreferredQuality); Q_ASSERT(mSettingsManager); QVariant value = mSettingsManager->readItemValue(profileKey); int ir = 0; if (!value.isNull()) { ir = value.toInt(); } switch (ir) { case 1: return EIRQHighQuality; default: return EIRQStandardQuality; } }