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.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:   Interface for plugin classes implementing custom interface
sl@0
    15
*                message handler interface.
sl@0
    16
*
sl@0
    17
*/
sl@0
    18
sl@0
    19
sl@0
    20
sl@0
    21
#ifndef CIMSGHNDLRINTFC_H
sl@0
    22
#define CIMSGHNDLRINTFC_H
sl@0
    23
sl@0
    24
// Include files
sl@0
    25
#include <mmf/common/mcustominterface.h>
sl@0
    26
#include <mmf/common/mmfipc.h>
sl@0
    27
sl@0
    28
/**
sl@0
    29
 * Mixin class for plugins handling custom interface related messages
sl@0
    30
 *
sl@0
    31
 * Instance of plugins implementing this interface will be used by
sl@0
    32
 * CCIExtnServerPlugin.
sl@0
    33
 *
sl@0
    34
 *  @since S60 v3.2
sl@0
    35
 *
sl@0
    36
 */
sl@0
    37
class MCIMsgHndlrIntfc
sl@0
    38
    {
sl@0
    39
public:
sl@0
    40
    /**
sl@0
    41
     * Called by framework after plugin construction.
sl@0
    42
     * The passed UID must be retained for the lifetime of the plugin and, on a
sl@0
    43
     * subsequent call to Close(), REComSession::DestroyedImplementation() must
sl@0
    44
     * be called by the plugin, using the stored UID.
sl@0
    45
     * The implementation should return KErrNone upon successful initialization.
sl@0
    46
     * Otherwise the plugin will be immediately destroyed.
sl@0
    47
     *
sl@0
    48
     * @param aCustomInterface  Reference to implementation of MCustomInterface.
sl@0
    49
     * @param aDestructorKey The Uid returned by
sl@0
    50
     *        REComSession::CreateImplementationL() or similar.
sl@0
    51
     */
sl@0
    52
    virtual TInt Initialize( MCustomInterface& aCustomInterface, TUid aDestructorKey ) = 0;
sl@0
    53
sl@0
    54
    /**
sl@0
    55
     * Returns implementation UID of this plugin.
sl@0
    56
     *
sl@0
    57
     * @return aUid implementation UID of the plugin
sl@0
    58
     */
sl@0
    59
    virtual TUid ImplementationUid() = 0;
sl@0
    60
sl@0
    61
    /**
sl@0
    62
     * Called by the framework to give the plugin a chance to handle the
sl@0
    63
     * custom interface message.
sl@0
    64
     *
sl@0
    65
     * @param aMessage Message received by MM framework.
sl@0
    66
     * @return ETrue if message can be handled by the plugin. EFalse if the
sl@0
    67
     * 		   message is not supported by the plugin. Returning EFalse imples
sl@0
    68
     * 		   aMessage not completed and should be processed further by the
sl@0
    69
     * 		   framework.
sl@0
    70
     */
sl@0
    71
    virtual TBool HandleMessage( const RMmfIpcMessage& aMessage ) = 0;
sl@0
    72
sl@0
    73
    /**
sl@0
    74
     * Called by the framework when plugin is to be destroyed.
sl@0
    75
     * Equivalent to destructor. Called to destroy plugin.
sl@0
    76
     */
sl@0
    77
    virtual void Close() = 0;
sl@0
    78
sl@0
    79
    };
sl@0
    80
sl@0
    81
#endif /*CIMSGHNDLRINTFC_H*/