wvuing/wvuiprocess/Inc/CCASettingsPC.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     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 "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:  Process Component for Settings
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CCASETTINGSPC_H
       
    21 #define CCASETTINGSPC_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include    <e32base.h>
       
    25 #include    "MCASettingsPC.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CCAEngine;
       
    29 class CIMPSSAPSettings;
       
    30 class MCASettings;
       
    31 
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  CCASettingsPC
       
    37 *  Process Component for Settings
       
    38 *  since 3.2 lib
       
    39 */
       
    40 
       
    41 class CCASettingsPC : public CBase, public MCASettingsPC
       
    42     {
       
    43     public:
       
    44 
       
    45         /**
       
    46          * Two-phased constructor.
       
    47          */
       
    48         static CCASettingsPC* NewL( CCAEngine& aEngine );
       
    49 
       
    50 
       
    51         /**
       
    52          * Destructor
       
    53          */
       
    54         virtual ~CCASettingsPC();
       
    55 
       
    56     public:
       
    57         /**
       
    58          * Sets the default sap
       
    59          */
       
    60 
       
    61         void SetDefaultSapL( CIMPSSAPSettings* aSap ) ;
       
    62 
       
    63         /**
       
    64          * Retrieves value.
       
    65          * @param aSetting specifies the wanted setting.
       
    66          * @return Boolean value.
       
    67          */
       
    68         TBool GetBoolValuePC( TEnumsPC::TCASettingValues aSetting,
       
    69                               CIMPSSAPSettings* aSap = NULL );
       
    70 
       
    71 
       
    72         /**
       
    73          * Retrieves value.
       
    74          * @param aSetting specifies the wanted setting.
       
    75          * @return Integer value.
       
    76          */
       
    77         TInt GetIntValuePC( TEnumsPC::TCASettingValues aSetting,
       
    78                             CIMPSSAPSettings* aSap = NULL );
       
    79 
       
    80 
       
    81         /**
       
    82          * Retrieves value..
       
    83          * @return Bool value.
       
    84          */
       
    85         TBool IsAlphabeticalPC( CIMPSSAPSettings* aSap = NULL );
       
    86 
       
    87 
       
    88         /**
       
    89          * Retrieves value.
       
    90          * Ownership is transferred to caller!!!
       
    91          * @param aSetting specifies the wanted setting.
       
    92          * @return String value.
       
    93          */
       
    94         HBufC* GetSapSettingValuePCL( TEnumsPC::TCASettingStrings aSetting,
       
    95                                       CIMPSSAPSettings* aSap  = NULL );
       
    96         /**
       
    97          * Sets a value.
       
    98          * @param aSetting specifies the wanted setting.
       
    99          * @param aValue specifies the value we want to store.
       
   100          */
       
   101         void SetValueL( TEnumsPC::TCASettingValues aSetting, TBool aValue ) ;
       
   102         /**
       
   103          * Sets a value.
       
   104          * @param aSetting specifies the wanted setting.
       
   105          * @param aValue specifies the value we want to store.
       
   106          * @param aIgnoreRollback Don't perform rollback operation on these
       
   107          *                        errors
       
   108          *        NULL if rollback is wanted in every error situation.
       
   109          */
       
   110         void SetBoolValuePCL( TEnumsPC::TCASettingValues aSetting, TBool aValue,
       
   111                               RArray<TInt>* aIgnoreRollback  = NULL,
       
   112                               CIMPSSAPSettings* aSap  = NULL );
       
   113 
       
   114         /**
       
   115          * Sets a value.
       
   116          * @param aSetting specifies the wanted setting.
       
   117          * @param aValue specifies the value we want to store.
       
   118          * @param aIgnoreRollback Don't perform rollback operation on these
       
   119          *                        errors
       
   120          *        NULL if rollback is wanted in every error situation.
       
   121          */
       
   122         void SetIntValuePCL( TEnumsPC::TCASettingValues aSetting, TInt aValue,
       
   123                              RArray<TInt>* aIgnoreRollback, /* = NULL*/
       
   124                              CIMPSSAPSettings* aSap /* = NULL*/ );
       
   125 
       
   126 
       
   127         /**
       
   128         * Sets a value.
       
   129         * @param aSetting specifies the wanted setting.
       
   130         * @param aValue specifies the value we want to store.
       
   131         * @param aIgnoreRollback Don't perform rollback operation on
       
   132         *                        these errors
       
   133         *        NULL if rollback is wanted in every error situation.
       
   134         */
       
   135         void SetSapSettingValuePCL( TEnumsPC::TCASettingStrings aSetting, const TDesC& aValue,
       
   136                                     RArray<TInt>* aIgnoreRollback = NULL ,
       
   137                                     CIMPSSAPSettings* aSap = NULL );
       
   138 
       
   139         /**
       
   140          * Flushes data from memory to persistent storage
       
   141          */
       
   142         virtual void FlushDataPC();
       
   143 
       
   144 
       
   145     private:
       
   146 
       
   147         /**
       
   148          * ConstructL
       
   149          */
       
   150         void ConstructL( CIMPSSAPSettings* aSap );
       
   151 
       
   152         /**
       
   153          * Default Constructor.
       
   154          */
       
   155         CCASettingsPC( CCAEngine& aEngine );
       
   156 
       
   157     private: //data
       
   158 
       
   159         //Does not own,Reference to Engine
       
   160         CCAEngine& iEngine;
       
   161 
       
   162         //Does not own,pointer to Engine Settings
       
   163         MCASettings* iSettings;
       
   164 
       
   165 
       
   166     };
       
   167 
       
   168 #endif      // CCASETTINGSPC_H
       
   169 
       
   170 // End of File