Roll DEPS for libelf clang compilation fix.
[chromium-blink-merge.git] / third_party / npapi / npspy / include / epmanager.h
blobf7664223f6972586fde3295599134c5a7bb45702
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is mozilla.org code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either the GNU General Public License Version 2 or later (the "GPL"), or
26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #ifndef __EPMANAGER_H__
39 #define __EPMANAGER_H__
41 #include "npapi.h"
42 #include "npupp.h"
44 typedef NPError (__stdcall * NP_GETENTRYPOINTS) (NPPluginFuncs* pFuncs);
45 typedef NPError (__stdcall * NP_INITIALIZE) (NPNetscapeFuncs* pFuncs);
46 typedef NPError (__stdcall * NP_SHUTDOWN) (void);
48 struct InstanceList
50 InstanceList * next;
51 NPP instance;
53 InstanceList(NPP _instance);
54 ~InstanceList();
57 struct PluginEntryPointList
59 PluginEntryPointList * next;
60 char mimetype[80];
61 InstanceList * instances;
62 NPPluginFuncs realNPPFuncs;
63 NP_SHUTDOWN realShutdown;
64 XP_HLIB hLib;
66 PluginEntryPointList();
67 ~PluginEntryPointList();
70 class NPPEntryPointManager
72 private:
73 PluginEntryPointList * mEntryPoints;
75 public:
76 void createEntryPointsForPlugin(char * mimetype, NPPluginFuncs * funcs, NP_SHUTDOWN shutdownproc, XP_HLIB hLib);
77 void removeEntryPointsForPlugin(NPP instance, XP_HLIB * lib);
78 NPPluginFuncs * findEntryPointsForPlugin(char * mimetype);
80 private:
81 NPPluginFuncs * findEntryPointsForInstance(NPP instance);
83 public:
84 NPPEntryPointManager();
85 ~NPPEntryPointManager();
87 void callNP_Shutdown(NPP instance);
88 void callNP_ShutdownAll();
90 NPError callNPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved);
91 NPError callNPP_Destroy(NPP instance, NPSavedData** save, BOOL * last);
92 NPError callNPP_SetWindow(NPP instance, NPWindow* window);
93 NPError callNPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype);
94 NPError callNPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason);
95 int32 callNPP_WriteReady(NPP instance, NPStream* stream);
96 int32 callNPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer);
97 void callNPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname);
98 void callNPP_Print(NPP instance, NPPrint* platformPrint);
99 void callNPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData);
100 jref callNPP_GetJavaClass(void);
101 NPError callNPP_GetValue(NPP instance, NPPVariable variable, void *value);
102 NPError callNPP_SetValue(NPP instance, NPNVariable variable, void *value);
103 int16 callNPP_HandleEvent(NPP instance, void* event);
106 #endif