vtengines/videoteleng/Inc/Base/cvtengmdtrmessagelistener.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:  Listener class for mediator commands
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_VTENGMDTRMESSAGELISTENER_H
       
    20 #define C_VTENGMDTRMESSAGELISTENER_H
       
    21 
       
    22 //  INCLUDES
       
    23 
       
    24 //#include <e32cmn.h>
       
    25 #include <mediatorcommandresponder.h>
       
    26 #include <mediatoreventconsumer.h>
       
    27 #include "MVtEngEventObserver.h"
       
    28 #include  "CVtEngStateManager.h"
       
    29 #include  "MVtEngSessionInfo.h"
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CMediatorCommandResponder;
       
    33 class CVtEngUtility;
       
    34 
       
    35 // CLASS DECLARATION
       
    36 
       
    37 /**
       
    38 *  Mediator command and event listener 
       
    39 *
       
    40 *  @lib videoteleng
       
    41 *  @since 5.0
       
    42 */
       
    43 NONSHARABLE_CLASS( CVtEngMdtrMessageListener ) : 
       
    44     public CBase, 
       
    45     private MMediatorCommandObserver,
       
    46     private MMediatorEventObserver,
       
    47     private MVtEngEventObserver
       
    48     
       
    49     {
       
    50 public: // constructor and destructors
       
    51 
       
    52     /**
       
    53     * two-phase constructor
       
    54     */
       
    55     static CVtEngMdtrMessageListener* NewL( CVtEngUtility& aUtils );
       
    56     
       
    57     // Destructor
       
    58     ~CVtEngMdtrMessageListener();
       
    59 
       
    60 public: // from MMediatorCommandObserver
       
    61 
       
    62     virtual void MediatorCommandL( TUid aDomain,
       
    63          TUid aCategory, 
       
    64          TInt aCommandId,
       
    65          TVersion aVersion, 
       
    66          const TDesC8& aData );
       
    67 
       
    68     virtual void CancelMediatorCommand( TUid aDomain,
       
    69          TUid aCategory, 
       
    70          TInt aCommandId );
       
    71 
       
    72 public: // from MMediatorEventObserver
       
    73 
       
    74     virtual void MediatorEventL( TUid aDomain,
       
    75         TUid aCategory, 
       
    76         TInt aEventId, 
       
    77         const TDesC8& aData );       
       
    78             
       
    79 public: // from MVtEngEventObserver
       
    80 
       
    81     // handles deferred CLI event dispatching
       
    82     virtual void HandleVtEventL( TInt aEvent );
       
    83                                   
       
    84 private: // constructors
       
    85 
       
    86     CVtEngMdtrMessageListener( CVtEngUtility& aUtils );
       
    87     
       
    88     void ConstructL();
       
    89 
       
    90 private: // new functions
       
    91 
       
    92     void HandleCLIEventL( const TDesC8& aData );
       
    93     
       
    94     TBool IsReadyForCLIEvent() const;
       
    95     
       
    96 private:    
       
    97     CVtEngUtility& iUtils;
       
    98     
       
    99     // for mediator command reception
       
   100     CMediatorCommandResponder* iMediatorResponder;  
       
   101     
       
   102     CMediatorEventConsumer* iMediatorEvents;
       
   103     
       
   104     // supported mediator commands
       
   105     MediatorService::RCommandList iCommandList;
       
   106     };
       
   107 
       
   108 #endif // C_VTENGMDTRMESSAGELISTENER_H
       
   109 
       
   110 // End of File