chxavsettingsdata.h
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:5k
- /************************************************************************
- * chxavsettingsdata.h
- * -------------------
- *
- * Synopsis:
- * Data values associated with settings lists.
- *
- * Target:
- * Symbian OS
- *
- *
- * (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
- *
- ************************************************************************/
- #ifndef _chxavsettingsdata_h_
- #define _chxavsettingsdata_h_
- // Symbian includes...
- #include <aknsettingitemlist.h>
- // Helix includes...
- #include "hxccf.h"
- #include "hxprefs.h"
- // Includes from this project...
- #include "chxavrefptr.h"
- #include "chxbody.h"
- #include "chxsmartptr.h"
- #include "comptr.h"
- #include "chxavaccesspointdb.h"
- struct SETTINGS_VIDEO_DATA
- {
- SETTINGS_VIDEO_DATA()
- : m_bAutoScaleVideo(0)
- , m_bPostFilterOn(0)
- {}
- TInt m_bAutoScaleVideo;
- TInt m_bPostFilterOn;
- };
- struct SETTINGS_PLAYBACK_DATA
- {
- SETTINGS_PLAYBACK_DATA()
- : m_bLoopMode(0)
- , m_bShuffleMode(0)
- , m_idxClipIntro(0)
- {}
- TInt m_bLoopMode;
- TInt m_bShuffleMode;
- TInt m_idxClipIntro;
- };
- struct SETTINGS_NETWORK_DATA
- {
- SETTINGS_NETWORK_DATA()
- : m_idxNetworkBW(0)
- , m_connectTimeOut(0)
- , m_serverTimeOut(0)
- , m_idAccessPoint(0)
- , m_minUdpPort(0)
- , m_maxUdpPort(0)
- // m_bUseManualBW(0)
- {}
- // TInt m_bUseManualBW;
- TInt m_idxNetworkBW;
- TInt m_connectTimeOut;
- TInt m_serverTimeOut;
- TUint32 m_idAccessPoint;
- TInt m_minUdpPort;
- TInt m_maxUdpPort;
- };
- struct SETTINGS_PROXY_DATA
- {
- SETTINGS_PROXY_DATA()
- : m_proxyPort(0)
- , m_bUseProxy(0)
- {}
- refptr<TFileName> m_spProxy;
- TInt m_proxyPort;
- TInt m_bUseProxy;
- };
- struct SETTINGS_DEBUG_DATA
- {
- SETTINGS_DEBUG_DATA()
- : m_debugMask(0)
- {}
- TUint m_debugMask;
- refptr<TFileName> m_spLogSink;
- };
- class CHXAvSettingsData
- : public CHXBody
- {
- public:
- CHXAvSettingsData(IHXCommonClassFactory* pFactory, IHXPreferences *prefs);
- virtual ~CHXAvSettingsData() {};
-
- virtual CAknSettingItem* CreateSettingItemL(TInt id) = 0;
- virtual void InitValuesFromPreferencesL() = 0;
- virtual void UpdatePreferencesL() = 0;
- virtual void EditItemL(CAknSettingItem* /*pItem*/) {}
- protected:
- void SetTextValue(const CHXString& id, TDes& buffer);
- bool UpdatePrefString(const CHXString& id, const TDes& newVal);
- bool UpdatePrefString(const CHXString& id, const CHXString& strNew);
- bool UpdatePrefInt(const CHXString& id, TInt newVal);
- CHXAvSettingsData& operator=(const CHXAvSettingsData& other);
- CHXAvSettingsData(const CHXAvSettingsData& other);
- comptr<IHXPreferences> m_prefs;
- comptr<IHXCommonClassFactory> m_factory;
- };
- typedef CHXSmartPtr<CHXAvSettingsData> CHXAvSettingsDataPtr;
- /////////////////////////////////////////////
- // class CHXAvSettingsDataVideo
- class CHXAvSettingsDataVideo
- : public CHXAvSettingsData
- , public SETTINGS_VIDEO_DATA
- {
- public:
- CHXAvSettingsDataVideo(IHXCommonClassFactory* pFactory, IHXPreferences* pPrefs) : CHXAvSettingsData(pFactory, pPrefs) {}
- virtual CAknSettingItem* CreateSettingItemL(TInt id);
- virtual void InitValuesFromPreferencesL();
- virtual void UpdatePreferencesL();
- };
- /////////////////////////////////////////////
- // class CHXAvSettingsDataPlayback
- class CHXAvSettingsDataPlayback
- : public CHXAvSettingsData
- , public SETTINGS_PLAYBACK_DATA
- {
- public:
- CHXAvSettingsDataPlayback(IHXCommonClassFactory* pFactory, IHXPreferences* pPrefs) : CHXAvSettingsData(pFactory, pPrefs) {}
- virtual CAknSettingItem* CreateSettingItemL(TInt id);
- virtual void InitValuesFromPreferencesL();
- virtual void UpdatePreferencesL();
- };
- /////////////////////////////////////////////
- // class CHXAvSettingsDataNetwork
- class CHXAvSettingsDataNetwork
- : public CHXAvSettingsData
- , public SETTINGS_NETWORK_DATA
- {
- public:
- CHXAvSettingsDataNetwork(IHXCommonClassFactory* pFactory, IHXPreferences* pPrefs) : CHXAvSettingsData(pFactory, pPrefs) {}
- virtual CAknSettingItem* CreateSettingItemL(TInt id);
- virtual void InitValuesFromPreferencesL();
- virtual void UpdatePreferencesL();
- virtual void EditItemL(CAknSettingItem* pItem);
- private:
- bool m_bMaxDelivBWEdited;
- };
- /////////////////////////////////////////////
- // class CHXAvSettingsDataProxy
- class CHXAvSettingsDataProxy
- : public CHXAvSettingsData
- , public SETTINGS_PROXY_DATA
- {
- public:
- CHXAvSettingsDataProxy(IHXCommonClassFactory* pFactory, IHXPreferences* pPrefs) : CHXAvSettingsData(pFactory, pPrefs) {}
- virtual CAknSettingItem* CreateSettingItemL(TInt id);
- virtual void InitValuesFromPreferencesL();
- virtual void UpdatePreferencesL();
- };
- #if defined(HELIX_FEATURE_DPRINTF)
- /////////////////////////////////////////////
- // class CHXAvSettingsDataDebug
- class CHXAvSettingsDataDebug
- : public CHXAvSettingsData
- , public SETTINGS_DEBUG_DATA
- {
- public:
- CHXAvSettingsDataDebug(IHXCommonClassFactory* pFactory, IHXPreferences* pPrefs) : CHXAvSettingsData(pFactory, pPrefs) {}
- virtual CAknSettingItem* CreateSettingItemL(TInt id);
- virtual void InitValuesFromPreferencesL();
- virtual void UpdatePreferencesL();
- };
- #endif
- #endif // _chxavsettingsdata_h_