os/mm/devsoundextensions/ciextnfactoryplugins/ciextnserverplugin/inc/cimsghndlrintfc.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:   Interface for plugin classes implementing custom interface
    15 *                message handler interface.
    16 *
    17 */
    18 
    19 
    20 
    21 #ifndef CIMSGHNDLRINTFC_H
    22 #define CIMSGHNDLRINTFC_H
    23 
    24 // Include files
    25 #include <mmf/common/mcustominterface.h>
    26 #include <mmf/common/mmfipc.h>
    27 
    28 /**
    29  * Mixin class for plugins handling custom interface related messages
    30  *
    31  * Instance of plugins implementing this interface will be used by
    32  * CCIExtnServerPlugin.
    33  *
    34  *  @since S60 v3.2
    35  *
    36  */
    37 class MCIMsgHndlrIntfc
    38     {
    39 public:
    40     /**
    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.
    47      *
    48      * @param aCustomInterface  Reference to implementation of MCustomInterface.
    49      * @param aDestructorKey The Uid returned by
    50      *        REComSession::CreateImplementationL() or similar.
    51      */
    52     virtual TInt Initialize( MCustomInterface& aCustomInterface, TUid aDestructorKey ) = 0;
    53 
    54     /**
    55      * Returns implementation UID of this plugin.
    56      *
    57      * @return aUid implementation UID of the plugin
    58      */
    59     virtual TUid ImplementationUid() = 0;
    60 
    61     /**
    62      * Called by the framework to give the plugin a chance to handle the
    63      * custom interface message.
    64      *
    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
    69      * 		   framework.
    70      */
    71     virtual TBool HandleMessage( const RMmfIpcMessage& aMessage ) = 0;
    72 
    73     /**
    74      * Called by the framework when plugin is to be destroyed.
    75      * Equivalent to destructor. Called to destroy plugin.
    76      */
    77     virtual void Close() = 0;
    78 
    79     };
    80 
    81 #endif /*CIMSGHNDLRINTFC_H*/