os/graphics/windowing/windowserver/test/tauto/eventdd.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/graphics/windowing/windowserver/test/tauto/eventdd.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,75 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __EVENTDD_H__
    1.20 +#define __EVENTDD_H__
    1.21 +
    1.22 +#ifndef __E32cmn_H__
    1.23 +#include <e32cmn.h>
    1.24 +#endif
    1.25 +
    1.26 +_LIT(KName,"EventDD");
    1.27 +
    1.28 +
    1.29 +class REventDD : public RBusLogicalChannel
    1.30 +	{
    1.31 +	friend class DEventDD;
    1.32 +public:
    1.33 +	/**
    1.34 +	Structure for holding driver capabilities information
    1.35 +	(Just a version number in this example.)
    1.36 +	*/
    1.37 +	class TCaps
    1.38 +		{
    1.39 +	public:
    1.40 +		TVersion iVersion;
    1.41 +		};
    1.42 +
    1.43 +public:
    1.44 +	inline static const TDesC& BinaryName();
    1.45 +	inline static const TDesC& DriverName();
    1.46 +	inline static TVersion VersionRequired();
    1.47 +	inline TInt Open();
    1.48 +	inline TInt SendEvent(TRawEvent& aEvent);
    1.49 +private:
    1.50 +	enum TControl
    1.51 +		{
    1.52 +		ESendEvent
    1.53 +		};
    1.54 +	};
    1.55 +
    1.56 +
    1.57 +inline const TDesC& REventDD::BinaryName()
    1.58 +	{
    1.59 +	return KName;
    1.60 +	}
    1.61 +inline const TDesC& REventDD::DriverName()
    1.62 +	{
    1.63 +	return KName;
    1.64 +	}
    1.65 +inline TVersion REventDD::VersionRequired()
    1.66 +	{
    1.67 +	return TVersion(1,0,0);
    1.68 +	}
    1.69 +inline TInt REventDD::Open()
    1.70 +	{
    1.71 +	return DoCreate(DriverName(),VersionRequired(),KNullUnit,NULL,NULL,EOwnerThread);
    1.72 +	}
    1.73 +inline TInt REventDD::SendEvent(TRawEvent& aEvent)
    1.74 +	{
    1.75 +	return DoControl(ESendEvent,static_cast<TAny*>(&aEvent));
    1.76 +	}
    1.77 +
    1.78 +#endif	//__EVENTDD_H__