applayerprotocols/httptransportfw/Test/T_HttpIntegration/CWspEventDispatcher.h
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __CWSPEVENTDISPATCHER_H__
       
    17 #define __CWSPEVENTDISPATCHER_H__
       
    18 
       
    19 #include "MTimeoutCallback.h"
       
    20 #include "MWspEventCallback.h"
       
    21 
       
    22 class MWspEventCallback;
       
    23 class CTimeoutTimer;
       
    24 
       
    25 #include <http.h>
       
    26 
       
    27 //-----------------------------------------------------------------------------
       
    28 
       
    29 class CWspEventDispatcher : public CActive, public MTimeoutCallback
       
    30 	{
       
    31 public:	// Methods
       
    32 
       
    33 	static CWspEventDispatcher* NewL(MWspEventCallback& aCallback);
       
    34 
       
    35 	~CWspEventDispatcher();
       
    36 
       
    37 	void WaitForWspEvent(TInt aTimeoutValueSeconds);
       
    38 	void WaitForWspEvent();
       
    39 
       
    40 	void CancelWait();
       
    41 
       
    42 private:	// Methods from CActive
       
    43 
       
    44 	virtual void RunL();
       
    45 
       
    46 	virtual void DoCancel();
       
    47 
       
    48 private:	// Methods from MTimeoutCallback
       
    49 
       
    50 	virtual void Timeout();
       
    51 
       
    52 private:	// Methods
       
    53 
       
    54 	CWspEventDispatcher(MWspEventCallback& aCallback);
       
    55 
       
    56 	void ConstructL();
       
    57 
       
    58 private:	// Attributes
       
    59 
       
    60 	MWspEventCallback&			iCallback;
       
    61 
       
    62 	CTimeoutTimer*				iTimer;
       
    63 
       
    64 	TInt						iEvent;
       
    65 			
       
    66 	RHTTPTransaction *iTransaction;
       
    67 
       
    68 	};
       
    69 #endif	// __CWSPEVENTDISPATCHER_H__