sl@0: /* sl@0: * Copyright (c) 2002-2008 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 "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: Interface for plugin classes implementing custom interface sl@0: * message handler interface. sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #ifndef CIMSGHNDLRINTFC_H sl@0: #define CIMSGHNDLRINTFC_H sl@0: sl@0: // Include files sl@0: #include sl@0: #include sl@0: sl@0: /** sl@0: * Mixin class for plugins handling custom interface related messages sl@0: * sl@0: * Instance of plugins implementing this interface will be used by sl@0: * CCIExtnServerPlugin. sl@0: * sl@0: * @since S60 v3.2 sl@0: * sl@0: */ sl@0: class MCIMsgHndlrIntfc sl@0: { sl@0: public: sl@0: /** sl@0: * Called by framework after plugin construction. sl@0: * The passed UID must be retained for the lifetime of the plugin and, on a sl@0: * subsequent call to Close(), REComSession::DestroyedImplementation() must sl@0: * be called by the plugin, using the stored UID. sl@0: * The implementation should return KErrNone upon successful initialization. sl@0: * Otherwise the plugin will be immediately destroyed. sl@0: * sl@0: * @param aCustomInterface Reference to implementation of MCustomInterface. sl@0: * @param aDestructorKey The Uid returned by sl@0: * REComSession::CreateImplementationL() or similar. sl@0: */ sl@0: virtual TInt Initialize( MCustomInterface& aCustomInterface, TUid aDestructorKey ) = 0; sl@0: sl@0: /** sl@0: * Returns implementation UID of this plugin. sl@0: * sl@0: * @return aUid implementation UID of the plugin sl@0: */ sl@0: virtual TUid ImplementationUid() = 0; sl@0: sl@0: /** sl@0: * Called by the framework to give the plugin a chance to handle the sl@0: * custom interface message. sl@0: * sl@0: * @param aMessage Message received by MM framework. sl@0: * @return ETrue if message can be handled by the plugin. EFalse if the sl@0: * message is not supported by the plugin. Returning EFalse imples sl@0: * aMessage not completed and should be processed further by the sl@0: * framework. sl@0: */ sl@0: virtual TBool HandleMessage( const RMmfIpcMessage& aMessage ) = 0; sl@0: sl@0: /** sl@0: * Called by the framework when plugin is to be destroyed. sl@0: * Equivalent to destructor. Called to destroy plugin. sl@0: */ sl@0: virtual void Close() = 0; sl@0: sl@0: }; sl@0: sl@0: #endif /*CIMSGHNDLRINTFC_H*/