os/kernelhwsrv/kerneltest/f32test/plugins/version_2/inc/stacked3_plugin.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #if !defined(__STACKED3_PLUGIN_H__)
    17 #define __STACKED3_PLUGIN_H__
    18 
    19 #include <f32plugin.h>
    20 
    21 #define _LOG(a) {if(iLogging) RDebug::Print(a);}
    22 #define _LOG2(a,b) {if(iLogging) RDebug::Print(a,b);}
    23 #define _LOG3(a,b,c) {if(iLogging) RDebug::Print(a,b,c);}
    24 #define _LOG4(a,b,c,d) {if(iLogging) RDebug::Print(a,b,c,d);}
    25 #define _LOG5(a,b,c,d,e) {if(iLogging) RDebug::Print(a,b,c,d,e);}
    26 
    27 const TInt KStacked3Pos = 0x50000002;
    28 _LIT(KStacked3PluginFileName,"stacked3_plugin");
    29 _LIT(KStacked3PluginName,"Stacked3Plugin");
    30 
    31 class CStacked3Plugin : public CFsPlugin
    32 {
    33 
    34 public:
    35 	static CStacked3Plugin* NewL();
    36 	~CStacked3Plugin();
    37 
    38 	virtual void InitialiseL();
    39 	virtual TInt DoRequestL(TFsPluginRequest& aRequest);
    40 
    41 	void FsPluginDoRequestL(CFsPluginConnRequest& aRequest);
    42 	TInt FsPluginDoControlL(CFsPluginConnRequest& aRequest);
    43 
    44 protected:
    45 	 CFsPluginConn* NewPluginConnL();
    46 
    47 private:
    48 	CStacked3Plugin();
    49 	void ConstructL();
    50 
    51 	// RFile intercepts
    52 	//void FsFileReadL(TFsPluginRequest& aRequest); missing?
    53 	void FsFileWriteL(TFsPluginRequest& aRequest);
    54 
    55 	void EnableInterceptsL();
    56 	void DisableInterceptsL();
    57 
    58 private:
    59 	TBool iInterceptsEnabled;
    60 	TBool iLogging;
    61 	TChar iDriveToTest;
    62 	TInt iLastError;
    63 	TInt iLineNumber;
    64 };
    65 
    66 class CStacked3PluginConn : public CFsPluginConn
    67 	{
    68 	virtual TInt DoControl(CFsPluginConnRequest& aRequest);
    69 	virtual void DoRequest(CFsPluginConnRequest& aRequest);
    70 	virtual void DoCancel(TInt aReqMask);
    71 	};
    72 
    73 #endif