wvsettings20/IMPSSrc/TIMPSCenRepOperations.h
branchRCL_3
changeset 17 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
16:6ca72c0fe49a 17:a941bc465d9f
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Central Repository operation handler.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef TIMPSCENREPOPERATIONS_H
       
    20 #define TIMPSCENREPOPERATIONS_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "impssapsettings.h"
       
    25 #include "IMPSSAPSettingsStoreDefinitions.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 
       
    29 class CRepository;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 /**
       
    33  * Central Repository operation handler.
       
    34  *
       
    35  * @lib WVSAPSettingsStore.dll
       
    36  * @since 3.0
       
    37  **/
       
    38 NONSHARABLE_CLASS( TIMPSCenRepOperations )
       
    39     {
       
    40 public: // Constructors and destructor
       
    41 
       
    42     TIMPSCenRepOperations( TUint32 aUid, CRepository& aRepository );
       
    43 
       
    44 public: // New functions
       
    45 
       
    46     template <typename T>
       
    47     inline void CreateL( TFixedSAPSetting aSetting, const T& aSettingData )
       
    48         {
       
    49         User::LeaveIfError( iRepository.Create( iMaskBase + aSetting, aSettingData ) );
       
    50         }
       
    51 
       
    52     template <typename T>
       
    53     inline void GetL( TFixedSAPSetting aSetting, T& aSettingData )
       
    54         {
       
    55         User::LeaveIfError( iRepository.Get( iMaskBase + aSetting, aSettingData ) );
       
    56         }
       
    57 
       
    58     template <typename T>
       
    59     inline void SetL( TFixedSAPSetting aSetting, const T& aSettingData )
       
    60         {
       
    61         User::LeaveIfError( iRepository.Set( iMaskBase + aSetting, aSettingData ) );
       
    62         }
       
    63 
       
    64 private: // Data
       
    65 
       
    66     CRepository& iRepository; // Handle to cenrep session. Does not own.
       
    67     TUint32 iMaskBase; // Base for cenrep masks.
       
    68     };
       
    69 
       
    70 #endif	// TIMPSCENREPOPERATIONS_H
       
    71