vtuis/videotelui/inc/mvtuistatecontext.h
changeset 0 ed9695c8bcbe
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     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:  Interface for state objects to request application services.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef M_MVTUISTATECONTEXT_H
       
    20 #define M_MVTUISTATECONTEXT_H
       
    21 
       
    22 #include <e32def.h> 
       
    23 #include <vtengcommands.h>
       
    24 #include "mvtuishutterobserver.h"
       
    25 
       
    26 class TVtUiAppStateBase;
       
    27 class CVtEngModel;
       
    28 class MVtUiNumberSource;
       
    29 class TVtUiVideoTelephonyVariation;
       
    30 
       
    31 /**
       
    32 * Provides service interface for application state objects.
       
    33 *
       
    34 * @since S60 v3.2
       
    35 */
       
    36 class MVtUiStateContext : public MVtUiShutterObserver
       
    37     {
       
    38     public:
       
    39                 
       
    40         /**
       
    41         * Starts first phase of startup when prepare is received.
       
    42         */
       
    43         virtual void StartupPhase1L() = 0;
       
    44         
       
    45         /**
       
    46         * Starts application shutdown.
       
    47         */
       
    48         virtual void ShutdownL() = 0;
       
    49         
       
    50         /**
       
    51         * Starts second phase of startup.
       
    52         */
       
    53         virtual void StartupPhase2L() = 0;
       
    54         
       
    55         /**
       
    56         * Sets application to foreground and background.            
       
    57         * @param aForeground ETrue => foreground, EFalse => background
       
    58         */
       
    59         virtual void ChangeApplicationFocus( const TBool aForeground ) = 0;
       
    60         
       
    61         /**
       
    62         * Changes current application state.
       
    63         * @param aState new state
       
    64         */
       
    65         virtual void ChangeState( TVtUiAppStateBase* aState ) = 0;
       
    66         
       
    67         /**
       
    68         * Starts DTMF tone.
       
    69         * @param aTone DTMF tone.
       
    70         */
       
    71         virtual void StartDtmfTone( const TChar& aTone ) = 0;
       
    72         
       
    73         /**
       
    74         * Stops tarts DTMF tone.
       
    75         */
       
    76         virtual void StopDtmfTone() = 0;
       
    77         
       
    78         /**
       
    79         * Returns model.
       
    80         * @return model
       
    81         */
       
    82         virtual CVtEngModel& Model() = 0;
       
    83                         
       
    84         /**
       
    85         * Returns video telephony variation.
       
    86         * @return variation
       
    87         */
       
    88         virtual const TVtUiVideoTelephonyVariation& 
       
    89             VideoTelephonyVariation() const = 0;
       
    90         /**
       
    91         * Returns source containing numbers typed by the user.
       
    92         * @return number soure
       
    93         */
       
    94         virtual MVtUiNumberSource* NumberSource() const = 0;
       
    95         
       
    96         /**
       
    97         * Executes engine command.
       
    98         * @param aCommand command id
       
    99         * @param aParams command params
       
   100         */
       
   101         virtual void DoExecuteCmdL( const TVtEngCommandId aCommand,
       
   102                 TDesC8* aParams ) = 0;
       
   103         
       
   104         /**
       
   105         * Refreshes application UI.
       
   106         * @param aRefreshFlags identifies what to refresh
       
   107         */
       
   108         virtual void RefreshL( const TInt aRefreshFlags ) = 0;          
       
   109         
       
   110         /**
       
   111         * Updates engine states.
       
   112         */
       
   113         virtual void  RefreshStatesL() = 0;
       
   114 
       
   115         /**
       
   116         * Handles layout change.
       
   117         */
       
   118         virtual void DoHandleLayoutChangedL() = 0;
       
   119 
       
   120         /**
       
   121         * Sets call id.
       
   122         */
       
   123         virtual void SetCallIdL( const TInt aCallId ) = 0;
       
   124         
       
   125         /**
       
   126         * Sets display text of remote end.
       
   127         */
       
   128         virtual TBool SetCallNameL( const TDesC& aName ) = 0;
       
   129         
       
   130         /**
       
   131 
       
   132         
       
   133         /**
       
   134         * Refresh flags
       
   135         */        
       
   136         enum TRefreshFlags
       
   137             {
       
   138             /** Navipane is refreshed */
       
   139             ENaviPane       = 0x01,
       
   140             /** Softkeys are refreshed */
       
   141             ESoftkeys       = 0x02,
       
   142             /** Refreshes blind (video availability) status */
       
   143             EBlind          = 0x04,
       
   144             /** Refreshes state sync with call handling */
       
   145             ESynchronise    = 0x08,
       
   146             /** Refreshes internal states (media etc) */
       
   147             EUiStates       = 0x10,
       
   148             /** Refreshes everything */
       
   149             EAll            = ENaviPane | 
       
   150                               ESoftkeys | 
       
   151                               EBlind | 
       
   152                               ESynchronise | 
       
   153                               EUiStates
       
   154             };
       
   155     };
       
   156 
       
   157     
       
   158 #endif // M_MVTUISTATECONTEXT_H