vtuis/videotelui/inc/features/volume/cvtuivolumepopup.h
branchRCL_3
changeset 24 f15ac8e65a02
parent 23 890b5dd735f8
child 25 779871d1e4f4
equal deleted inserted replaced
23:890b5dd735f8 24:f15ac8e65a02
     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:  Volume popup definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_VTUIVOLUMEPOPUP_H
       
    20 #define C_VTUIVOLUMEPOPUP_H
       
    21 
       
    22 #include "tvtuicomponentstate.h"
       
    23 #include "cvtuipopupbase.h"
       
    24 #include "mvtengaudio.h"
       
    25 
       
    26 class CVtUiFeatureManager;
       
    27 class CVtEngModel;
       
    28 
       
    29 /**
       
    30 *  CVtUiVolumePopup
       
    31 *
       
    32 *  Volume popup definition.
       
    33 *
       
    34 *  @since S60 v3.2
       
    35 */
       
    36 class CVtUiVolumePopup : public CVtUiPopupBase
       
    37     {
       
    38 
       
    39 public:
       
    40 
       
    41     /**
       
    42     * Static constructor
       
    43     * @param aFeatureManager Reference to feature manager.
       
    44     */
       
    45     static CVtUiVolumePopup* NewL( CVtUiFeatureManager& aFeatureManager );
       
    46 
       
    47     /**
       
    48     * Destructor
       
    49     */
       
    50     ~CVtUiVolumePopup();
       
    51 
       
    52     /**
       
    53     * Refresh volume popup status.
       
    54     */
       
    55     void RefreshL();
       
    56 
       
    57     /**
       
    58     * Update volume popup and audio routing
       
    59     */
       
    60     void UpdateVolumeAndRoutingL();
       
    61 
       
    62 private: // from base class
       
    63 
       
    64     /**
       
    65     * @see CVtUiPopupBase::DoActivateL
       
    66     */
       
    67     void DoActivateL();
       
    68 
       
    69     /**
       
    70     * @see CVtUiPopupBase::OfferKeyEventL
       
    71     */
       
    72     TKeyResponse OfferKeyEventL( const TKeyEvent& aEvent,
       
    73         TEventCode aCode );
       
    74 
       
    75     /**
       
    76     * @see CVtUiPopupBase::HandleControlEventL
       
    77     */
       
    78     void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType );
       
    79 
       
    80 private:
       
    81 
       
    82     /**
       
    83      * Constructor
       
    84      */
       
    85     CVtUiVolumePopup( CVtUiFeatureManager& aFeatureManager );
       
    86 
       
    87     /*
       
    88     * 2nd constructor
       
    89     */
       
    90     void ConstructL();
       
    91 
       
    92     /**
       
    93     * Returns current output volume for given routing.
       
    94     */
       
    95     TInt OutputVolume( MVtEngAudio::TAudioRoutingState aRouting ) const;
       
    96         
       
    97     /**
       
    98     * Updates volume 
       
    99     */   
       
   100     void UpdateVolumeL();        
       
   101 
       
   102 private:
       
   103 
       
   104     // Engine model
       
   105     CVtEngModel& iModel;
       
   106 
       
   107     // Stored audio routing state.
       
   108     MVtEngAudio::TAudioRoutingState iAudioRouting;
       
   109 
       
   110     // Stored volume
       
   111     TInt iVolume;
       
   112     
       
   113     // Reference to feature manager
       
   114     CVtUiFeatureManager& iFeatureManager;
       
   115 
       
   116     };
       
   117 
       
   118 #endif // C_VTUIVOLUMEPOPUP_H