diff -r 608f67c22514 -r 896e9dbc5f19 qtinternetradio/irqsettings/inc/irqsettings.h --- a/qtinternetradio/irqsettings/inc/irqsettings.h Tue Jul 06 14:07:20 2010 +0300 +++ b/qtinternetradio/irqsettings/inc/irqsettings.h Wed Aug 18 09:40:26 2010 +0300 @@ -1,29 +1,29 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ #ifndef IRQSETTINGS_H_ #define IRQSETTINGS_H_ -#include -#include - +#include "irqsettingsexport.h" #include "irqenums.h" #include "irviewdefinitions.h" +#include +#include -class CIRSettings; +class IRQSettingsPrivate; /** * This class provides the interface to IR settings component @@ -33,7 +33,7 @@ * */ -class IRQSettings +class IRQSETTINGS_DLL_EXPORT IRQSettings { public: @@ -41,82 +41,90 @@ * Get the instance of IRQSettings * @return IRQSettings* */ - IMPORT_C static IRQSettings* openInstance(); - IMPORT_C void closeInstance(); + static IRQSettings* openInstance(); + void closeInstance(); - IMPORT_C bool isFlagTermsAndConditions(bool& aFlag); - IMPORT_C void setFlagTermsAndConditions(); - IMPORT_C void reSetFlagTermsAndConditions(); + bool isFlagTermsAndConditions(bool& aFlag); + void setFlagTermsAndConditions(); + void reSetFlagTermsAndConditions(); - IMPORT_C bool getIRID(QString& aIRID); - IMPORT_C int getVolumeSetting(); - IMPORT_C void setVolumeSetting(int aPlayVolume); - IMPORT_C void setTimeOut(int aTimeOut); - IMPORT_C int getTimeOut(); - IMPORT_C void setMaxPresetCount(int aMaxCount); - IMPORT_C int maxPresetCount(); - IMPORT_C QString privatePath(); - IMPORT_C int getSongHistoryShow(); - IMPORT_C void setSongHistoryShow(int aShowFlag); + bool getIRID(QString& aIRID); + int getVolumeSetting(); + void setVolumeSetting(int aPlayVolume); + void setTimeOut(int aTimeOut); + int getTimeOut(); + QString privatePath(); + int getSongHistoryShow(); + void setSongHistoryShow(int aShowFlag); /** * setStartingViewId() * Sets the starting view Id in cenrep */ - IMPORT_C void setStartingViewId(unsigned long aStartingViewId); + void setStartingViewId(int aStartingViewId); /** * getStartingViewId() * Gets the starting view Id from cenrep */ - IMPORT_C bool getStartingViewId(TIRViewId& aStartingViewId); - - IMPORT_C void setPreferredQuality(IRQPreferredQuality aQualityValue); + bool getStartingViewId(TIRViewId& aStartingViewId); + + void setPreferredQuality(IRQPreferredQuality aQualityValue); /** * getPreferredQuality() * Gets the Preferred Quality from cenrep - */ - IMPORT_C IRQPreferredQuality getPreferredQuality() const; + */ + IRQPreferredQuality getPreferredQuality() const; /** * getGlobalAdvFlag() * Gets the global adv flag from cenrep. True: enable NAE adv */ - IMPORT_C bool getGlobalAdvFlag(bool& aFlag); + bool getGlobalAdvFlag(bool& aFlag); - IMPORT_C bool getManuallyInputtedStationUrl(QString& aUrl); - IMPORT_C void setManuallyInputtedStationUrl(const QString& aUrl); - IMPORT_C bool getManuallyInputtedStationName(QString& aName); - IMPORT_C void setManuallyInputtedStationName(const QString& aName); + bool getManuallyInputtedStationUrl(QString& aUrl); + void setManuallyInputtedStationUrl(const QString& aUrl); + bool getManuallyInputtedStationName(QString& aName); + void setManuallyInputtedStationName(const QString& aName); + bool getSearchText(QString& aSearchText); + void setSearchText(const QString& aSearchText); + + int getMinDiskSpaceRequired(); + bool getIdentifySongEnabled(); + int getSongRecognitionAppUid(); + QString getIsdsUrl(); + private: /** * Default constructor must be private - */ + */ IRQSettings(); ~IRQSettings(); - /** - * Creates IRQSettings instance - */ - static IRQSettings* createInstance(); - static void doCreateInstanceL(IRQSettings * aQsettings); - - void constructL(); - private: /** - * IRQSettings singleton instance + * IRQSettingsPrivate instance */ - CIRSettings* iSettings; + IRQSettingsPrivate* const d_ptr; /** * Number of objects currently referring to the singleton object IRQSettings */ - int iSingletonInstances; + int mRefCount; + + /** + * The instance of IRQSettings singleton + */ + static IRQSettings *mInstance; + + /** + * Mutex for the thread-safe of openInstance() + */ + static QMutex mMutex; }; #endif /* IRQSETTINGS_H_ */