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: Header definition of plugin class implementing devsound server sl@0: * side custom interface extension. sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #ifndef CIEXTNSERVERPLUGIN_H sl@0: #define CIEXTNSERVERPLUGIN_H sl@0: sl@0: // Include files sl@0: #include sl@0: #include sl@0: #include "ciextnserverpluginwrapper.h" sl@0: sl@0: // Forward declarations sl@0: class MCustomInterface; sl@0: class MCIMsgHndlrIntfc; sl@0: sl@0: /** sl@0: * Plugin class implementing DevSound CI server Extension sl@0: * sl@0: * An instance of this class is created when DevSound Session is created. When sl@0: * DevSound session object receives a RMmfIpcMessage that cannot be handled, the sl@0: * message is forwarded to this plugin. sl@0: * sl@0: * Only one instance of this plugin can exist in the system. sl@0: * sl@0: * This class is intended to be used only by DevSound Session implementation. sl@0: * sl@0: * @since S60 v3.2 sl@0: * sl@0: */ sl@0: class CCIExtnServerPlugin : public CBase, sl@0: public MDevSoundCIServerExtension sl@0: { sl@0: public: sl@0: sl@0: /** sl@0: * Two-phased constructor. sl@0: * Called by ECom framework. sl@0: */ sl@0: static MDevSoundCIServerExtension* NewL(); sl@0: sl@0: /** sl@0: * Destructor. sl@0: */ sl@0: ~CCIExtnServerPlugin(); sl@0: sl@0: // From MDevSoundCIServerExtension begins sl@0: // Called by framework when plugin is constructed sl@0: TInt Setup( MCustomInterface& aInterface ); sl@0: // Called by framework passing aMessage to handle sl@0: TInt HandleMessageL(const RMmfIpcMessage& aMessage); sl@0: // Called by framework when plugin is to be deleted sl@0: void Release(); sl@0: // Called by framework after plugin is created sl@0: void PassDestructorKey( TUid aDestructorKey ); sl@0: // From MDevSoundCIClientExtension ends sl@0: sl@0: private: sl@0: sl@0: /** sl@0: * Constructor. sl@0: */ sl@0: CCIExtnServerPlugin(); sl@0: sl@0: /** sl@0: * Second phase constructor. sl@0: */ sl@0: void ConstructL(); sl@0: sl@0: /** sl@0: * Initializes factory plugins list. sl@0: * sl@0: * Leaves on error. sl@0: */ sl@0: void InitializeMsgHndlrPluginsL(); sl@0: sl@0: private: sl@0: sl@0: /** sl@0: * Reference to MCustomInterface interface sl@0: * Not own. sl@0: */ sl@0: MCustomInterface* iMCustomInterface; sl@0: sl@0: /** sl@0: * Reference to MCustomInterface interface sl@0: * Not own. sl@0: */ sl@0: CIExtnServerPluginWrapper* iCiExtnServerPluginWrapper; sl@0: sl@0: /** sl@0: * Uid of the plugin object passed by the framework via PassDestructorKey() sl@0: */ sl@0: TUid iDestructorKey; sl@0: sl@0: /** sl@0: * List of message handler plugins. When framework calls sl@0: * HandleMessageL() function, the request will be forwarded to each sl@0: * message handler plugin in this list until it is handled. sl@0: * sl@0: * Own. sl@0: */ sl@0: RPointerArray iMCIMsgHndlrIntfcList; sl@0: }; sl@0: sl@0: #endif // CIEXTNSERVERPLUGIN_H