sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #if !defined(__DriveZ_PLUGIN_H__) sl@0: #define __DriveZ_PLUGIN_H__ sl@0: sl@0: #include sl@0: sl@0: #define _LOG(a) {if(iLogging) RDebug::Print(a);} sl@0: #define _LOG2(a,b) {if(iLogging) RDebug::Print(a,b);} sl@0: #define _LOG3(a,b,c) {if(iLogging) RDebug::Print(a,b,c);} sl@0: #define _LOG4(a,b,c,d) {if(iLogging) RDebug::Print(a,b,c,d);} sl@0: #define _LOG5(a,b,c,d,e) {if(iLogging) RDebug::Print(a,b,c,d,e);} sl@0: sl@0: const TInt KDriveZPos = 0x30000001; sl@0: sl@0: _LIT(KDriveZPluginFileName,"DriveZ_plugin"); sl@0: _LIT(KDriveZPluginName,"DriveZPlugin"); sl@0: sl@0: class CDriveZPlugin : public CFsPlugin sl@0: { sl@0: sl@0: public: sl@0: static CDriveZPlugin* NewL(); sl@0: ~CDriveZPlugin(); sl@0: sl@0: virtual void InitialiseL(); sl@0: virtual TInt DoRequestL(TFsPluginRequest& aRequest); sl@0: sl@0: TInt FsPluginDoControlL(CFsPluginConnRequest& aRequest); sl@0: sl@0: protected: sl@0: CFsPluginConn* NewPluginConnL(); sl@0: sl@0: private: sl@0: CDriveZPlugin(); sl@0: void ConstructL(); sl@0: sl@0: void EnableInterceptsL(); sl@0: void DisableInterceptsL(); sl@0: sl@0: private: sl@0: RFs iFs; sl@0: TBool iInterceptsEnabled; sl@0: TBool iLogging; sl@0: TInt iLastError; sl@0: TInt iLineNumber; sl@0: }; sl@0: sl@0: sl@0: class CDriveZPluginConn : public CFsPluginConn sl@0: { sl@0: virtual TInt DoControl(CFsPluginConnRequest& aRequest); sl@0: virtual void DoRequest(CFsPluginConnRequest& aRequest); sl@0: virtual void DoCancel(TInt aReqMask); sl@0: }; sl@0: sl@0: #endif