profilesservices/ProfileEngine/EngSrc/CProfileFeedbackSettingsImpl.h
changeset 0 8c5d936e5675
child 8 f62c3a3d66b8
equal deleted inserted replaced
-1:000000000000 0:8c5d936e5675
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Profile Feedback settings implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CPROFILEFEEDBACKSETTINGSIMPL_H
       
    21 #define __CPROFILEFEEDBACKSETTINGSIMPL_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <MProfileFeedbackSettings.h>
       
    26 #include "MProfileSetFeedbackSettings.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CRepository;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  Profile feedback settings implementation.
       
    35 *
       
    36 *  @lib ProfileEng.lib
       
    37 *  @since 5.0
       
    38 */
       
    39 NONSHARABLE_CLASS(CProfileFeedbackSettingsImpl) : public CBase,
       
    40                                public MProfileFeedbackSettings,
       
    41                                public MProfileSetFeedbackSettings
       
    42     {
       
    43     public:  // Constructors and destructor
       
    44 
       
    45         /**
       
    46         * Two-phased constructor.
       
    47         */
       
    48         static CProfileFeedbackSettingsImpl* NewL();
       
    49         static CProfileFeedbackSettingsImpl* NewL(
       
    50                 const MProfileFeedbackSettings& aProfileFeedbackSettings );
       
    51 
       
    52         /**
       
    53         * Destructor.
       
    54         */
       
    55         virtual ~CProfileFeedbackSettingsImpl();
       
    56 
       
    57     public: // New functions
       
    58 
       
    59         /**
       
    60         * Internalize data from the central repository.
       
    61         * @since 5.0
       
    62         * @param aCenRep Central Repository object to read the settings
       
    63         * @param aProfileId the id of the profile to be internalized
       
    64         */
       
    65         void InternalizeL( CRepository& aCenRep, TInt aProfileId );
       
    66 
       
    67         /**
       
    68         * Externalize data to Central Repository.
       
    69         * @since 5.0
       
    70         * @param aCenRep Central Repository object to write the settings
       
    71         */
       
    72         void ExternalizeL( CRepository& aCenRep, TInt aProfileId ) const;
       
    73 
       
    74     public: // Functions from base classes
       
    75 
       
    76         /**
       
    77         * From MProfileFeedbackSettings.
       
    78         */
       
    79         TProfileTactileFeedback TactileFeedback() const;
       
    80 
       
    81         /**
       
    82         * From MProfileFeedbackSettings.
       
    83         */
       
    84         TProfileAudioFeedback AudioFeedback() const;
       
    85 
       
    86         /**
       
    87         * From MProfileSetFeedbackSettings.
       
    88         */
       
    89         void SetTactileFeedback( TProfileTactileFeedback aTactileFeedback );
       
    90 
       
    91         /**
       
    92         * From MProfileSetFeedbackSettings.
       
    93         */
       
    94         void SetAudioFeedback( TProfileAudioFeedback aAudioFeedback );
       
    95 
       
    96     private:
       
    97         void InitPowerSaveMode();
       
    98         void ReadPowerSaveConfigL();
       
    99 
       
   100     private:    // Data
       
   101 
       
   102         // Tactile feedback
       
   103         TProfileTactileFeedback iTactileFeedback;
       
   104 
       
   105         // Audio feedback
       
   106         TProfileAudioFeedback iAudioFeedback;
       
   107         
       
   108         TInt iPsmConfigTactileFeedback;
       
   109         TInt iPsmConfigAudioFeedback;
       
   110         TBool iPowerSaveMode;
       
   111     };
       
   112 
       
   113 #endif      // __CPROFILEFEEDBACKSETTINGSIMPL_H
       
   114 
       
   115 // End of File
       
   116 
       
   117