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