vtengines/videoteleng/Inc/Base/cvtengmdtrcommandsender.h
changeset 0 ed9695c8bcbe
child 3 b1602a5ab0a3
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     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:  Sender class for mediator commands
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_VTENGMDTRCOMMANDSENDER_H
       
    20 #define C_VTENGMDTRCOMMANDSENDER_H
       
    21 
       
    22 //  INCLUDES
       
    23 
       
    24 #include <e32cmn.h>
       
    25 #include <mediatorcommandinitiator.h>
       
    26 #include "MVtEngEventObserver.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CVtEngUtility;
       
    30 class CVtEngOperation;
       
    31 class CVtEngMdtrCommandSender;
       
    32 class TVtMdtrStateIdle;
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  Mediator command sender 
       
    37 *
       
    38 *  @lib videoteleng
       
    39 *  @since 5.0
       
    40 */
       
    41 NONSHARABLE_CLASS( CVtEngMdtrCommandSender ) :
       
    42     public CBase, 
       
    43     public MMediatorCommandResponseObserver,
       
    44     public MVtEngEventObserver
       
    45     {
       
    46 public: // constructor and destructors
       
    47 
       
    48     /**
       
    49     * two-phase constructor
       
    50     */
       
    51     static CVtEngMdtrCommandSender* NewL( CVtEngUtility& aUtils );
       
    52     
       
    53     // Destructor
       
    54     ~CVtEngMdtrCommandSender();
       
    55 
       
    56 public: // new methods
       
    57 
       
    58     /**
       
    59      * Requests telephony to end video call
       
    60      */
       
    61     void EndCall();
       
    62 
       
    63     /**
       
    64      * Requests telephony to fallback to voice call 
       
    65      */
       
    66     void VoiceFallback();
       
    67     
       
    68     /**
       
    69      * Requests telephony to make voice call 
       
    70      */
       
    71     void SwitchToVoiceL( CVtEngOperation& aOperation );
       
    72     
       
    73     /**
       
    74      * Notifies telephony about outgoing audio state change
       
    75      */
       
    76     void NotifyOutgoingAudioState( const TBool aMicEnabled );
       
    77     
       
    78     void SetSenderState( TVtMdtrStateIdle& aNewState );
       
    79         
       
    80     
       
    81 public: // from MMediatorCommandResponseObserver
       
    82 
       
    83         // responses are not handled but required by mediator api
       
    84     virtual void CommandResponseL( TUid aDomain,
       
    85            TUid aCategory, 
       
    86            TInt aCommandId,
       
    87            TInt aStatus, 
       
    88            const TDesC8& aData );
       
    89 
       
    90 public: // from MVtEngEventObserver
       
    91 
       
    92     // handles event accordint to ongoing operation
       
    93     virtual void HandleVtEventL( TInt aEvent );
       
    94                          
       
    95 private: // constructors
       
    96 
       
    97     CVtEngMdtrCommandSender( CVtEngUtility& aUtils );
       
    98     
       
    99     void ConstructL();
       
   100 
       
   101 private:
       
   102     // for switch to voice operation, signaled when mediator command is issued.
       
   103     CVtEngOperation* iOperation;
       
   104         
       
   105     // for mediator command reception
       
   106     CMediatorCommandInitiator* iMediatorInitiator;
       
   107     
       
   108     CVtEngUtility& iUtils;
       
   109     
       
   110     TVtMdtrStateIdle* iSenderState;
       
   111     };
       
   112 
       
   113 #endif // C_VTENGMDTRCOMMANDSENDER_H
       
   114 
       
   115 // End of File