mediasettings/videoplayersettingsengine/inc/videoplayersettingsengine.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2006 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 the License "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:   App settings handles storing and loading of application settings*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 #ifndef _CVCXNSSETTINGS_H_
       
    20 #define _CVCXNSSETTINGS_H_
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>   
       
    24 #include <f32file.h>
       
    25 #include <etelmm.h>
       
    26 
       
    27 
       
    28 // CONSTANTS 
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CRepository;
       
    32 
       
    33 
       
    34 // CLASS DECLARATION
       
    35 
       
    36 /**
       
    37 * Class CVcxNsSettingsEngine handles application setting related saving and loading.
       
    38 *
       
    39 * @lib vcxnssettingsengine.lib
       
    40 */
       
    41 class CVcxNsSettingsEngine : public CBase
       
    42     { 
       
    43 
       
    44     public:
       
    45 
       
    46         /**
       
    47          * Two-phased constructor.
       
    48          *
       
    49          * @return New CIptvAppSettings object.
       
    50          */
       
    51         IMPORT_C static CVcxNsSettingsEngine* NewL();
       
    52 
       
    53         /**
       
    54          * Destructor.
       
    55          */
       
    56         virtual ~CVcxNsSettingsEngine();
       
    57 
       
    58    
       
    59     public: // Exported methods that handle application settings
       
    60 				
       
    61 		
       
    62         /**
       
    63          * Get used memory from CenRep. Leaves with system-wide error code
       
    64          * on error.
       
    65          *
       
    66          * @param aUsedMemory Reference to variable where value is stored.
       
    67          */
       
    68         IMPORT_C void GetUsedMemoryL( TInt& aUsedMemory );
       
    69 
       
    70         /**
       
    71          * Set used memory to CenRep.
       
    72          *
       
    73          * @param aUsedMemory New value.        
       
    74          * @return ETrue if successfull, EFalse otherwise.
       
    75          */
       
    76         IMPORT_C TBool SetUsedMemory( TInt aUsedMemory );
       
    77 
       
    78         /**
       
    79          * Get parental control setting from central repository.
       
    80          *
       
    81          * @param aParentControl On return, parental control setting value.
       
    82          *                       0 if parental control is off, otherwise the age set. 
       
    83          * @return ETrue if successfull, EFalse otherwise.
       
    84          */
       
    85         IMPORT_C TBool GetParentControl( TInt& aParentControl );
       
    86 
       
    87         /**
       
    88          * Set parental control setting to central repository.
       
    89          *
       
    90          * @param aParentControl Parental control value to set.
       
    91          * @return ETrue if successfull, EFalse otherwise.
       
    92          */
       
    93         IMPORT_C TBool SetParentControl( TInt aParentControl );
       
    94 
       
    95         /**
       
    96          * Get VoD thumnbails from CenRep.
       
    97          *
       
    98          * @param aVodThumbnails Reference to variable where value is stored.
       
    99          * @return ETrue if successfull, EFalse otherwise.
       
   100          */
       
   101         IMPORT_C TBool GetVideoOnDemandThumbnails( TInt& aVodThumbnails );
       
   102         
       
   103         /**
       
   104          * Set VoD thumbnails to CenRep.
       
   105          *
       
   106          * @param aVodThumbnails New value.
       
   107          * @return ETrue if successfull, EFalse otherwise.
       
   108          */
       
   109         IMPORT_C TBool SetVideoOnDemandThumbnails( TInt aVodThumbnails );
       
   110         
       
   111         /**
       
   112          * Get UsedSnapId from CenRep.
       
   113          *
       
   114          * @param aUsedSnapId Reference to variable where value is stored.
       
   115          * @return ETrue if successful, EFalse otherwise.
       
   116          */
       
   117         IMPORT_C TBool GetUsedSnapId( TInt& aUsedSnapId );
       
   118 
       
   119         /**
       
   120          * Set UsedSnapId to CenRep.
       
   121          *
       
   122          * @param aUsedSnapId New value.
       
   123          * @return ETrue if successful, EFalse otherwise.
       
   124          */
       
   125         IMPORT_C TBool SetUsedSnapId( TInt aUsedSnapId );
       
   126         
       
   127         /**
       
   128          * Get AllowUseGprs from CenRep.
       
   129          *
       
   130          * @param aAllowUseGprs Reference to variable where value is stored.
       
   131          * @return ETrue if successful, EFalse otherwise.
       
   132          */
       
   133         IMPORT_C TBool GetAllowUseGprs( TInt& aAllowUseGprs );
       
   134 
       
   135         /**
       
   136          * Set AllowUseGprs to CenRep.
       
   137          *
       
   138          * @param aAllowUseGprs New value.
       
   139          * @return ETrue if successful, EFalse otherwise.
       
   140          */
       
   141         IMPORT_C TBool SetAllowUseGprs( TInt aAllowUseGprs );
       
   142         
       
   143         /**
       
   144          * Get AllowRoaming from CenRep.
       
   145          *
       
   146          * @param aAllowRoaming Reference to variable where value is stored.
       
   147          * @return ETrue if successful, EFalse otherwise.
       
   148          */
       
   149         IMPORT_C TBool GetAllowRoaming( TInt& aAllowRoaming );
       
   150 
       
   151         /**
       
   152          * Set AllowRoaming to CenRep.
       
   153          *
       
   154          * @param aAllowRoaming New value.
       
   155          * @return ETrue if successful, EFalse otherwise.
       
   156          */
       
   157         IMPORT_C TBool SetAllowRoaming( TInt aAllowRoaming );
       
   158  
       
   159         /**
       
   160          * Check the lock code 
       
   161          *
       
   162          * @return ETrue if the user enters the correct lock code
       
   163          */
       
   164         IMPORT_C TBool CheckLockCodeL();
       
   165   
       
   166         /**
       
   167          * Get player volume setting fron CenRep
       
   168          *
       
   169          * @param aVolume Reference to variable where value is stored.
       
   170          * @return ETrue if successful, EFalse otherwise.
       
   171          */
       
   172         IMPORT_C TBool GetPlayerVolume( TInt& aVolume );
       
   173 
       
   174         /**
       
   175          * Store volume setting to CenRep
       
   176          *
       
   177          * @param aVolume New value.
       
   178          * @return ETrue if successful, EFalse otherwise.
       
   179          */
       
   180         IMPORT_C TBool SetPlayerVolume( TInt aVolume );
       
   181         
       
   182     private:
       
   183          
       
   184         /**
       
   185          * C++ Constructor.
       
   186          *
       
   187          */
       
   188         CVcxNsSettingsEngine( );
       
   189         
       
   190         /**
       
   191          * EPOC constructor.
       
   192          */
       
   193         void ConstructL( );
       
   194 
       
   195                
       
   196         /**
       
   197          * Read integer value from CenRep.
       
   198          *
       
   199          * @param aCategory CenRep category uid of the requested key
       
   200          * @param aKey   CenRep key to read.
       
   201          * @param aValue Reference to variable where value is stored.
       
   202          * @return ETrue if successfull, EFalse otherwise.
       
   203          */
       
   204         TBool GetCenRepIntKey( TUid aCategory, TInt aKey, TInt& aValue );
       
   205         
       
   206         /**
       
   207          * Write integer value to CenRep.
       
   208          *
       
   209          * @param aCategory CenRep category uid of the requested key
       
   210          * @param aKey   CenRep key to write.
       
   211          * @param aValue New value.
       
   212          * @return ETrue if successfull, EFalse otherwise.
       
   213          */
       
   214         TBool SetCenRepIntKey(  TUid aCategory, TInt aKey, TInt aValue );
       
   215               
       
   216     private: // Data
       
   217     
       
   218         CRepository*  iCenRep;
       
   219         CRepository*  iAlrCenRep;
       
   220 
       
   221         TBool           iPhoneConnected;
       
   222         RTelServer		iServer;
       
   223         RMobilePhone	iPhone;
       
   224 
       
   225     };
       
   226 
       
   227 #endif // _CVCXNSSETTINGS_H_
       
   228 
       
   229 // End of File