uiservicetab/vimpstengine/tsrc/vimpstengine_ut/src/stubs/s_vimpstsettingsstore.h
changeset 0 5e5d6b214f4f
equal deleted inserted replaced
-1:000000000000 0:5e5d6b214f4f
       
     1 /*
       
     2 * Copyright (c) 2008 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:  vimpst settings store definitions
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CVIMPSTSETTINGSSTORE_H
       
    19 #define __CVIMPSTSETTINGSSTORE_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 /** types of settings provided in meco settings */
       
    24 enum TSettingItemName
       
    25     {
       
    26     ETOUDlgOff = 0x00000000,                      // key value to enable or disable TOU Dialog to be shown
       
    27     EURLRegistrationOff = 0x00000001,             // key value to enable or disable URL registration query
       
    28     EServiceSuccessfullLogin = 0x00000002,
       
    29     EServiceToneFileName = 0x00000003,              // key value to get the IM tone File name.complete path of the file name should be provided. example "C:\sounds\digital\imtone.wav"                        
       
    30     EServiceURLLink = 0x00000004,                    // key value to get the URL link for IM based on service     
       
    31     EServiceAvatar = 0x00000005,                  // key value to get the Own Avatar for IM based on service    
       
    32     EServiceAvatarMimeType = 0x00000006,          // key value to get the Own Avatar s 'mimetype' for IM based on service   
       
    33     EServiceOwnAvatarIconIndex = 0x00000007 ,         // key value to get the Own Icon index for avatar s  
       
    34     // key value to check whether the  "Cancel Login" is supported or not   
       
    35     // if setting "value = 1" then cancel login not supported else supported.
       
    36     // if cancel is supported , no need to write anything to cenrep.
       
    37     // By default its taken as supported.
       
    38     // if not supported then write explicitly this setting as '1'
       
    39     EServiceCancelLoginNotSupported = 0x00000008        
       
    40     };                                                      
       
    41 
       
    42 
       
    43 
       
    44 //CLASS  DECLARATION
       
    45 /**  
       
    46  *  M-Class for meco settingstore API's 
       
    47  *  @lib vimpstsettingsstore.lib
       
    48  *  @since S60 5.0
       
    49  */
       
    50 class MVIMPSTSettingsStore
       
    51     {        
       
    52     public:     //Interface
       
    53         
       
    54         /**
       
    55          * virtual Destructor.
       
    56          */
       
    57         virtual ~MVIMPSTSettingsStore()
       
    58             {
       
    59             }
       
    60                 
       
    61         /**
       
    62          * Peforms Get/Set operation in the cenrep
       
    63          * @param aServiceId, id if the service for which settings are get/set      
       
    64          * @param aSettingItemName, setting item name 
       
    65          * @param aBuffer, variable to set/get the value
       
    66          * @return TInt, used as error passing value.  
       
    67          */  
       
    68         virtual TInt SetL(TUint32 aServiceId, TSettingItemName aSettingItemNAme, const TDesC8& aBuffer ) = 0;
       
    69         
       
    70         virtual TInt GetL(TUint32 aServiceId, TSettingItemName aSettingItemNAme, const TDesC8& aBuffer ) = 0;
       
    71         
       
    72     };
       
    73 
       
    74 /**
       
    75  *  vimpst settings API class
       
    76  *
       
    77  *  Main class of managing vimpst settings
       
    78  *
       
    79  *  @code example code of how to get/set a value to the setting item in cenrep 
       
    80  *  MVIMPSTSettingsStore* obj = CVIMPSTUiSettingsStoreFactory::NewL();
       
    81  *  TInt value = 1;
       
    82  *  TInt err = obj->Set(serviceId, ETOUDlgOff, value );
       
    83  *  similarly for getting the value
       
    84  *  obj->Get(serviceId, ETOUDlgOff, value);
       
    85  *  @lib vimpstsettingsstore.lib
       
    86  *  @since S60 v5.0
       
    87  */
       
    88 NONSHARABLE_CLASS( CVIMPSTSettingsStore ): public CBase
       
    89     {
       
    90 
       
    91     public: // Constructors and destructor
       
    92 
       
    93         /**
       
    94         * Two-phased constructor.
       
    95         */
       
    96         IMPORT_C static MVIMPSTSettingsStore* NewL();
       
    97         
       
    98         /**
       
    99          * Two-phased constructor.
       
   100          */
       
   101         IMPORT_C static MVIMPSTSettingsStore* NewLC();
       
   102         
       
   103         /**
       
   104         * Destructors.
       
   105         */
       
   106         virtual ~CVIMPSTSettingsStore();  
       
   107     };
       
   108 
       
   109 #endif /*__CVIMPSTSETTINGSSTORE_H*/