mmappfw_plat/media_player_settings_engine_api/inc/mpsettingsmodel.h
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Common interface for MMF specific settings models.
       
    15 *
       
    16 */
       
    17 
       
    18 // Version : %version: 3.1.2 %
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef MMPSETTINGSMODEL_H
       
    24 #define MMPSETTINGSMODEL_H
       
    25 
       
    26 // INCLUDES
       
    27 #include    <e32std.h>
       
    28 #include    <e32base.h>
       
    29 #include    <ecom/implementationinformation.h>
       
    30 
       
    31 // DATA TYPES
       
    32 // Config file version
       
    33 enum TConfigVersion
       
    34     {
       
    35     EConfigDefault,
       
    36     EConfigUser
       
    37     };
       
    38 
       
    39 // Bearer type
       
    40 enum TDataBearer
       
    41     {
       
    42     EBearerGPRS,
       
    43     EBearerEGPRS,
       
    44     EBearerWCDMA,
       
    45     EBearerCDMA,
       
    46     EBearerCDMA2000,
       
    47     EBearerWLAN,
       
    48     EBearerHSDPA
       
    49     };
       
    50 
       
    51 // CLASS DECLARATION
       
    52 
       
    53 /**
       
    54 *  CMPSettingsModel
       
    55 *  Common API for MMF specific settings models.
       
    56 *
       
    57 *  @lib MPSettEngine.dll
       
    58 *  @since 2.0
       
    59 */
       
    60 class CMPSettingsModel : public CBase
       
    61     {
       
    62     public:
       
    63 
       
    64        /**
       
    65         * Constructor. Uses ECom to construct an instance of this class.
       
    66         * @param aUid Implementation uid of the object that is to be constructed.
       
    67         */
       
    68         IMPORT_C static CMPSettingsModel* NewL(TUid aUid);
       
    69 
       
    70         /**
       
    71         * Destructor.
       
    72         */
       
    73         IMPORT_C virtual ~CMPSettingsModel();
       
    74 
       
    75     public: // New functions
       
    76 
       
    77         /**
       
    78         * Provides an implementation information array.
       
    79         * @since 2.1
       
    80         * @param aImplInfoArray An array which is populated with the implementation
       
    81         *   information of the available implementations.
       
    82         */
       
    83         IMPORT_C static void ListImplementationsL(RImplInfoPtrArray& aImplInfoArray);
       
    84 
       
    85         /**
       
    86         * Reads settings from MMF controller.
       
    87         * @since 2.0
       
    88         * @param aSettingsType Settings value type:
       
    89         *         EConfigDefault: Load default values
       
    90         *         EConfigUser:    Load user values
       
    91         */
       
    92         virtual void LoadSettingsL(TInt aConfigVersion) = 0;
       
    93 
       
    94         /**
       
    95         * Writes settings to MMF controller.
       
    96         * @since 2.0
       
    97         */
       
    98         virtual void StoreSettingsL() = 0;
       
    99         
       
   100         /**
       
   101         * Sets video contrast
       
   102         * @since 2.0
       
   103         * @param aContrast Contrast level
       
   104         * @return Error value.
       
   105         */
       
   106         virtual TInt SetVideoContrast(TInt aContrast) = 0;
       
   107 
       
   108         /**
       
   109         * Returns video contrast level.
       
   110         * @since 2.0
       
   111         * @param aContrast Contrast level:
       
   112         *         0:    Minimum contrast
       
   113         *         20:   20% of maximum
       
   114         *         40:   40% of maximum
       
   115         *         60:   60% of maximum
       
   116         *         80:   80% of maximum
       
   117         *         100:  Maximum contrast
       
   118         * @return Error value.
       
   119         */
       
   120         virtual TInt GetVideoContrast(TInt& aContrast) = 0;
       
   121 
       
   122         /**
       
   123         * Sets proxy mode..
       
   124         * @since 2.0
       
   125         * @param aMode Proxy mode.
       
   126         * @return Error value.
       
   127         */
       
   128         virtual TInt SetProxyMode(TInt aMode) = 0;
       
   129         
       
   130         /**
       
   131         * Returns proxy mode.
       
   132         * @since 2.0
       
   133         * @param aMode Proxy mode:
       
   134         *         0:    Disabled
       
   135         *         1:    Enabled
       
   136         * @return Error value.
       
   137         */
       
   138         virtual TInt GetProxyMode(TInt& aMode) = 0;
       
   139 
       
   140         /**
       
   141         * Sets Proxy host name.
       
   142         * @since 2.0
       
   143         * @param aHostName Proxy host name.
       
   144         * @return Error value.
       
   145         */
       
   146         virtual TInt SetProxyHostNameL(const TDesC& aHostName) = 0;
       
   147         
       
   148         /**
       
   149         * Returns proxy host name.
       
   150         * @since 2.0
       
   151         * @param aHostName Proxy host name.
       
   152         * @return Error value.
       
   153         */
       
   154         virtual TInt GetProxyHostName(TDes& aHostName) = 0;
       
   155 
       
   156         /**
       
   157         * Sets proxy port number.
       
   158         * @since 2.0
       
   159         * @param aPort Proxy port number.
       
   160         * @return Error value.
       
   161         */
       
   162         virtual TInt SetProxyPort(TInt aPort) = 0;
       
   163         
       
   164         /**
       
   165         * Returns proxy port number..
       
   166         * @since 2.0
       
   167         * @return Integer: Proxy port number.
       
   168         * @return Error value.
       
   169         */
       
   170         virtual TInt GetProxyPort(TInt& aPort) = 0;
       
   171         
       
   172         /**
       
   173         * Sets default access point.
       
   174         * @since 2.0
       
   175         * @param aApId Access point ID.
       
   176         * @return Error value.
       
   177         */
       
   178         virtual TInt SetDefaultAp(TUint32 aApId) = 0;
       
   179 
       
   180         /**
       
   181         * Returns default access point ID.
       
   182         * @since 2.0
       
   183         * @param aApId Access point ID.
       
   184         * @return Error value.
       
   185         */
       
   186         virtual TInt GetDefaultAp(TUint32& aApId) = 0;
       
   187 
       
   188         /**
       
   189         * Sets bandwidth control mode.
       
   190         * @since 2.0
       
   191         * @param aMode bandwidth control mode.
       
   192         * @return Error value.
       
   193         */
       
   194         virtual TInt SetBandwidthControlMode(TInt aMode) = 0;
       
   195         
       
   196         /**
       
   197         * Returns bandwidth control mode.
       
   198         * @since 2.0
       
   199         * @param aMode bandwidth control mode:
       
   200         *           0: Use dynamic bw control if possible
       
   201         *           1: Use static bw control
       
   202         * @return Error value.
       
   203         */
       
   204         virtual TInt GetBandwidthControlMode(TInt& aMode) = 0;
       
   205 
       
   206         /**
       
   207         * Sets maximum bandwidth.
       
   208         * @since 2.1
       
   209         * @param aMaxBw Maximum bandwidth.
       
   210         * @param aBearer Bearer, which max bw is set.
       
   211         * @return Error value.
       
   212         */
       
   213         virtual TInt SetMaxBandwidth(TInt aMaxBw, TDataBearer aBearer) = 0;
       
   214         
       
   215         /**
       
   216         * Returns maximum bandwidth.
       
   217         * @since 2.1
       
   218         * @param aMaxBw Maximum bandwidth.
       
   219         * @param aBearer Bearer, which max bw is enquired.
       
   220         * @return Error value.
       
   221         */
       
   222         virtual TInt GetMaxBandwidth(TInt& aMaxBw, TDataBearer aBearer) = 0;
       
   223 
       
   224         /**
       
   225         * Sets connection timeout.
       
   226         * @since 2.0
       
   227         * @param aTimeout Timeout in minutes.
       
   228         * @return Error value.
       
   229         */
       
   230         virtual TInt SetConnectionTimeout(TInt aTimeout) = 0;
       
   231         
       
   232         /**
       
   233         * Returns connection timeout.
       
   234         * @since 2.0
       
   235         * @param aTimeout Timeout in minutes.
       
   236         * @return Error value.
       
   237         */
       
   238         virtual TInt GetConnectionTimeout(TInt& aTimeout) = 0;
       
   239         
       
   240         /**
       
   241         * Sets server timout.
       
   242         * @since 2.0
       
   243         * @param aTimeout Timeout in minutes.
       
   244         * @return Error value.
       
   245         */
       
   246         virtual TInt SetServerTimeout(TInt aTimeout) = 0;
       
   247         
       
   248         /**
       
   249         * Returns server timeout.
       
   250         * @since 2.0
       
   251         * @param aTimeout Timeout in minutes.
       
   252         * @return Error value.
       
   253         */
       
   254         virtual TInt GetServerTimeout(TInt& aTimeout) = 0;
       
   255 
       
   256         /**
       
   257         * Sets minimum UDP port number.
       
   258         * @since 2.0
       
   259         * @param aPort minimum port number.
       
   260         * @return Error value.
       
   261         */
       
   262         virtual TInt SetMinUDPPort(TInt aPort) = 0;
       
   263 
       
   264         /**
       
   265         * Returns minimum UDP port number.
       
   266         * @since 2.0
       
   267         * @param aPort minimum UDP port number in minutes.
       
   268         * @return Error value.
       
   269         */
       
   270         virtual TInt GetMinUDPPort(TInt& aPort) = 0;
       
   271 
       
   272         /**
       
   273         * Sets maximum UDP port number.
       
   274         * @since 2.0
       
   275         * @param aPort maximum port number.
       
   276         * @return Error value.
       
   277         */
       
   278         virtual TInt SetMaxUDPPort(TInt aPort) = 0;
       
   279 
       
   280         /**
       
   281         * Returns maximum UDP port number.
       
   282         * @since 2.0
       
   283         * @param aPort maximum UDP port number in minutes.
       
   284         * @return Error value.
       
   285         */
       
   286         virtual TInt GetMaxUDPPort(TInt& aPort) = 0;
       
   287 
       
   288         /**
       
   289         * Provides MMF controller version information.
       
   290         * @since 2.0
       
   291         * @param aVersion Controller version number.
       
   292         * @return Error value.
       
   293         */
       
   294         virtual TInt GetControllerVersionInfo(TDes& aVersion) = 0;
       
   295             
       
   296         /**
       
   297         * Provides MMF controller's build date.
       
   298         * @since 2.0
       
   299         * @param aBldDate Controller build date.
       
   300         * @return Error value.
       
   301         */
       
   302         virtual TInt GetControllerBuildDate(TDes& aBldDate) = 0;
       
   303 
       
   304         /**
       
   305         * Provides additional information about MMF controller.
       
   306         * @since 2.0
       
   307         * @param aAdditionalInfo Additional controller information.
       
   308         * @return Error value.
       
   309         */
       
   310         virtual TInt GetControllerAdditionalInfo(TDes& aAdditionalInfo) = 0;
       
   311 
       
   312         /**
       
   313         * Sets demand bandwidth factor.
       
   314         * @since 2.1
       
   315         * @param aFactor Demand bandwidth factor.
       
   316         * @return Error value.
       
   317         */
       
   318         virtual TInt SetDemandBwFactor(TInt aFactor) = 0;
       
   319 
       
   320         /**
       
   321         * Returns demand factor bandwidth.
       
   322         * @since 2.1
       
   323         * @param aFactor Demand bandwidth factor.
       
   324         * @return Error value.
       
   325         */
       
   326         virtual TInt GetDemandBwFactor(TInt& aFactor) = 0;       
       
   327 
       
   328         /**
       
   329         * Sets sustainable bandwidth.
       
   330         * @since 2.1
       
   331         * @param aSustainBw Sustainable bandwidth.
       
   332         * @param aBearer Bearer, which sustain bw is set.
       
   333         * @return Error value.
       
   334         */
       
   335         virtual TInt SetSustainBandwidth(TInt aSustainBw, TDataBearer aBearer) = 0;
       
   336         
       
   337         /**
       
   338         * Returns sustainable bandwidth.
       
   339         * @since 2.1
       
   340         * @param aSustainBw Sustainable bandwidth.
       
   341         * @param aBearer Bearer, which sustain bw is enquired.
       
   342         * @return Error value.
       
   343         */
       
   344         virtual TInt GetSustainBandwidth(TInt& aSustainBw, TDataBearer aBearer) = 0;
       
   345 
       
   346         /**
       
   347         * Returns an array of the fixed sustainable bandwidth values.
       
   348         * @since 2.1
       
   349         * @param aBwArray Fixed sustain bandwidth values are copied to this array.
       
   350         * @param aBearer Bearer, which fixed sustain bw values is enquired.
       
   351         * @return Error value.
       
   352         */
       
   353         virtual TInt GetSustainBwPresetsL(RArray<TInt>& aBwArray, TDataBearer aBearer) = 0;
       
   354 
       
   355         /**
       
   356         * Returns an array of the fixed max bandwidth values.
       
   357         * @since 2.1
       
   358         * @param aBwArray Fixed max bandwidth values are copied to this array.
       
   359         * @param aBearer Bearer, which fixed max bw values is enquired.
       
   360         * @return Error value.
       
   361         */
       
   362         virtual TInt GetMaxBwPresetsL(RArray<TInt>& aBwArray, TDataBearer aBearer) = 0;
       
   363 
       
   364 	/**
       
   365         * Returns video repeat mode.
       
   366         * @since 2.0
       
   367         * @return ETrue:    On
       
   368         *         EFalse:   Off
       
   369         */
       
   370         virtual TBool IsVideoRepeatOnL() = 0;
       
   371 
       
   372         /**
       
   373         * Sets video repeat mode.
       
   374         * @since 2.0
       
   375         * @param aRepeat Repeat mode.
       
   376         */
       
   377         virtual void SetVideoRepeatL(const TBool aRepeat) = 0;
       
   378 
       
   379 		/**
       
   380         * Returns video view mode.
       
   381         * @since 3.2
       
   382         * @return ETrue:    On  (Normal-screen view)
       
   383         *         EFalse:   Off (Full-screen view)
       
   384         */
       
   385         virtual TBool IsDefaultViewOnL() = 0;
       
   386 
       
   387         /**
       
   388         * Sets video view mode.
       
   389         * @since 3.2
       
   390         * @param aView View mode.
       
   391         */
       
   392         virtual void SetDefaultViewL(const TBool aView) = 0;
       
   393 
       
   394 		/**
       
   395         * Returns if Rocker Keys Feature is supported
       
   396         * @since 3.2
       
   397         * @return ETrue:    - Rocker Keys feature is supported
       
   398         *         EFalse:   - Rocker Keys feature is not supported
       
   399         */
       
   400         virtual TBool IsRockerKeysSupportedL() = 0;
       
   401 
       
   402         /**
       
   403         * Sets rocker keys mode.
       
   404         * @since 3.2
       
   405         * @param aRockerKeys rocker keys mode.
       
   406         */
       
   407         virtual void SetRockerKeysL(const TBool aRockerKeys) = 0;
       
   408 
       
   409 		/**
       
   410         * Returns Rocker Keys mode
       
   411         * @since 3.2
       
   412         * @return ETrue:    Show (Rocker Keys are shown)
       
   413         *         EFalse:   Hide (Rocker Keys are hidden)
       
   414         */
       
   415 		virtual TBool ShowRockerKeysL() = 0;
       
   416 
       
   417 		/**
       
   418         * Sets Media Player auto disconnection time.
       
   419         * @since 2.0
       
   420         * @param aTime Auto disconnection time.
       
   421         */
       
   422         virtual void SetAutoDisconTimeL(const TInt aTime) = 0;
       
   423 
       
   424         /**
       
   425         * Returns Media Player auto disconnection time.
       
   426         * @since 2.0
       
   427         * @return 0:    Unlimited time
       
   428         *         1-99: Time in minutes
       
   429         */
       
   430         virtual TInt AutoDisconTimeL() = 0;
       
   431 
       
   432 
       
   433     protected:
       
   434         TUid iDtor_ID_Key;
       
   435     };
       
   436 
       
   437 #endif      // MMPSETTINGSMODEL_H   
       
   438             
       
   439 // End of File