internetradio2.0/irsettings/inc/irsettings.h
changeset 14 896e9dbc5f19
equal deleted inserted replaced
12:608f67c22514 14:896e9dbc5f19
       
     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 <f32file.h>
       
    21 
       
    22 class CRepository;
       
    23 
       
    24 // CLEANUP REQUIRED
       
    25 
       
    26 const TInt KMaxLengthIRAppVersion = 50;
       
    27 const TInt KMaxLengthIrId = 32;
       
    28 const TInt KMaxLengthSilencePeriod = 32;
       
    29 const TInt KMaxLengthUrl = 500;
       
    30 const TInt KMaxLengthFileName = 500;
       
    31 
       
    32 // END CLEANUP
       
    33 
       
    34 NONSHARABLE_CLASS( CIRSettings ) : public CObject
       
    35     {
       
    36 
       
    37 public:
       
    38 
       
    39     IMPORT_C static CIRSettings* OpenL();
       
    40     ~CIRSettings();
       
    41 
       
    42     IMPORT_C TBool IsFlagTermsAndConditionsL();
       
    43     IMPORT_C void SetFlagTermsAndConditionsL();
       
    44     IMPORT_C void ReSetFlagTermsAndConditionsL();
       
    45     IMPORT_C const TDesC& GetIrappVersionL() const;
       
    46     IMPORT_C void SetIRIDL(const TDesC& aIrid);
       
    47     IMPORT_C const TDesC& GetIRIDL() const;
       
    48     IMPORT_C const  TDesC& GetISDSBaseUrlL() const;
       
    49     IMPORT_C void SetISDSBaseUrlL(const TDesC& aIsdsUrl);
       
    50     IMPORT_C TInt GetVolumeSetting() const;
       
    51     IMPORT_C void SetVolumeSettingL(TInt aPlayVolume);
       
    52     IMPORT_C TBool IsUpdateAvailableL();
       
    53     IMPORT_C void SetUpdateAvailableL();
       
    54 	IMPORT_C void ReSetUpdateAvailableL();
       
    55     IMPORT_C TInt GetLogRunningNo() const;
       
    56     IMPORT_C void SetLogRunningNoL();
       
    57     IMPORT_C void SetTimeOutL(TInt aTimeOut);
       
    58     IMPORT_C TInt GetTimeOut() const;
       
    59     IMPORT_C void SetSilencePeriodL(TUint aSilencePeriod);
       
    60     IMPORT_C TUint GetSilencePeriodL() const;
       
    61     IMPORT_C void SetSilencePeriodStartL(const TDesC& aSilencePeriodStart);
       
    62     IMPORT_C const TDesC& GetSilencePeriodStartL() const;
       
    63     IMPORT_C void SetPreferredQualityL(TInt aQualityValue);
       
    64     IMPORT_C TInt GetPreferredQuality() const; 
       
    65     IMPORT_C void SetSongHisotryShowL(TInt aShowFlag);
       
    66     IMPORT_C TInt GetSongHistoryShow() const;
       
    67     IMPORT_C void SetMaxPresetCountL(TInt aMaxCount);
       
    68     IMPORT_C TInt MaxPresetCount();
       
    69     IMPORT_C void SetTimeCorrectionL(TInt aCorrection);
       
    70     IMPORT_C TInt TimeCorrection() const;
       
    71     IMPORT_C const TDesC& PrivatePath() const;
       
    72 
       
    73 	// Methods for starting view
       
    74     /**
       
    75      * SetStartingViewIdL()
       
    76      * Sets the starting view Id in cenrep
       
    77      */
       
    78     IMPORT_C void SetStartingViewIdL(TUint32 aStartingViewId);
       
    79    
       
    80     /**
       
    81      * GetStartingViewIdL()
       
    82      * Gets the starting view Id from cenrep
       
    83      */
       
    84     IMPORT_C TUint32 GetStartingViewIdL() const;
       
    85    
       
    86 	/**
       
    87 	 * GetGlobalAdvFlagL()
       
    88 	 * Gets the global advertisement flag from cenrep
       
    89 	 */
       
    90 	IMPORT_C TBool GetGlobalAdvFlagL();
       
    91 
       
    92 	/**
       
    93 	 * GetManuallyInputtedStationUrlL()
       
    94 	 * Gets the url inputted in Go to station view from cenrep
       
    95 	 */
       
    96     IMPORT_C const  TDesC& GetManuallyInputtedStationUrlL() const;
       
    97     /**
       
    98      * SetManuallyInputtedStationUrlL()
       
    99      * Sets the url in Go to station view from cenrep
       
   100      */
       
   101     IMPORT_C void SetManuallyInputtedStationUrlL(const TDesC& aUrl);
       
   102 
       
   103     /**
       
   104      * GetManuallyInputtedStationNameL()
       
   105      * Gets the name inputted in Go to station view from cenrep
       
   106      */
       
   107     IMPORT_C const  TDesC& GetManuallyInputtedStationNameL() const;
       
   108     /**
       
   109      * SetManuallyInputtedStationNameL()
       
   110      * Sets the name in Go to station view from cenrep
       
   111      */
       
   112     IMPORT_C void SetManuallyInputtedStationNameL(const TDesC& aName);
       
   113 private:
       
   114 
       
   115     CIRSettings();
       
   116     void ConstructL();
       
   117 
       
   118 private:
       
   119 
       
   120 	CRepository *iRepository;
       
   121     RFs iFs;
       
   122 
       
   123 	//key KIrappVersion
       
   124     TBuf<KMaxLengthIRAppVersion> iIrappVersion;//! irapp version number, 
       
   125     //key KIRID
       
   126     TBuf<KMaxLengthIrId> iIRID;//! ir-id supplied by isds. cannot change
       
   127     // key KSilencePeriodStartTime
       
   128     TBuf<KMaxLengthSilencePeriod> iSilencePeriodStartTime; //!Universal timestamp for the time of decline of an Update
       
   129     //key KISDSBaseUrl
       
   130     TBuf<KMaxLengthUrl> iISDSBaseUrl;//!the base url of isds
       
   131     TBuf<KMaxLengthFileName> iPrivatePath;
       
   132     TBuf<KMaxLengthUrl> iStationUrl;
       
   133     TBuf<KMaxLengthFileName> iStationName;
       
   134     };
       
   135     
       
   136 #endif // C_CIRSETTINGS_H