epoc32/include/mw/pluginadapterinterface.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/pluginadapterinterface.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/pluginadapterinterface.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,183 @@
     1.4 -pluginadapterinterface.h
     1.5 +/*
     1.6 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Eclipse Public License v1.0"
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description:  The plug-in can use this interface to communicate with the browser.
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef MPLUGINADAPTER_H
    1.24 +#define MPLUGINADAPTER_H
    1.25 +
    1.26 +//  INCLUDES
    1.27 +#include "coecntrl.h"
    1.28 +#include "coecobs.h"
    1.29 +#include "npupp.h"
    1.30 +
    1.31 +// FORWARD DECLARATIONS
    1.32 +class MPluginNotifier;
    1.33 +
    1.34 +
    1.35 +class MOptionMenuHandler;
    1.36 +class CEikMenuPane;
    1.37 +
    1.38 +// CLASS DECLARATION
    1.39 +
    1.40 +/**
    1.41 +*  The plug-in can use this interface to communicate with the browser.
    1.42 +*
    1.43 +*  @lib PluginAdapterUtil in Series 80 Platforms and the Nokia 7710 smartphone
    1.44 +*  @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
    1.45 +*/
    1.46 +class MPluginAdapter
    1.47 +    {
    1.48 +    public: // New functions
    1.49 +        
    1.50 +        /**
    1.51 +        * Gets the pointer to the minor version number of the plug-in version number of the Browser Plug-in API.
    1.52 +        * @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
    1.53 +        * @return Series 60 returns 1. Series 80 and the Nokia 7710 smartphone return 101.
    1.54 +        */
    1.55 +    virtual TUint16 GetVersion()=0;
    1.56 +
    1.57 +        /**
    1.58 +        * Called when the plug-in has completed its creation.
    1.59 +        * This function is called from the constructL function of the plug-in.
    1.60 +        * @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
    1.61 +        * @param aPluginControl A pointer to the plug-in control window
    1.62 +        * @return None
    1.63 +        */
    1.64 +    virtual void PluginConstructedL(CCoeControl* aPluginControl)=0;
    1.65 +
    1.66 +        /**
    1.67 +        * Called after the plug-in has been deleted.
    1.68 +        * This function is called from the destructor of the plug-in.
    1.69 +        * @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
    1.70 +        * @return None
    1.71 +        */
    1.72 +    virtual void PluginFinishedL()=0;
    1.73 +
    1.74 +        /**
    1.75 +        * Returns the window system level control object for the plug-in.
    1.76 +        * @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
    1.77 +        * @return A pointer to the parent control window.
    1.78 +        */
    1.79 +    virtual CCoeControl* GetParentControl()=0;
    1.80 +
    1.81 +        /**
    1.82 +        * Returns the observer for the plug-in control.
    1.83 +        * @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
    1.84 +        * @return Observer that the plug-in can use to send events to the browser.
    1.85 +        */
    1.86 +    virtual MCoeControlObserver* GetParentControlObserver()=0;
    1.87 +
    1.88 +        /**
    1.89 +        * Sets the plug-in notifier allowing the plug-in to control portions of the browser.
    1.90 +        * @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
    1.91 +        * @param aNotifier Pointer to an interface that the browser can use to send events to the plug-in.
    1.92 +        * @return None
    1.93 +        */
    1.94 +    virtual void SetPluginNotifier(MPluginNotifier *aNotifier)=0;
    1.95 +        
    1.96 +
    1.97 +        /**
    1.98 +        * Sets the plug-in option menu handler allowing the plug-in to handle the custom menu commands
    1.99 +        * from the browser.
   1.100 +        * @since Series 60 3nd Edition
   1.101 +        * @param aOptionMenuHandler Pointer to an interface that the browser can use to send option menu
   1.102 +        * commands to the plug-in.
   1.103 +        * @return None
   1.104 +        */
   1.105 +    virtual void SetOptionMenuHandler(MOptionMenuHandler* /*aOptionMenuHandler*/) {};
   1.106 +    };
   1.107 +
   1.108 +
   1.109 +/**
   1.110 +*  Contains notification ability for plug-ins.
   1.111 +*  These methods are implemented in the plugin.
   1.112 +*
   1.113 +*  @lib
   1.114 +*  @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
   1.115 +*/
   1.116 +class MPluginNotifier
   1.117 +    {
   1.118 +    public:     // Data
   1.119 +        // Types of notifications which can be passed to the plugin.
   1.120 +    enum TNotificationType {
   1.121 +       EEditCut,
   1.122 +       EEditCopy, 
   1.123 +       EEditPaste, 
   1.124 +       EEditDelete, 
   1.125 +       EApplicationFocusChanged, 
   1.126 +       ESystemNotification,
   1.127 +       EPluginInvisible,
   1.128 +       EPluginActivated,
   1.129 +       EPluginDeactivated,
   1.130 +       EMenuOptionEnableDecider,
   1.131 +       EPluginPause
   1.132 +    };
   1.133 +
   1.134 +
   1.135 +    public: // New functions
   1.136 +        
   1.137 +        /**
   1.138 +        * Notifies the plugin of an event.
   1.139 +        * @since Series 60 2nd Edition, Feature Pack 2 and Series 80 Platforms and the Nokia 7710 smartphone
   1.140 +        * @param aCallType The event type that is passed to the plug-in
   1.141 +        * @param aParam The parameter associated with the event
   1.142 +        * @return Not used
   1.143 +        */
   1.144 +    virtual TInt NotifyL (TNotificationType aCallType, TAny *aParam)=0;
   1.145 +
   1.146 +    };
   1.147 +
   1.148 +
   1.149 +/**
   1.150 +*  Contains the ability for plug-ins to handle the menu option commands.
   1.151 +*  These methods are implemented in the plugin.
   1.152 +*
   1.153 +*  @lib
   1.154 +*  @since Series 60 3rd Edition
   1.155 +*/
   1.156 +class MOptionMenuHandler
   1.157 +    {
   1.158 +    public: // New functions
   1.159 +        
   1.160 +        /**
   1.161 +        * AddPluginOptionMenuItemsL
   1.162 +        * Add the Option Menu items to the menuPane, these will be handled by plugin.
   1.163 +        *
   1.164 +        * @since 3.1
   1.165 +        * @param aMenuPane handle of the menu that will contain the options 
   1.166 +        * @param aCommandBase base id that needs to be added to the command ID 
   1.167 +        * @param aAfter Plugin options should be added after this index
   1.168 +        * @return void
   1.169 +        */
   1.170 +    virtual void AddPluginOptionMenuItemsL(CEikMenuPane& aMenuPane, TInt aCommandBase, TInt aAfter)=0;
   1.171 +    
   1.172 +        /**
   1.173 +        * HandlePluginCommandL
   1.174 +        * Handle the user command from the option menu to the plugin.
   1.175 +        *
   1.176 +        * @since 3.1
   1.177 +        * @param aCommandId the command ID of the option
   1.178 +        * @return void
   1.179 +        */
   1.180 +    virtual void HandlePluginCommandL(TInt aCommandId)=0;
   1.181 +
   1.182 +    };
   1.183 +
   1.184 +#endif      // MPLUGINADAPTER_H   
   1.185 +
   1.186 +            
   1.187 +// End of File