os/mm/devsoundextensions/ciextnfactoryplugins/ciextnserverplugin/inc/cimsghndlrintfc.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/devsoundextensions/ciextnfactoryplugins/ciextnserverplugin/inc/cimsghndlrintfc.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,81 @@
1.4 +/*
1.5 +* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Interface for plugin classes implementing custom interface
1.18 +* message handler interface.
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +#ifndef CIMSGHNDLRINTFC_H
1.25 +#define CIMSGHNDLRINTFC_H
1.26 +
1.27 +// Include files
1.28 +#include <mmf/common/mcustominterface.h>
1.29 +#include <mmf/common/mmfipc.h>
1.30 +
1.31 +/**
1.32 + * Mixin class for plugins handling custom interface related messages
1.33 + *
1.34 + * Instance of plugins implementing this interface will be used by
1.35 + * CCIExtnServerPlugin.
1.36 + *
1.37 + * @since S60 v3.2
1.38 + *
1.39 + */
1.40 +class MCIMsgHndlrIntfc
1.41 + {
1.42 +public:
1.43 + /**
1.44 + * Called by framework after plugin construction.
1.45 + * The passed UID must be retained for the lifetime of the plugin and, on a
1.46 + * subsequent call to Close(), REComSession::DestroyedImplementation() must
1.47 + * be called by the plugin, using the stored UID.
1.48 + * The implementation should return KErrNone upon successful initialization.
1.49 + * Otherwise the plugin will be immediately destroyed.
1.50 + *
1.51 + * @param aCustomInterface Reference to implementation of MCustomInterface.
1.52 + * @param aDestructorKey The Uid returned by
1.53 + * REComSession::CreateImplementationL() or similar.
1.54 + */
1.55 + virtual TInt Initialize( MCustomInterface& aCustomInterface, TUid aDestructorKey ) = 0;
1.56 +
1.57 + /**
1.58 + * Returns implementation UID of this plugin.
1.59 + *
1.60 + * @return aUid implementation UID of the plugin
1.61 + */
1.62 + virtual TUid ImplementationUid() = 0;
1.63 +
1.64 + /**
1.65 + * Called by the framework to give the plugin a chance to handle the
1.66 + * custom interface message.
1.67 + *
1.68 + * @param aMessage Message received by MM framework.
1.69 + * @return ETrue if message can be handled by the plugin. EFalse if the
1.70 + * message is not supported by the plugin. Returning EFalse imples
1.71 + * aMessage not completed and should be processed further by the
1.72 + * framework.
1.73 + */
1.74 + virtual TBool HandleMessage( const RMmfIpcMessage& aMessage ) = 0;
1.75 +
1.76 + /**
1.77 + * Called by the framework when plugin is to be destroyed.
1.78 + * Equivalent to destructor. Called to destroy plugin.
1.79 + */
1.80 + virtual void Close() = 0;
1.81 +
1.82 + };
1.83 +
1.84 +#endif /*CIMSGHNDLRINTFC_H*/