diff -r 000000000000 -r 08ec8eefde2f traceservices/tracefw/ulogger/src/pluginframework/inputframework.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/traceservices/tracefw/ulogger/src/pluginframework/inputframework.h Fri Jan 22 11:06:30 2010 +0200 @@ -0,0 +1,84 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// ULogger Input Framework header file +// +// + +/** + @file + @internalTechnology + @prototype +*/ + +#ifndef CINPUTFRAMEWORK_H_ +#define CINPUTFRAMEWORK_H_ + +#include +#include "uloggerinputplugin.h" +#include "inputdata.h" +#include "uloggershared.h" +#include "uloggercommands.h" + + +namespace Ulogger +{ + +/** +*/ +class MInputFrameworkObserver + { + public: + virtual ControlData* ProcessCommandL(TCommand aOpCode, RArray &aArguments) = 0; + virtual void DoPostProcessing(TCommand aCmd) = 0; + }; + + +/** +*/ +class CInputFramework : public CActive, public MCommandImpl + { + friend class CUloggerServerTest4Step; //only for test purposes + public: + IMPORT_C static CInputFramework* NewL(MInputPlugin *aInputPlugin, const RPointerArray& aInputSettings, MInputFrameworkObserver *aObserver); + IMPORT_C static CInputFramework* NewLC(MInputPlugin *aInputPlugin, const RPointerArray& aInputSettings, MInputFrameworkObserver *aObserver); + IMPORT_C virtual ~CInputFramework(); + IMPORT_C TInt StartReading(); + IMPORT_C void StopReading(); + + public: //from MCommandImpl + IMPORT_C TInt DoCommandL(TCommand aCommand, const RArray& aValues); + + protected: //from CActive + void DoCancel(); + void RunL(); + + private: + CInputFramework(MInputPlugin *aInputPlugin, MInputFrameworkObserver *aObserver); + void ConstructL(const RPointerArray& aInputSettings); + + private://data + CInputData* iInputData; + RPointerArray iInputSettings; + MInputPlugin *iInputPlugin; + RBuf8 iControlData; + HBufC8* iData; + TPtr8 iDataPtr; + TBool iContinueReading; + MInputFrameworkObserver* iObserver; + CCommand* iCommand; + }; + +} + +#endif /*CINPUTFRAMEWORK_H_*/