profilesservices/ProfileEngine/WrapperSrc/CProEngToneSettingsImpl.h
changeset 0 8c5d936e5675
equal deleted inserted replaced
-1:000000000000 0:8c5d936e5675
       
     1 /*
       
     2 * Copyright (c) 2009 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 class implements MProEngToneSettings interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CPROENGTONESETTINGSIMPL_H
       
    21 #define CPROENGTONESETTINGSIMPL_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <MProEngToneSettings.h>
       
    25 #include <e32base.h>
       
    26 #include <TProfileToneSettings.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MProfileTones;
       
    30 class MProfileSetTones;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 * This class implements MProEngToneSettings interface.
       
    36 *
       
    37 *  @lib ProfileEngine.lib
       
    38 *  @since 3.1
       
    39 */
       
    40 NONSHARABLE_CLASS( CProEngToneSettingsImpl ) : public CBase,
       
    41                                                public MProEngToneSettings
       
    42     {
       
    43     public:  // Constructors and destructor
       
    44 
       
    45         /**
       
    46          * Two-phased constructor.
       
    47          */
       
    48         static CProEngToneSettingsImpl* NewL(
       
    49                 TProfileToneSettings& aToneSettings,
       
    50                 TUint32 aModifiableFlags );
       
    51 
       
    52         /**
       
    53          * Destructor.
       
    54          */
       
    55         virtual ~CProEngToneSettingsImpl();
       
    56 
       
    57     public:
       
    58 
       
    59         /**
       
    60          * From MProEngToneSettings
       
    61          */
       
    62         TProfileRingingType RingingType() const;
       
    63 
       
    64         /**
       
    65         * Returns the keypad volume.
       
    66         * @since 3.1
       
    67         * @return Returns the keypad volume.
       
    68         */
       
    69         TProfileKeypadVolume KeypadVolume() const;
       
    70 
       
    71         /**
       
    72         * Returns the ringing volume.
       
    73         * @since 3.1
       
    74         * @return Returns the ringing volume.
       
    75         */
       
    76         TProfileRingingVolume RingingVolume() const;
       
    77 
       
    78         /**
       
    79         * Returns the state of vibrating alert setting.
       
    80         * @since 3.1
       
    81         * @return Returns the state of vibrating alert setting.
       
    82         */
       
    83         TBool VibratingAlert() const;
       
    84 
       
    85         /**
       
    86         * Returns the state of warning and game tones setting.
       
    87         * @since 3.1
       
    88         * @return Returns the state of warning and game tones setting.
       
    89         */
       
    90         TBool WarningAndGameTones() const;
       
    91 
       
    92         /**
       
    93         * Returns the state of text-to-speech setting.
       
    94         * @since 3.1
       
    95         * @return Returns the state of text-to-speech setting.
       
    96         */
       
    97         TBool TextToSpeech() const;
       
    98 
       
    99         /**
       
   100         * Sets the ringing type.
       
   101         * @since 3.1
       
   102         * @param aRingingType The new value for ringing type.
       
   103         * @return KErrNone if succesful, KErrAccessDenied if ringing type
       
   104         *         setting of this profile is read-only.
       
   105         */
       
   106         TInt SetRingingType( TProfileRingingType aRingingType );
       
   107 
       
   108         /**
       
   109         * Sets the keypad volume.
       
   110         * @since 3.1
       
   111         * @param aKeypadVolume The new value for keypad tones volume.
       
   112         * @return KErrNone if succesful, KErrAccessDenied if keypad tones
       
   113         *         setting of this profile is read-only.
       
   114         */
       
   115         TInt SetKeypadVolume( TProfileKeypadVolume aKeypadVolume );
       
   116 
       
   117         /**
       
   118         * Sets the ringing volume.
       
   119         * @since 3.1
       
   120         * @param aRingingVolume The new value for ringing volume.
       
   121         * @return KErrNone if succesful, KErrAccessDenied if ringing volume
       
   122         *         setting of this profile is read-only.
       
   123         */
       
   124         TInt SetRingingVolume(
       
   125                 TProfileRingingVolume aRingingVolume );
       
   126 
       
   127         /**
       
   128         * Sets the state of vibrating alert setting.
       
   129         * @since 3.1
       
   130         * @param aVibratingAlert The new state for the vibrating alert setting.
       
   131         * @return KErrNone if succesful, KErrAccessDenied if vibrating alert
       
   132         *         setting of this profile is read-only.
       
   133         */
       
   134         TInt SetVibratingAlert( TBool aVibratingAlert );
       
   135 
       
   136         /**
       
   137         * Sets the state of warning and game tones setting.
       
   138         * @since 3.1
       
   139         * @param aWarningAndGameTones The new state for Warning and Game tones
       
   140         * setting.
       
   141         * @return KErrNone if succesful, KErrAccessDenied if warning and game
       
   142         *         tones setting of this profile is read-only.
       
   143         */
       
   144         TInt SetWarningAndGameTones( TBool aWarningAndGameTones );
       
   145 
       
   146         /**
       
   147         * Sets the state of text-to-speech setting.
       
   148         * @since 3.1
       
   149         * @param aTextToSpeech The new state for text-to-speech setting.
       
   150         * @return KErrNone if succesful, KErrAccessDenied if text-to-speech
       
   151         *         setting of this profile is read-only.
       
   152         */
       
   153         TInt SetTextToSpeech( TBool aTextToSpeech );
       
   154 
       
   155 
       
   156     private:
       
   157 
       
   158         /**
       
   159          * C++ default constructor.
       
   160          */
       
   161         CProEngToneSettingsImpl(
       
   162                 TProfileToneSettings& aToneSettings,
       
   163                 TUint32 aModifiableFlags );
       
   164 
       
   165         /**
       
   166         * By default Symbian 2nd phase constructor is private.
       
   167         */
       
   168         void ConstructL();
       
   169 
       
   170     private:    // Data
       
   171 
       
   172         // The real implementation of the profile tone settings
       
   173         TProfileToneSettings& iToneSettings;
       
   174 
       
   175         // Flags to check is modification allowed:
       
   176         TUint32 iModifiableFlags;
       
   177     };
       
   178 
       
   179 #endif      //  CPROENGTONESETTINGSIMPL_H
       
   180 
       
   181 // End of File
       
   182