usbmgmt/usbmgr/host/fdf/production/server/inc/activewaitforecomevent.h
changeset 0 c9bc50fca66e
child 29 59aa7d6e3e0f
equal deleted inserted replaced
-1:000000000000 0:c9bc50fca66e
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef ACTIVEWAITFORECOMEVENT_H
       
    19 #define ACTIVEWAITFORECOMEVENT_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <ecom/ecom.h>
       
    23 
       
    24 NONSHARABLE_CLASS(MEComEventObserver)
       
    25 	{
       
    26 public:
       
    27 	virtual void EComEventReceived() = 0;
       
    28 	};
       
    29 
       
    30 NONSHARABLE_CLASS(CActiveWaitForEComEvent) : public CActive
       
    31 	{
       
    32 public:
       
    33 	static CActiveWaitForEComEvent* NewL(MEComEventObserver& aObserver);
       
    34 	~CActiveWaitForEComEvent();
       
    35 
       
    36 public:
       
    37 	void Wait();
       
    38 
       
    39 private:
       
    40 	void ConstructL();
       
    41 	CActiveWaitForEComEvent(MEComEventObserver& aObserver);
       
    42 
       
    43 private: // from CActive
       
    44 	void RunL();
       
    45 	void DoCancel();
       
    46 	TInt RunError(TInt aError);	
       
    47 
       
    48 private: 
       
    49 	REComSession 		iEComSession;
       
    50 	MEComEventObserver& iObserver; 
       
    51 	};
       
    52 
       
    53 #endif // ACTIVEWAITFORECOMEVENT_H