vtuis/lcvtplugin/inc/base/mlcvtstatecontext.h
branchRCL_3
changeset 24 f15ac8e65a02
equal deleted inserted replaced
23:890b5dd735f8 24:f15ac8e65a02
       
     1 /*
       
     2 * Copyright (c) 2008 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_MLCVTSTATECONTEXT_H
       
    20 #define M_MLCVTSTATECONTEXT_H
       
    21 
       
    22 #include <e32def.h> 
       
    23 #include <vtengcommands.h>
       
    24 #include "mlcvtshutterobserver.h"
       
    25 
       
    26 class TLcVtStateBase;
       
    27 class CVtEngModel;
       
    28 
       
    29 /**
       
    30 * Provides service interface for vt plugin state objects.
       
    31 *
       
    32 * @since S60 v3.2
       
    33 */
       
    34 class MLcVtStateContext : public MLcVtShutterObserver
       
    35     {
       
    36     public:
       
    37                 
       
    38         /**
       
    39         * Starts first phase of startup when prepare is received.
       
    40         */
       
    41         virtual void StartupPhase1L() = 0;
       
    42         
       
    43         /**
       
    44         * Starts application shutdown.
       
    45         */
       
    46         virtual void ShutdownL() = 0;
       
    47         
       
    48         /**
       
    49         * Starts second phase of startup.
       
    50         */
       
    51         virtual void StartupPhase2L() = 0;
       
    52         
       
    53         /**
       
    54         * Sets application to foreground and background.            
       
    55         * @param aForeground ETrue => foreground, EFalse => background
       
    56         */
       
    57         virtual void ChangeApplicationFocus( const TBool aForeground ) = 0;
       
    58         
       
    59         /**
       
    60         * Changes current application state.
       
    61         * @param aState new state
       
    62         */
       
    63         virtual void ChangeState( TLcVtStateBase* aState ) = 0;
       
    64         
       
    65         /**
       
    66         * Starts DTMF tone.
       
    67         * @param aTone DTMF tone.
       
    68         */
       
    69         //virtual void StartDtmfTone( const TChar& aTone ) = 0;
       
    70         
       
    71         /**
       
    72         * Stops tarts DTMF tone.
       
    73         */
       
    74         //virtual void StopDtmfTone() = 0;
       
    75         
       
    76         /**
       
    77         * Returns model.
       
    78         * @return model
       
    79         */
       
    80         virtual CVtEngModel& Model() = 0;
       
    81                         
       
    82         /**
       
    83         * Returns source containing numbers typed by the user.
       
    84         * @return number soure
       
    85         */
       
    86         virtual TDesC* NumberSource() const = 0;
       
    87         
       
    88         /**
       
    89         * Executes engine command.
       
    90         * @param aCommand command id
       
    91         * @param aParams command params
       
    92         */
       
    93         virtual void DoExecuteCmdL( const TVtEngCommandId aCommand,
       
    94                 TDesC8* aParams ) = 0;
       
    95         
       
    96         /**
       
    97         * Refreshes application UI.
       
    98         * @param aRefreshFlags identifies what to refresh
       
    99         */
       
   100         virtual void RefreshL( const TInt aRefreshFlags ) = 0;          
       
   101         
       
   102         /**
       
   103         * Updates engine states.
       
   104         */
       
   105         virtual void  RefreshStatesL() = 0;
       
   106 
       
   107         /**
       
   108         * Handles layout change.
       
   109         */
       
   110         //virtual void DoHandleLayoutChangedL() = 0;
       
   111 
       
   112         /**
       
   113         * Sets call id.
       
   114         */
       
   115         virtual void SetCallIdL( const TInt aCallId ) = 0;
       
   116         
       
   117         /**
       
   118         * Sets display text of remote end.
       
   119         */
       
   120         virtual TBool SetCallNameL( const TDesC& aName ) = 0;
       
   121         
       
   122         /**
       
   123         * Sets call number text of remote end.
       
   124         */
       
   125         virtual void SetCallNumberL( const TDesC& aNumber ) = 0;
       
   126         
       
   127         /**
       
   128          * Start shutdown process
       
   129          */
       
   130         virtual void StartShutdown() = 0;
       
   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_MLCVTSTATECONTEXT_H