phoneengine/phonemodel/inc/cpeexternaldatahandler.h
changeset 0 5f000ab63145
child 27 2f8f8080a020
child 61 41a7f70b3818
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     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:  This file contains the header file of the CPEExternalDataHandler class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPEEXTERNALDATAHANDLER_H
       
    20 #define CPEEXTERNALDATAHANDLER_H
       
    21 
       
    22 //  INCLUDE FILES
       
    23 #include "cpeaudiooutputpreferencemonitor.h"
       
    24 #include "cpecalldurationdisplaysettingmonitor.h"
       
    25 #include "cpeincallearvolumesettingmonitor.h"
       
    26 #include "cpeincallloudspeakervolumesettingmonitor.h"
       
    27 #include "cpenetworkregistrationstatusmonitor.h"
       
    28 #include "cpeprofilesettingmonitor.h"
       
    29 #include "mpeexternaldatahandler.h"
       
    30 #include "cpeaccessorymodemonitor.h"
       
    31 #include <e32base.h>
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class MPEDataStore;
       
    35 class MPEPhoneModelInternal;
       
    36 
       
    37 // DATA TYPES
       
    38 // None
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 /**
       
    43 *  CPEExternalDataHandler
       
    44 *  For derivation only, not to be instantiated!
       
    45 *  A container for Phone Engine base Central Repository monitors and
       
    46 *  a command class for Central Repository settings.
       
    47 *
       
    48 *  @lib Phoneengine.lib
       
    49 *  @since Series60_4.0
       
    50 */
       
    51 NONSHARABLE_CLASS( CPEExternalDataHandler )
       
    52         : public CBase,
       
    53           public MPEExternalDataHandler
       
    54     {
       
    55     public:
       
    56 
       
    57         static CPEExternalDataHandler* NewL( MPEPhoneModelInternal& aModel );
       
    58         ~CPEExternalDataHandler();
       
    59         
       
    60 // from base class MPEExternalDataHandler        
       
    61         
       
    62         /**
       
    63         * Gets the current value of the specified setting,
       
    64         * if the operation was successful then aValue contains the current valid
       
    65         * value of the setting
       
    66         * @param aSetting specifies the setting to be read
       
    67         * @param aValue the current value of the monitored setting
       
    68         * @return Symbian OS error code
       
    69         */
       
    70         TInt Get( const TPEExternalDataId aSetting, TInt& aValue ) const;
       
    71 
       
    72         /**
       
    73         * Gets the current value of the specified setting,
       
    74         * if the operation was successful then aValue contains the current valid
       
    75         * value of the setting
       
    76         * @param aSetting specifies the setting to be read
       
    77         * @param aValue the current value of the monitored setting
       
    78         * @return Symbian OS error code
       
    79         */
       
    80         TInt GetText( const TPEExternalDataId aSetting, TDesC& aValue ) const;
       
    81 
       
    82         /**
       
    83         * Sets the value of the specified setting,
       
    84         * @param aSetting specifies the setting to be written
       
    85         * @param aValue the value of the setting
       
    86         * @return Symbian OS error code
       
    87         */
       
    88         TInt Set( const TPEExternalDataId aSetting, const TInt aValue );
       
    89 
       
    90     private:
       
    91 
       
    92         CPEExternalDataHandler( MPEDataStore& aEngineInfo );
       
    93         void ConstructL( MPEPhoneModelInternal& aModel );
       
    94 
       
    95         /**
       
    96         * Check if automatic answer is defined for connected accessory.
       
    97         * @param aSetting specifies accessory type of setting
       
    98         * @param aValue the value of the setting
       
    99         * @return Symbian OS error code
       
   100         */
       
   101         TInt GetAutomaticAnswer( TUint32 aSetting,TInt& aValue ) const;
       
   102         
       
   103     protected: // Owned by this object
       
   104 
       
   105         // Reference to engine info object
       
   106         MPEDataStore& iDataStore;
       
   107 
       
   108         // Monitor objects
       
   109         CPEAudioOutputPreferenceMonitor* iAudioOutputPreferenceMonitor;
       
   110         CPECallDurationDisplaySettingMonitor* iCallDurationDisplay;
       
   111         CPEIncallEarVolumeSettingMonitor* iEarVolumeSetting;
       
   112         CPEIncallLoudspeakerVolumeSettingMonitor* iLoudspeakerVolumeSetting;
       
   113         CPENetworkRegistrationStatusMonitor* iNetworkRegistrationStatus;
       
   114         CPEProfileSettingMonitor* iProfileSettings;
       
   115         CPEAccessoryModeMonitor* iAccessoryModeMonitor;
       
   116 
       
   117         // Repository objects
       
   118         CRepository* iAccessorySettingsRepository;
       
   119         CRepository* iTelephonySettingsRepository;
       
   120         CRepository* iTelephonyVariationRepository;
       
   121         CRepository* iCoreApplicationRepository;
       
   122     };
       
   123 
       
   124 #endif  //  CPEEXTERNALDATAHANDLER_H