os/mm/devsoundextensions/ciextnfactoryplugins/ciextnserverplugin/inc/cimsghndlrintfc.h
First public contribution.
2 * Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Interface for plugin classes implementing custom interface
15 * message handler interface.
21 #ifndef CIMSGHNDLRINTFC_H
22 #define CIMSGHNDLRINTFC_H
25 #include <mmf/common/mcustominterface.h>
26 #include <mmf/common/mmfipc.h>
29 * Mixin class for plugins handling custom interface related messages
31 * Instance of plugins implementing this interface will be used by
32 * CCIExtnServerPlugin.
37 class MCIMsgHndlrIntfc
41 * Called by framework after plugin construction.
42 * The passed UID must be retained for the lifetime of the plugin and, on a
43 * subsequent call to Close(), REComSession::DestroyedImplementation() must
44 * be called by the plugin, using the stored UID.
45 * The implementation should return KErrNone upon successful initialization.
46 * Otherwise the plugin will be immediately destroyed.
48 * @param aCustomInterface Reference to implementation of MCustomInterface.
49 * @param aDestructorKey The Uid returned by
50 * REComSession::CreateImplementationL() or similar.
52 virtual TInt Initialize( MCustomInterface& aCustomInterface, TUid aDestructorKey ) = 0;
55 * Returns implementation UID of this plugin.
57 * @return aUid implementation UID of the plugin
59 virtual TUid ImplementationUid() = 0;
62 * Called by the framework to give the plugin a chance to handle the
63 * custom interface message.
65 * @param aMessage Message received by MM framework.
66 * @return ETrue if message can be handled by the plugin. EFalse if the
67 * message is not supported by the plugin. Returning EFalse imples
68 * aMessage not completed and should be processed further by the
71 virtual TBool HandleMessage( const RMmfIpcMessage& aMessage ) = 0;
74 * Called by the framework when plugin is to be destroyed.
75 * Equivalent to destructor. Called to destroy plugin.
77 virtual void Close() = 0;
81 #endif /*CIMSGHNDLRINTFC_H*/