Commit 1c8da7f2 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Remove OJI support

parent 1abffe64
......@@ -377,18 +377,6 @@ void NPN_ReloadPlugins(NPBool reloadPages)
CALL_NPN(CallNPN_ReloadPluginsProc, gNetscapeFuncs.reloadplugins, reloadPages);
}
#ifdef OJI
JRIEnv* NPN_GetJavaEnv(void)
{
return CallNPN_GetJavaEnvProc( gNetscapeFuncs.getJavaEnv );
}
jobject NPN_GetJavaPeer(NPP instance)
{
return CallNPN_GetJavaPeerProc( gNetscapeFuncs.getJavaPeer, instance );
}
#endif
NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
{
return CALL_NPN(CallNPN_GetValueProc, gNetscapeFuncs.getvalue, instance, variable, value);
......@@ -627,9 +615,6 @@ void Private_StreamAsFile(NPP instance, NPStream* stream, const char* fna
void Private_Print(NPP instance, NPPrint* platformPrint);
int16_t Private_HandleEvent(NPP instance, void* event);
void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData);
#ifdef OJI
jobject Private_GetJavaClass(void);
#endif // OJI
NPError Private_Initialize(void)
......@@ -813,22 +798,6 @@ void Private_URLNotify(NPP instance, const char* url, NPReason reason, void* not
ExitCodeResource();
}
#ifdef OJI
jobject Private_GetJavaClass(void)
{
EnterCodeResource();
PLUGINDEBUGSTR("\pGetJavaClass;g;");
jobject clazz = NPP_GetJavaClass();
ExitCodeResource();
if (clazz)
{
JRIEnv* env = NPN_GetJavaEnv();
return (jobject)JRI_NewGlobalRef(env, clazz);
}
return NULL;
}
#endif
void SetUpQD(void);
void SetUpQD(void)
......@@ -1090,14 +1059,7 @@ DEFINE_API_C(main_return_t) main(NPNetscapeFuncs* nsTable, NPPluginFuncs* plugin
pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(PLUGIN_TO_HOST_GLUE(urlnotify, Private_URLNotify));
#endif
}
#ifdef OJI
if( navMinorVers >= NPVERS_HAS_LIVECONNECT )
{
pluginFuncs->javaClass = (JRIGlobalRef) Private_GetJavaClass();
}
#else
pluginFuncs->javaClass = NULL;
#endif
#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
*unloadUpp = NewNPP_ShutdownProc(PLUGIN_TO_HOST_GLUE(shutdown, Private_Shutdown));
#else
......@@ -1280,14 +1242,7 @@ NPError NP_GetEntryPoints(NPPluginFuncs* pluginFuncs)
{
pluginFuncs->urlnotify = Private_URLNotify;
}
#ifdef OJI
if( navMinorVers >= NPVERS_HAS_LIVECONNECT )
{
pluginFuncs->javaClass = (JRIGlobalRef) Private_GetJavaClass();
}
#else
pluginFuncs->javaClass = NULL;
#endif
return NPERR_NO_ERROR;
}
......
......@@ -323,27 +323,6 @@ void NPN_ReloadPlugins(NPBool reloadPages)
#endif
}
#ifdef OJI
JRIEnv* NPN_GetJavaEnv()
{
#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
return CallNPN_GetJavaEnvProc(gNetscapeFuncs.getJavaEnv);
#else
return (*gNetscapeFuncs.getJavaEnv);
#endif
}
jref NPN_GetJavaPeer(NPP instance)
{
#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
return CallNPN_GetJavaPeerProc(gNetscapeFuncs.getJavaPeer,
instance);
#else
return (*gNetscapeFuncs.getJavaPeer)(instance);
#endif
}
#endif
void
NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
{
......@@ -683,9 +662,6 @@ void Private_Print(NPP instance, NPPrint* platformPrint);
int16_t Private_HandleEvent(NPP instance, NPEvent *event);
NPError Private_GetValue(NPP instance, NPPVariable variable, void *r_value);
NPError Private_SetValue(NPP instance, NPNVariable variable, void *r_value);
#ifdef OJI
JRIGlobalRef Private_GetJavaClass(void);
#endif
/* function implementations */
NPError
......@@ -797,19 +773,6 @@ Private_SetValue(NPP instance, NPNVariable variable, void *r_value)
return NPP_SetValue(instance, variable, r_value);
}
#ifdef OJI
JRIGlobalRef
Private_GetJavaClass(void)
{
jref clazz = NPP_GetJavaClass();
if (clazz) {
JRIEnv* env = NPN_GetJavaEnv();
return JRI_NewGlobalRef(env, clazz);
}
return NULL;
}
#endif
/***********************************************************************
*
* These functions are located automagically by netscape.
......@@ -912,13 +875,6 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
#if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) >= 20)
gNetscapeFuncs.pluginthreadasynccall =
nsTable->pluginthreadasynccall;
#endif
#ifdef OJI
if( minor >= NPVERS_HAS_LIVECONNECT )
{
gNetscapeFuncs.getJavaEnv = nsTable->getJavaEnv;
gNetscapeFuncs.getJavaPeer = nsTable->getJavaPeer;
}
#endif
gNetscapeFuncs.getvalue = nsTable->getvalue;
gNetscapeFuncs.setvalue = nsTable->setvalue;
......@@ -1037,14 +993,7 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
pluginFuncs->urlnotify = (NPP_URLNotifyProcPtr)(Private_URLNotify);
#endif
}
#ifdef OJI
if( minor >= NPVERS_HAS_LIVECONNECT )
pluginFuncs->javaClass = Private_GetJavaClass();
else
pluginFuncs->javaClass = NULL;
#else
pluginFuncs->javaClass = NULL;
#endif
err = NPP_Initialize();
}
......
......@@ -26,8 +26,6 @@
*
*/
//#define OJI 1
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......@@ -48,28 +46,6 @@
//\\// GLOBAL DATA
NPNetscapeFuncs* g_pNavigatorFuncs = 0;
#ifdef OJI
JRIGlobalRef Private_GetJavaClass(void);
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// Private_GetJavaClass (global function)
//
// Given a Java class reference (thru NPP_GetJavaClass) inform JRT
// of this class existence
//
JRIGlobalRef
Private_GetJavaClass(void)
{
jref clazz = NPP_GetJavaClass();
if (clazz) {
JRIEnv* env = NPN_GetJavaEnv();
return JRI_NewGlobalRef(env, clazz);
}
return NULL;
}
#endif /* OJI */
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\.
////\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//.
// PLUGIN DLL entry points
......@@ -154,11 +130,6 @@ NP_Initialize(NPNetscapeFuncs* pFuncs)
if( navMinorVers >= NPVERS_HAS_NOTIFICATION ) {
g_pluginFuncs->urlnotify = NPP_URLNotify;
}
#ifdef OJI
if( navMinorVers >= NPVERS_HAS_LIVECONNECT ) {
g_pluginFuncs->javaClass = Private_GetJavaClass();
}
#endif
// NPP_Initialize is a standard (cross-platform) initialize function.
return NPP_Initialize();
}
......@@ -560,21 +531,3 @@ void NPN_MemFree(void* ptr)
g_pNavigatorFuncs->memfree(ptr);
}
#ifdef OJI
/* private function to Netscape. do not use!
*/
void NPN_ReloadPlugins(NPBool reloadPages)
{
g_pNavigatorFuncs->reloadplugins(reloadPages);
}
JRIEnv* NPN_GetJavaEnv(void)
{
return g_pNavigatorFuncs->getJavaEnv();
}
jref NPN_GetJavaPeer(NPP instance)
{
return g_pNavigatorFuncs->getJavaPeer(instance);
}
#endif
......@@ -139,13 +139,6 @@ NPError NPP_Initialize( void )
return NPERR_NO_ERROR;
}
#ifdef OJI
jref NPP_GetJavaClass( void )
{
return NULL;
}
#endif
void NPP_Shutdown( void )
{
;
......
......@@ -34,9 +34,6 @@ NPP_GET_MIME_CONST char * NPP_GetMIMEDescription( void );
NPError NPP_Initialize( void );
#ifdef OJI
jref NPP_GetJavaClass( void );
#endif
void NPP_Shutdown( void );
NPError NPP_New( NPMIMEType pluginType, NPP instance, uint16_t mode, NPint16_t argc,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment