os/kernelhwsrv/kerneltest/f32test/plugins/version_2/inc/unremovable_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(__Unremovable_PLUGIN_H__)
    17 #define __Unremovable_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 KUnremovablePos = 0x2FFFFFFA;
    28 
    29 _LIT(KUnremovablePluginFileName,"Unremovable_plugin");
    30 _LIT(KUnremovablePluginName,"UnremovablePlugin");
    31 
    32 class CUnremovablePlugin : public CFsPlugin
    33 {
    34 
    35 public:
    36 	static CUnremovablePlugin* NewL();
    37 	~CUnremovablePlugin();
    38 
    39 	virtual void InitialiseL();
    40 	virtual TInt DoRequestL(TFsPluginRequest& aRequest);
    41 
    42 	TInt FsPluginDoControlL(CFsPluginConnRequest& aRequest);
    43 
    44 protected:
    45 	CFsPluginConn* NewPluginConnL();
    46 
    47 private:
    48 	CUnremovablePlugin();
    49 	void ConstructL();
    50 
    51 	void EnableInterceptsL();
    52 	void DisableInterceptsL();
    53 
    54 private:
    55 	RFs iFs;
    56 	TBool iInterceptsEnabled;
    57 	TBool iLogging;
    58 	TBool iRemovable;
    59 };
    60 
    61 class CUnremovablePluginConn : public CFsPluginConn
    62 	{
    63 	virtual TInt DoControl(CFsPluginConnRequest& aRequest);
    64 	virtual void DoRequest(CFsPluginConnRequest& aRequest);
    65 	virtual void DoCancel(TInt aReqMask);
    66 	};
    67 
    68 #endif