vtuis/videotelui/inc/CVtUiNaviPane.h
changeset 0 ed9695c8bcbe
child 13 392fdfb57a78
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     1 /*
       
     2 * Copyright (c) 2004, 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:  Controller for navi pane for Video Telephone application.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CVTUINAVIPANE_H
       
    21 #define CVTUINAVIPANE_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include    <e32base.h>
       
    25 #include    <coedef.h>
       
    26 #include    <w32std.h>
       
    27 #include    <coecobs.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CAknNavigationControlContainer;
       
    31 class CAknNavigationDecorator;
       
    32 class CVtUiNaviPaneControl;
       
    33 class CVtUiAppUi;
       
    34 
       
    35 // CONSTANTS
       
    36 
       
    37 // Minimum volume.
       
    38 const TInt KVtUiVolumeMinimum = 0;
       
    39 
       
    40 // Maximum volume.
       
    41 const TInt KVtUiVolumeMaximum = 10;
       
    42 
       
    43 // CLASS DECLARATION
       
    44 
       
    45 /**
       
    46 *  Controller for navi pane for Video Telephone application.
       
    47 *
       
    48 *  @since Series 60 2.6
       
    49 */
       
    50 class CVtUiNaviPane : public CActive
       
    51     {
       
    52     public: // Constructors and destructor
       
    53 
       
    54         /**
       
    55         * Two-phased constructor.
       
    56         * @param aNaviPane reference to navipane.
       
    57         * @param aAppUi application UI.
       
    58         */
       
    59         static CVtUiNaviPane* NewL(
       
    60             CAknNavigationControlContainer& aNaviPane,
       
    61             CVtUiAppUi& aAppUi );
       
    62 
       
    63         /**
       
    64         * C++ destructor.
       
    65         */
       
    66         ~CVtUiNaviPane();
       
    67 
       
    68     public: // New functions
       
    69 
       
    70         /**
       
    71         * Updates current speaker.
       
    72         * @param aLoudspeaker Loudspeaker if ETrue, handset otherwise.
       
    73         */
       
    74         void SetCurrentSpeaker(
       
    75             const TBool aLoudspeaker );
       
    76 
       
    77         /**
       
    78         * Changes muted status.
       
    79         * @param aStatus status.
       
    80         */
       
    81         void SetMuted(
       
    82             const TBool aStatus );
       
    83 
       
    84         /**
       
    85         * Updates call duration.
       
    86         * @param aDuration current duration.
       
    87         * @param aEnabled ETrue if call duration enabled.
       
    88         */
       
    89         void SetCallDuration(
       
    90             const TTimeIntervalSeconds& aDuration,
       
    91             const TBool aEnabled );
       
    92 
       
    93         /**
       
    94         * Commits changes. This method should be called after above
       
    95         * Set* methods to make sure that display is up to date.
       
    96         */
       
    97         void CommitL();
       
    98 
       
    99         /**
       
   100         * Gets speaker volume.
       
   101         * @param aLoudspeaker ETrue if loudspeaker, EFalse if handset.
       
   102         * @param aValue it will be updated to contain volume of the speaker.
       
   103         */
       
   104         void GetSpeakerVolume(
       
   105             const TBool aLoudspeaker,
       
   106             TInt& aValue ) const;
       
   107 
       
   108         /**
       
   109         * Handles resource changes.
       
   110         * @param aType type of change.
       
   111         */
       
   112         void HandleResourceChange(
       
   113             TInt aType );
       
   114 
       
   115     protected: // From base classes
       
   116 
       
   117         /**
       
   118         * Called by CActive when operation needs to be canceled.
       
   119         */
       
   120         void DoCancel();
       
   121 
       
   122         /**
       
   123         * Called by CActiveScheduler when operation has been
       
   124         * finished.
       
   125         */
       
   126         void RunL();
       
   127 
       
   128     private:
       
   129 
       
   130         /**
       
   131         * C++ constructor.
       
   132         * @param aNaviPane navipane instance.
       
   133         * @param aAppUi application UI.
       
   134         */
       
   135         CVtUiNaviPane(
       
   136             CAknNavigationControlContainer& aNaviPane,
       
   137             CVtUiAppUi& aAppUi );
       
   138 
       
   139         /**
       
   140         * Symbian constructor.
       
   141         */
       
   142         void ConstructL();
       
   143 
       
   144         /**
       
   145         * Pushes indicators after timeout.
       
   146         */
       
   147         void PushAfterTimeout();
       
   148 
       
   149         /**
       
   150         * Pushes new decorator to navi pane replacing the
       
   151         * previous one.
       
   152         * @param aNew new to replace the old one.
       
   153         */
       
   154         void PushL( CAknNavigationDecorator* aNew );
       
   155 
       
   156         /**
       
   157         * Returns indicator that should be used currently.
       
   158         * @return indicator to be shown.
       
   159         */
       
   160         CAknNavigationDecorator* DefaultIndicator() const;
       
   161 
       
   162     private:
       
   163 
       
   164         // Slider types in navipane
       
   165         enum TSliderControlType
       
   166                 {
       
   167                 ENone,
       
   168                 EZoom,      // Zoom control visible
       
   169                 EVolume     // Volume control visible
       
   170                 };
       
   171 
       
   172 
       
   173         // Holds current slider type
       
   174         TSliderControlType iSliderType;
       
   175 
       
   176         // Ref to navi pane.
       
   177         CAknNavigationControlContainer& iNaviPane;
       
   178 
       
   179         // Ref to top navi pane element.
       
   180         CAknNavigationDecorator* iCurrent;
       
   181 
       
   182         // Owned controller for call duration
       
   183         CAknNavigationDecorator* iMainIndicators;
       
   184 
       
   185         // Reference to navi pane control.
       
   186         CVtUiNaviPaneControl* iNaviPaneControl;
       
   187 
       
   188         // Owned muted indicator.
       
   189         CAknNavigationDecorator* iMutedIndicator;
       
   190 
       
   191         // Owned timer instance.
       
   192         RTimer iTimer;
       
   193 
       
   194         // ETrue if call duration was enabled.
       
   195         TBool iOldCallDurationEnabled;
       
   196 
       
   197         // ETrue if call duration is enabled.
       
   198         TBool iCallDurationEnabled;
       
   199 
       
   200         // ETrue if loudspeaker, EFalse if handset.
       
   201         TBool iLoudspeaker;
       
   202 
       
   203         // Old microphone status.
       
   204         TBool iOldMicrophoneMuted;
       
   205 
       
   206         // ETrue if microphone is muted.
       
   207         TBool iMicrophoneMuted;
       
   208 
       
   209         // Reference to application UI.
       
   210         CVtUiAppUi& iAppUi;
       
   211     };
       
   212 
       
   213 #endif      // CVtUiNaviPane_H
       
   214 
       
   215 // End of File