multimediacommsengine/tsrc/MMCTestDriver/MCETester/inc/CTcMCEReceiveQueue.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 __CTcMCEReceiveQueue_H__
       
    21 #define __CTcMCEReceiveQueue_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <badesca.h>
       
    26 #include "MCEConstants.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CTcMCEContext;
       
    30 class CTcMCEReceived;
       
    31 
       
    32 // CLASS DEFINITION
       
    33 /**
       
    34  *
       
    35  */
       
    36 class CTcMCEReceiveQueue: public CBase
       
    37 	{
       
    38 	public:	// Constructors and destructor
       
    39 
       
    40 		static CTcMCEReceiveQueue* NewL( CTcMCEContext& aContext );
       
    41 
       
    42 		/// Destructor
       
    43 		~CTcMCEReceiveQueue();
       
    44 
       
    45 	public: // New methods
       
    46 		
       
    47 		void QueueReceivedL( CTcMCEReceived* aItem );
       
    48 		CTcMCEReceived& ReceivedItemL( TInt aTimeout );	
       
    49 
       
    50 	private:
       
    51 	
       
    52 		/// Default constructor
       
    53 		CTcMCEReceiveQueue( CTcMCEContext& aContext );
       
    54 		void ConstructL();
       
    55 
       
    56 		/**
       
    57 		 * CDeltaTimer callback. Called when the timer entry expires.
       
    58 		 *
       
    59 		 * @param aSelf Pointer to self
       
    60 		 * @return KErrNone
       
    61 		 */
       
    62 		static TInt ReceiveTimeout( TAny* aSelf );		
       
    63 		
       
    64 	private: // Owned data
       
    65 
       
    66 		/// Active scheduler wrapper for async waiting. Owned.
       
    67 		CActiveSchedulerWait iActiveWait;
       
    68 		
       
    69 		/// Array of received items. Owned.
       
    70 		CArrayFixSeg< TBuf8< KTcMaxObjectName > > iReceiveQueue;
       
    71 	
       
    72 		/// Timeout timer. Owned.
       
    73 		CDeltaTimer* iTimer;
       
    74 		
       
    75 		/// Timeout entry. Owned.
       
    76 		TDeltaTimerEntry iReceiveTimeout;
       
    77 
       
    78 	private: // Not owned data
       
    79 
       
    80 		/// Reference to the test context. Not owned.
       
    81 		CTcMCEContext& iContext;		
       
    82 
       
    83 
       
    84 	};
       
    85 
       
    86 #endif // __CTcMCEReceiveQueue_H__