internetradio2.0/settingsinc/irsettings.h
changeset 0 09774dfdd46b
child 3 ee64f059b8e1
equal deleted inserted replaced
-1:000000000000 0:09774dfdd46b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 #ifndef C_CIRSETTINGS_H
       
    18 #define C_CIRSETTINGS_H
       
    19 
       
    20 #include <etelmm.h>
       
    21 #include <f32file.h>
       
    22 #include <centralrepository.h>
       
    23 
       
    24 // CLEANUP REQUIRED
       
    25 
       
    26 const TInt KMaxLengthIAPID = 256;
       
    27 const TInt KMaxLengthIRAppVersion = 50;
       
    28 const TInt KMaxLengthIrId = 32;
       
    29 const TInt KMaxLengthSilencePeriod = 32;
       
    30 const TInt KMaxLengthUrl = 500;
       
    31 const TInt KMaxLengthFileName = 500;
       
    32 
       
    33 // END CLEANUP
       
    34 
       
    35 NONSHARABLE_CLASS( CIRSettings ) : public CObject
       
    36     {
       
    37 
       
    38 public:
       
    39 
       
    40     IMPORT_C static CIRSettings* OpenL();
       
    41     ~CIRSettings();
       
    42 
       
    43 // CLEANUP REQUIRED
       
    44 
       
    45     IMPORT_C TBool IsFlagCostWarningL();
       
    46     IMPORT_C void SetFlagCostWarningL();
       
    47     IMPORT_C void ReSetFlagCostWarningL();
       
    48     IMPORT_C TBool IsFlagTermsAndConditionsL();
       
    49     IMPORT_C void SetFlagTermsAndConditionsL();
       
    50     IMPORT_C void ReSetFlagTermsAndConditionsL();
       
    51     IMPORT_C void SetIrappVersionL(const TDesC& aIRAppVersion);
       
    52     IMPORT_C const TDesC& GetIrappVersionL() const;
       
    53         
       
    54     IMPORT_C void SetIRIDL(const TDesC& aIrid);
       
    55     IMPORT_C const TDesC& GetIRIDL() const;
       
    56     IMPORT_C const  TDesC& GetISDSBaseUrlL() const;
       
    57     IMPORT_C void SetISDSBaseUrlL(const TDesC& aIsdsUrl);
       
    58     IMPORT_C TInt GetVolumeSetting() const;
       
    59     IMPORT_C void SetVolumeSettingL(TInt aPlayVolume);
       
    60     IMPORT_C TInt GetManuallyAddedChId() const;
       
    61     IMPORT_C void SetManuallyAddedChIdL();
       
    62     IMPORT_C TBool IsUpdateAvailableL();
       
    63     IMPORT_C void SetUpdateAvailableL();
       
    64 	IMPORT_C void ReSetUpdateAvailableL();
       
    65     IMPORT_C TInt GetLogRunningNo() const;
       
    66     IMPORT_C void SetLogRunningNoL();
       
    67     IMPORT_C void SetTimeOutL(TInt aTimeOut);
       
    68     IMPORT_C TInt GetTimeOut() const;
       
    69     IMPORT_C void SetSilencePeriodL(TUint aSilencePeriod);
       
    70     IMPORT_C TUint GetSilencePeriodL() const;
       
    71     IMPORT_C void SetSilencePeriodStartL(const TDesC& aSilencePeriodStart);
       
    72     IMPORT_C const TDesC& GetSilencePeriodStartL() const;
       
    73     IMPORT_C TBool DisplayAccessPointL() const;
       
    74     IMPORT_C void SetDisplayAccessPointL();
       
    75     IMPORT_C void ReSetDisplayAccessPointL();
       
    76     IMPORT_C void SetBearerIdL(TUint32 aBearerId);
       
    77     IMPORT_C TUint32 GetBearerIdL() const;
       
    78     IMPORT_C void SetNetworkIdL(TUint32 aBearerId);
       
    79     IMPORT_C TUint32 GetNetworkIdL() const;
       
    80     IMPORT_C void SetApIdL(TUint32 aBearerId);
       
    81     IMPORT_C TUint32 GetApIdL() const;
       
    82     IMPORT_C void SetUserSavedApSettingsL( TUint32 aBearerId,TUint32 aNetworkId,TUint32 aApId);
       
    83     IMPORT_C void GetUserSavedApSettingsL( TUint32& aBearerId,
       
    84     				TUint32& aNetworkId,TUint32& aApId) const;
       
    85     IMPORT_C void SetGPRSBitrateQualityL(TInt aBitrate);
       
    86     IMPORT_C TInt GetGPRSBitrateQuality() const;
       
    87     IMPORT_C void SetWiFiBitrateQualityL(TInt aBitrate);
       
    88     IMPORT_C TInt GetWiFiBitrateQuality() const;
       
    89     IMPORT_C void Set3GBitrateQualityL(TInt aBitrate);
       
    90     IMPORT_C TInt Get3GBitrateQuality() const;
       
    91     IMPORT_C void SetPreferredQualityL(TInt aQualityValue);
       
    92     IMPORT_C TInt GetPreferredQuality() const; 
       
    93     IMPORT_C void SetSongHisotryShowL(TInt aShowFlag);
       
    94     IMPORT_C TInt GetSongHistoryShow() const;
       
    95     IMPORT_C void SetMaxPresetCountL(TInt aMaxCount);
       
    96     IMPORT_C TInt MaxPresetCount();
       
    97     IMPORT_C void SetTimeCorrectionL(TInt aCorrection);
       
    98     IMPORT_C TInt TimeCorrection() const;
       
    99     IMPORT_C const TDesC& PrivatePath() const;
       
   100     IMPORT_C void SetStereoModeL(TInt val);
       
   101     IMPORT_C TInt GetStereoMode();
       
   102 
       
   103 
       
   104 	//Methods to determine if any channel was added to favorites
       
   105 	IMPORT_C TBool IsFlagIfAnyFavL();
       
   106     IMPORT_C void SetFlagIfAnyFavL();
       
   107     
       
   108     //Added for ALR/SNAP
       
   109     /**
       
   110      * SetUserDefinedSelectionL()
       
   111      * Sets the UserDefinedSelection in cenrep
       
   112      */
       
   113     IMPORT_C void SetUserDefinedSelectionL(TUint32 aUserDefinedSelection);
       
   114     
       
   115     /**
       
   116      * GetUserDefinedSelectionL()
       
   117      * Gets the UserDefinedSelection from cenrep
       
   118      */
       
   119     IMPORT_C TUint32 GetUserDefinedSelectionL() const;
       
   120     
       
   121     /**
       
   122      * SetDestinationIdL()
       
   123      * Sets the DestinationId in cenrep
       
   124      */
       
   125     IMPORT_C void SetDestinationIdL(TUint32 aDestinationId);
       
   126     
       
   127     /**
       
   128      * GetDestinationIdL()
       
   129      * Gets the DestinationId from cenrep
       
   130      */
       
   131     IMPORT_C TUint32 GetDestinationIdL() const;
       
   132 
       
   133 
       
   134 // END CLEANUP
       
   135 
       
   136     /**
       
   137      * Returns the current saved subscriber identifier (IMSI code).
       
   138      *
       
   139      * @return  The saved subscriber identifier.
       
   140      */
       
   141     IMPORT_C const RMobilePhone::TMobilePhoneSubscriberId& SubscriberIdL() const;
       
   142     
       
   143     /**
       
   144      * Sets the subscriber identifier (IMSI code).
       
   145      *
       
   146      * @param   Subscriber identifier to set.
       
   147      */
       
   148     IMPORT_C void SetSubscriberIdL( const RMobilePhone::TMobilePhoneSubscriberId& aSubscriberId );
       
   149     
       
   150 	// Methods for starting view
       
   151     /**
       
   152      * SetStartingViewIdL()
       
   153      * Sets the starting view Id in cenrep
       
   154      */
       
   155     IMPORT_C void SetStartingViewIdL(TUint32 aStartingViewId);
       
   156    
       
   157     /**
       
   158      * GetStartingViewIdL()
       
   159      * Gets the starting view Id from cenrep
       
   160      */
       
   161     IMPORT_C TUint32 GetStartingViewIdL() const;
       
   162    
       
   163     /**
       
   164      * SetStartingViewParameterL()
       
   165      * Sets the starting view parameter in cenrep
       
   166      */
       
   167     IMPORT_C void SetStartingViewParameterL(TUint32 aParameter);
       
   168   
       
   169     /**
       
   170      * GetStartingViewParameterL()
       
   171      * Gets the starting view parameter from cenrep
       
   172      */
       
   173     IMPORT_C TUint32 GetStartingViewParameterL() const;
       
   174 	
       
   175 	/**
       
   176      * SetStickyViewFlagL()
       
   177      * Sets the sticky view flag in cenrep
       
   178      */
       
   179     IMPORT_C void SetStickyViewFlagL(TBool aFlag);
       
   180 	
       
   181 	/**
       
   182      * GetStickyViewFlagL()
       
   183      * Gets the sticky view flag from cenrep
       
   184      */
       
   185 	IMPORT_C TBool GetStickyViewFlagL();
       
   186 
       
   187 	/**
       
   188 	 * GetGlobalAdvFlagL()
       
   189 	 * Gets the global advertisement flag from cenrep
       
   190 	 */
       
   191 	IMPORT_C TBool GetGlobalAdvFlagL();
       
   192 
       
   193 private:
       
   194 
       
   195     CIRSettings();
       
   196     void ConstructL();
       
   197 
       
   198 private:
       
   199 
       
   200 	CRepository *iRepository;
       
   201     RFs iFs;
       
   202 
       
   203 // CLEANUP REQUIRED
       
   204 
       
   205  	//key KAccessPoints
       
   206       TInt iAccessPoints;//!number of accesspoints available 
       
   207 	//key KRunningChId
       
   208       TInt iRunningChId; //! Channelid for isds channels 
       
   209     // zero once it reaches the value.
       
   210     // to arrange the preset data,
       
   211 	//key KIrappVersion
       
   212       TBuf<KMaxLengthIRAppVersion> iIrappVersion;//! irapp version number, 
       
   213     //key KIRID
       
   214       TBuf<KMaxLengthIrId> iIRID;//! ir-id supplied by isds. cannot change
       
   215     // key KSilencePeriodStartTime
       
   216       TBuf<KMaxLengthSilencePeriod> iSilencePeriodStartTime; //!Universal timestamp for the time of decline of an Update
       
   217     //key KISDSBaseUrl
       
   218       TBuf<KMaxLengthUrl> iISDSBaseUrl;//!the base url of isds
       
   219     TBuf<KMaxLengthFileName> iPrivatePath;
       
   220     
       
   221 // END CLEANUP
       
   222 
       
   223     /** The current subscriber identifier (IMSI code). */
       
   224     RMobilePhone::TMobilePhoneSubscriberId iSubscriberId;
       
   225 
       
   226     TInt iResourceFileOffset;
       
   227 
       
   228     TFileName iSettingsFileName;
       
   229     TFileName iBackedUpSettingsFileName;
       
   230 
       
   231     };
       
   232     
       
   233 #endif // C_CIRSETTINGS_H