kerneltest/f32test/server/t_notify_plugin.h
changeset 0 a41df078684a
equal deleted inserted replaced
-1:000000000000 0:a41df078684a
       
     1 // Copyright (c) 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 // f32test\server\t_notify_plugin.h
       
    15 // 
       
    16 //
       
    17 
       
    18 #if !defined(__Notify_PLUGIN_H__)
       
    19 #define __Notify_PLUGIN_H__
       
    20 
       
    21 #include <f32plugin.h>
       
    22 
       
    23 #define _LOG(a) {if(iLogging) RDebug::Print(a);}
       
    24 #define _LOG2(a,b) {if(iLogging) RDebug::Print(a,b);}
       
    25 #define _LOG3(a,b,c) {if(iLogging) RDebug::Print(a,b,c);}
       
    26 #define _LOG4(a,b,c,d) {if(iLogging) RDebug::Print(a,b,c,d);}
       
    27 #define _LOG5(a,b,c,d,e) {if(iLogging) RDebug::Print(a,b,c,d,e);}
       
    28 
       
    29 const TInt KNotifyPos = 0x2FFFFFFF;
       
    30 const TInt KPluginSetDrive = -112233;
       
    31 
       
    32 _LIT(KNotifyPluginFileName,"t_notify_plugin");
       
    33 _LIT(KNotifyPluginName,"NotifyPlugin");
       
    34 
       
    35 class CNotifyPlugin : public CFsPlugin
       
    36 {
       
    37 
       
    38 public:
       
    39 	static CNotifyPlugin* NewL();
       
    40 	~CNotifyPlugin();
       
    41 
       
    42 	virtual void InitialiseL();
       
    43 	virtual TInt DoRequestL(TFsPluginRequest& aRequest);
       
    44 
       
    45 	TInt FsPluginDoControlL(CFsPluginConnRequest& aRequest);
       
    46 
       
    47 protected:
       
    48 	CFsPluginConn* NewPluginConnL();
       
    49 
       
    50 private:
       
    51 	CNotifyPlugin();
       
    52 	void ConstructL();
       
    53 
       
    54 	void EnableInterceptsL();
       
    55 	void DisableInterceptsL();
       
    56 
       
    57 private:
       
    58 	RFs iFs;
       
    59 	TBool iInterceptsEnabled;
       
    60 	TBool iLogging;
       
    61 };
       
    62 
       
    63 class CNotifyPluginConn : public CFsPluginConn
       
    64 	{
       
    65 	virtual TInt DoControl(CFsPluginConnRequest& aRequest);
       
    66 	virtual void DoRequest(CFsPluginConnRequest& aRequest);
       
    67 	virtual void DoCancel(TInt aReqMask);
       
    68 	};
       
    69 
       
    70 #endif