mmappfw_plat/mpx_common_api/inc/mpxpluginhandlerobserver.h
changeset 0 a2952bb97e68
equal deleted inserted replaced
-1:000000000000 0:a2952bb97e68
       
     1 /*
       
     2 * Copyright (c) 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:  Observer interface for the plugin handler.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MPXPLUGINHANDLEROBSERVER_H
       
    20 #define MPXPLUGINHANDLEROBSERVER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 
       
    25 /**
       
    26 *  Mix-in class for callback.
       
    27 *
       
    28 *  @lib mpxcommon.lib
       
    29 */
       
    30 NONSHARABLE_CLASS(MMPXPluginHandlerObserver)
       
    31     {
       
    32 public:
       
    33     enum TPluginHandlerEvents
       
    34         {
       
    35         EPluginAdd,             // generated after the plugin DLL is copied
       
    36         EPluginUpdateStart,     // generated before the plugin DLL is unloaded (if already loaded)
       
    37         EPluginUpdateEnd,       // generated after the new plugin version is loaded (if old version was loaded)
       
    38         EPluginRemove           // generated after the plugin DLL is removed but before the plugin instance is unloaded
       
    39         };
       
    40 
       
    41 public:
       
    42     /**
       
    43     * Indicates a change in the plugins managed by the handler.
       
    44     *
       
    45     * @since S60 3.2.3
       
    46     * @param aEvent event code
       
    47     * @param aPluginUid plugin this event is related to
       
    48     * @param aLoaded ETrue if the plugin is loaded, EFalse otherwise
       
    49     * @param aData data associated with the event, its meaning depends on the event:
       
    50     *          EPluginAdd - new plugin version
       
    51     *          EPluginUpdateStart - new plugin version
       
    52     *          EPluginUpdateEnd - new plugin version
       
    53     *          EPluginRemove - old plugin version
       
    54     */
       
    55     virtual void HandlePluginHandlerEvent(TPluginHandlerEvents aEvent, const TUid& aPluginUid,
       
    56         TBool aLoaded, TInt aData) = 0;
       
    57     };
       
    58 
       
    59 #endif // MPXPLUGINHANDLEROBSERVER_H