vtengines/videoteleng/Inc/Session/MVtEngDtmfHandler.h
changeset 0 ed9695c8bcbe
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     1 /*
       
     2 * Copyright (c) 2004 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:  DTMF handler interface for DTMF states and media 
       
    15 *                handler to use.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MVTENGDTMFHANDLER_H
       
    22 #define MVTENGDTMFHANDLER_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32std.h>
       
    26 
       
    27 // DATA TYPES
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CVtEngOperation;
       
    31 class TVtEngDtmfTone;
       
    32 class MVTUserInput;
       
    33 class CVtEngDtmfState;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 *  Base class for data types
       
    39 *
       
    40 *  @lib videoteleng
       
    41 *  @since 2.6
       
    42 */
       
    43 class MVtEngDtmfHandler
       
    44     {
       
    45     public: // 
       
    46         /**
       
    47         * Dtmf states
       
    48         */
       
    49         enum TVtEngDtmfState 
       
    50             {
       
    51             // Not sending DTMF
       
    52             EVtDtmfStateIdle = 0,
       
    53             // Sending DTMF
       
    54             EVtDtmfStateSending,
       
    55             // Sending DTMF, another waiting in buffer
       
    56             EVtDtmfStateBuffered
       
    57             };
       
    58 
       
    59     public:
       
    60 
       
    61         /**
       
    62         * Handles a DTMF command.
       
    63         * @param 
       
    64         */
       
    65         virtual void HandleL( CVtEngOperation& aOp ) = 0;
       
    66 
       
    67         /**
       
    68         * Activates a DTMF state.
       
    69         * @param aNewState state index
       
    70         * @return activated state
       
    71         */
       
    72         virtual CVtEngDtmfState& ActivateState( 
       
    73             MVtEngDtmfHandler::TVtEngDtmfState aNewState ) = 0;
       
    74 
       
    75         /**
       
    76         * Handles completion of DTMF sending, non-leavable method.
       
    77         * @param aError Symbian OS error code
       
    78         */
       
    79         virtual void SendComplete( TInt aError ) = 0;
       
    80 
       
    81         /**
       
    82         * Returns new instance used for sending DTMF tone to protocol 
       
    83         * @param aTone tone to send
       
    84         * @return protocol DTMF tone.
       
    85         */
       
    86         virtual MVTUserInput& ReserveProtoDtmfL(
       
    87             const TVtEngDtmfTone& aTone  ) = 0;
       
    88 
       
    89         /**
       
    90         * Releses protocol DTMF instance.
       
    91         */
       
    92         virtual void ReleaseProtoDtmf() = 0;
       
    93 
       
    94 		/**
       
    95         * Compares last issued DTMF command ID to given command ID.
       
    96         * @param aCheckCommandId command ID to be compared against
       
    97         * @return ETrue if IDs are same, otherwise EFalse
       
    98         */
       
    99 		virtual TBool CheckCommandId( TInt aCheckCommandId ) const = 0 ;
       
   100 
       
   101 		/**
       
   102         * Stores command ID, used in CheckCommandID.
       
   103         * @param aStoreCommandId command ID to be stored.        
       
   104         */
       
   105 		virtual void StoreCommandId( TInt aStoreCommandId ) = 0;
       
   106     };
       
   107 
       
   108 #endif      MVTENGDTMFHANDLER_H
       
   109 
       
   110 // End of File