sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #ifndef __EVENTDD_H__ sl@0: #define __EVENTDD_H__ sl@0: sl@0: #ifndef __E32cmn_H__ sl@0: #include sl@0: #endif sl@0: sl@0: _LIT(KName,"EventDD"); sl@0: sl@0: sl@0: class REventDD : public RBusLogicalChannel sl@0: { sl@0: friend class DEventDD; sl@0: public: sl@0: /** sl@0: Structure for holding driver capabilities information sl@0: (Just a version number in this example.) sl@0: */ sl@0: class TCaps sl@0: { sl@0: public: sl@0: TVersion iVersion; sl@0: }; sl@0: sl@0: public: sl@0: inline static const TDesC& BinaryName(); sl@0: inline static const TDesC& DriverName(); sl@0: inline static TVersion VersionRequired(); sl@0: inline TInt Open(); sl@0: inline TInt SendEvent(TRawEvent& aEvent); sl@0: private: sl@0: enum TControl sl@0: { sl@0: ESendEvent sl@0: }; sl@0: }; sl@0: sl@0: sl@0: inline const TDesC& REventDD::BinaryName() sl@0: { sl@0: return KName; sl@0: } sl@0: inline const TDesC& REventDD::DriverName() sl@0: { sl@0: return KName; sl@0: } sl@0: inline TVersion REventDD::VersionRequired() sl@0: { sl@0: return TVersion(1,0,0); sl@0: } sl@0: inline TInt REventDD::Open() sl@0: { sl@0: return DoCreate(DriverName(),VersionRequired(),KNullUnit,NULL,NULL,EOwnerThread); sl@0: } sl@0: inline TInt REventDD::SendEvent(TRawEvent& aEvent) sl@0: { sl@0: return DoControl(ESendEvent,static_cast(&aEvent)); sl@0: } sl@0: sl@0: #endif //__EVENTDD_H__