multimediacommsengine/tsrc/MMCTestDriver/MCETester/inc/CTcMCEFloorControlObserver.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2005 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:    See class definition below.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CTcMCEFloorControlObserver_H__
       
    21 #define __CTcMCEFloorControlObserver_H__
       
    22 
       
    23 
       
    24 // INCLUDES
       
    25 #include "MCEFCMsgObserver.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CTcMCEContext;
       
    29 class CTcMCEReceiveQueue;
       
    30 class CTcMCEReceived;	
       
    31 
       
    32 // CLASS DEFINITION
       
    33 /**
       
    34  * CTcMCEFloorControlObserver observes all events defined in 
       
    35  * MCE Floor Control API.
       
    36  */
       
    37 
       
    38 class CTcMCEFloorControlObserver
       
    39 	: public CBase,
       
    40 	  public MMceFcMsgObserver	  
       
    41 	{
       
    42 	
       
    43 	public:	// Constructors and destructor
       
    44 
       
    45 		/**
       
    46 		 * Static constructor.
       
    47 		 *
       
    48 		 * @param aContext Reference to test context object.
       
    49 		 * @return An initialized instance of this class.
       
    50 		 */
       
    51 		static CTcMCEFloorControlObserver* NewL( CTcMCEContext& aContext );
       
    52 
       
    53 		/// Destructor
       
    54 		~CTcMCEFloorControlObserver();
       
    55 
       
    56 	private:
       
    57 
       
    58 		/**
       
    59 		 * Constructor.
       
    60 		 *
       
    61 		 * @param aContext Reference to test context object.
       
    62 		 */
       
    63 		CTcMCEFloorControlObserver( CTcMCEContext& aContext );
       
    64 
       
    65 		/// Default constructor. Not implemented.
       
    66 		CTcMCEFloorControlObserver();
       
    67 
       
    68 		/// 2nd phase constructor
       
    69 		void ConstructL();
       
    70 
       
    71 	public: // new functions
       
    72 	
       
    73 		/**
       
    74 		 * Returns the first item off the Floor control receive queue (FIFO). 
       
    75 		 * If no items are present, the function will wait for aTimeout seconds
       
    76 		 * and then try fetching again.
       
    77 		 *
       
    78 		 * @param aTimeOut Time in seconds waited for items to arrive.
       
    79 		 */
       
    80 		CTcMCEReceived& ReceivedFCItemL( TInt aTimeout );
       
    81 
       
    82 	public:	// from MMceFcMsgObserver
       
    83 	
       
    84         void FCMsgReceived(CMceSession& aSession, HBufC8* aMessage);
       
    85 
       
    86         void FCMsgErrorOccurred(CMceSession& aSession, TInt aError);		
       
    87 
       
    88 	private: // owned data
       
    89 
       
    90 		CTcMCEReceiveQueue* iFCQueue;	    
       
    91 
       
    92 	private: // data
       
    93 
       
    94 		/// Reference to the test context. Not owned.
       
    95 		CTcMCEContext& iContext;
       
    96 		
       
    97 
       
    98 
       
    99 	};
       
   100 
       
   101 #endif // __CTcMCEFloorControlObserver_H__