os/kernelhwsrv/kerneltest/f32test/plugins/version_2/inc/combinational2_plugin.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kerneltest/f32test/plugins/version_2/inc/combinational2_plugin.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,76 @@
     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 the License "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 +#if !defined(__Combinational2_PLUGIN_H__)
    1.20 +#define __Combinational2_PLUGIN_H__
    1.21 +
    1.22 +#include <f32plugin.h>
    1.23 +
    1.24 +#define _LOG(a) {if(iLogging) RDebug::Print(a);}
    1.25 +#define _LOG2(a,b) {if(iLogging) RDebug::Print(a,b);}
    1.26 +#define _LOG3(a,b,c) {if(iLogging) RDebug::Print(a,b,c);}
    1.27 +#define _LOG4(a,b,c,d) {if(iLogging) RDebug::Print(a,b,c,d);}
    1.28 +#define _LOG5(a,b,c,d,e) {if(iLogging) RDebug::Print(a,b,c,d,e);}
    1.29 +
    1.30 +const TInt KCombinational2Pos = 0x40000002;
    1.31 +
    1.32 +_LIT(KCombinational2PluginFileName,"Combinational2_plugin");
    1.33 +_LIT(KCombinational2PluginName,"Combinational2Plugin");
    1.34 +
    1.35 +class CCombinational2Plugin : public CFsPlugin
    1.36 +{
    1.37 +
    1.38 +public:
    1.39 +	static CCombinational2Plugin* NewL();
    1.40 +	~CCombinational2Plugin();
    1.41 +
    1.42 +	virtual void InitialiseL();
    1.43 +	virtual TInt DoRequestL(TFsPluginRequest& aRequest);
    1.44 +	
    1.45 +	TInt DoFileRead(TFsPluginRequest& aRequest);
    1.46 +	TInt DoFileWrite(TFsPluginRequest& aRequest);
    1.47 +	TInt DoFileOpen(TFsPluginRequest& aRequest);
    1.48 +	TInt DoFileReplace(TFsPluginRequest& aRequest);
    1.49 +	TInt DoFileSubClose(TFsPluginRequest& aRequest);
    1.50 +	TInt DoEntry(TFsPluginRequest& aRequest);
    1.51 +
    1.52 +	TInt FsPluginDoControlL(CFsPluginConnRequest& aRequest);
    1.53 +
    1.54 +protected:
    1.55 +	CFsPluginConn* NewPluginConnL();
    1.56 +
    1.57 +private:
    1.58 +	CCombinational2Plugin();
    1.59 +	void ConstructL();
    1.60 +
    1.61 +	void EnableInterceptsL();
    1.62 +	void DisableInterceptsL();
    1.63 +
    1.64 +private:
    1.65 +	TBool iInterceptsEnabled;
    1.66 +	TBool iLogging;
    1.67 +	TInt filesOpen;
    1.68 +	TInt iLastError;
    1.69 +	TInt iLineNumber;
    1.70 +};
    1.71 +
    1.72 +
    1.73 +class CCombinational2PluginConn : public CFsPluginConn
    1.74 +	{
    1.75 +	virtual TInt DoControl(CFsPluginConnRequest& aRequest);
    1.76 +	virtual void DoRequest(CFsPluginConnRequest& aRequest);
    1.77 +	virtual void DoCancel(TInt aReqMask);
    1.78 +	};
    1.79 +#endif