diff -r 000000000000 -r b497e44ab2fc terminalsecurity/SCP/SCPServer/inc/SCPPluginEventHandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/terminalsecurity/SCP/SCPServer/inc/SCPPluginEventHandler.h Thu Dec 17 09:07:52 2009 +0200 @@ -0,0 +1,133 @@ +/* +* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Implementation of terminalsecurity components +* +*/ + + +#ifndef SCPPLUGINEVENTHANDLER_H +#define SCPPLUGINEVENTHANDLER_H + +// INCLUDES +#include +#include +#include +#include + +#include "SCPPlugin.h" + + +// LOCAL CONSTANTS + +const TInt KSCPNotifierTimeout( 45000000 ); // 45 seconds + +_LIT( KSCPPluginConfigFilename, "plugincfg.bin" ); + +// FORWARD DECLARATIONS +class CSCPParamObject; + + +/** +* A base class for the active objects responsible for the lock phone functionality +*/ +class CSCPPluginEventHandler : public CBase, + public MSCPPluginEventHandler + + { + public: // Methods + + // Constructors and destructor + + /** + * Static constructor. + */ + static CSCPPluginEventHandler* NewL( RFs* aRfs ); + + /** + * Static constructor, that leaves the pointer to the cleanup stack. + */ + static CSCPPluginEventHandler* NewLC( RFs* aRfs ); + + /** + * Destructor. + */ + virtual ~CSCPPluginEventHandler(); + + /** + * Write the plugin configuration into persistent storage. + * @return A system status code. + */ + TInt WritePluginConfigurationL(); + + /** + * Reset the common storage for the plugins. + */ + void ResetConfigurationL(); + + // Methods from base classes + + // From MSCPPluginEventHandler + + /** + * Retrieve the stored parameter object pointer, which can be used to + * read/write the configuration for the plugin. + */ + CSCPParamObject& GetParameters(); + + /** + * Fetch the storage path of the server to aPath + */ + TInt GetStoragePathL( TDes& aPath ); + + /** + * Output the MD5 hash digest of the given buffer to aOutput + */ + TInt HashInput( TDes& aInput, TDes& aOutput ); + + /** + * Return a reference to the Event handler's File Server session + */ + virtual RFs& GetFsSession(); + + protected: // Methods + + + + private: //Methods + + // New Methods + + /** + * C++ default constructor. + */ + CSCPPluginEventHandler( RFs* aRfs ); + + /** + * Symbian second-phase constructor + */ + void ConstructL(); + + private: // Data + /** A pointer to the object, which contains the configuration for the plugins, owned */ + CSCPParamObject* iPluginConfiguration; + /** The configuration path */ + TFileName iConfigurationPath; + /** A pointer to a connected File Server session, not owned */ + RFs* iRfs; + }; + +#endif // SCPPLUGINEVENTHANDLER_H + +// End of File +