コード例 #1
0
// ---------------------------------------------------------------------------
// 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()));
}
コード例 #2
0
// ---------------------------------------------------------------------------
// IRQSettingsPrivate::setVolumeSetting()
//
// ---------------------------------------------------------------------------
//
void IRQSettingsPrivate::setVolumeSetting(int aPlayVolume)
{
    XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository,
            KCRUidInternetRadio.iUid, KIRPlayerVolume);

    Q_ASSERT(mSettingsManager);
    mSettingsManager->writeItemValue(profileKey, aPlayVolume);
}
コード例 #3
0
// ---------------------------------------------------------------------------
// IRQSettingsPrivate::setTimeOut()
//
// ---------------------------------------------------------------------------
//
void IRQSettingsPrivate::setTimeOut(int aTimeOut)
{
    XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository,
            KCRUidInternetRadio.iUid, KIRHttpTimeout);

    Q_ASSERT(mSettingsManager);
    mSettingsManager->writeItemValue(profileKey, aTimeOut);
}
コード例 #4
0
// ---------------------------------------------------------------------------
// IRQSettingsPrivate::reSetFlagTermsAndConditions()
//
// ---------------------------------------------------------------------------
//
void IRQSettingsPrivate::reSetFlagTermsAndConditions()
{
    XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository,
            KCRUidInternetRadio.iUid, KIRTermsAndConditionsFlag);

    Q_ASSERT(mSettingsManager);
    mSettingsManager->writeItemValue(profileKey, 0);
}
コード例 #5
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());    
}
コード例 #6
0
// ---------------------------------------------------------------------------
// 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);
}
コード例 #7
0
void IRQSettingsPrivate::setSongHistoryShow(int aShowFlag)
{
    XQSettingsKey profileKey(XQSettingsKey::TargetCentralRepository,
            KCRUidInternetRadio.iUid, KIRSongHistoryFTU);

    Q_ASSERT(mSettingsManager);
    mSettingsManager->writeItemValue(profileKey, aShowFlag);
}
コード例 #8
0
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);
}
コード例 #9
0
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);
}
コード例 #10
0
// ---------------------------------------------------------------------------
// 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;
}
コード例 #11
0
// ---------------------------------------------------------------------------
// 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;
}
コード例 #12
0
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;
}
コード例 #13
0
// ---------------------------------------------------------------------------
// 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;
}
コード例 #14
0
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;
}
コード例 #15
0
// ---------------------------------------------------------------------------
// 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;
}
コード例 #16
0
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;
}
コード例 #17
0
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;
}
コード例 #18
0
// ---------------------------------------------------------------------------
// 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);
}
コード例 #19
0
// ---------------------------------------------------------------------------
// 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;
}
コード例 #20
0
// ---------------------------------------------------------------------------
// 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;
}
コード例 #21
0
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    
}    
コード例 #22
0
// ---------------------------------------------------------------------------
// 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;
    }
}