[vlc-commits] Remove OJI support

Jean-Baptiste Kempf git at videolan.org
Thu Dec 13 18:03:54 CET 2012


npapi-vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu Dec 13 18:03:33 2012 +0100| [1c8da7f2359f967ee34e1e277c434442aa76f28f] | committer: Jean-Baptiste Kempf

Remove OJI support

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=1c8da7f2359f967ee34e1e277c434442aa76f28f
---

 npapi/support/npmac.cpp  |   45 ----------------------------------------
 npapi/support/npunix.cpp |   51 ----------------------------------------------
 npapi/support/npwin.cpp  |   47 ------------------------------------------
 npapi/vlcshell.cpp       |    7 -------
 npapi/vlcshell.h         |    3 ---
 5 files changed, 153 deletions(-)

diff --git a/npapi/support/npmac.cpp b/npapi/support/npmac.cpp
index 8cdcf89..89e0fbf 100644
--- a/npapi/support/npmac.cpp
+++ b/npapi/support/npmac.cpp
@@ -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;
 }
diff --git a/npapi/support/npunix.cpp b/npapi/support/npunix.cpp
index cb4f9a7..0c251c3 100644
--- a/npapi/support/npunix.cpp
+++ b/npapi/support/npunix.cpp
@@ -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.
@@ -913,13 +876,6 @@ NP_Initialize(NPNetscapeFuncs* nsTable, NPPluginFuncs* pluginFuncs)
         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();
     }
diff --git a/npapi/support/npwin.cpp b/npapi/support/npwin.cpp
index 8c46d73..cc5d421 100644
--- a/npapi/support/npwin.cpp
+++ b/npapi/support/npwin.cpp
@@ -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
diff --git a/npapi/vlcshell.cpp b/npapi/vlcshell.cpp
index adb18c5..7feffaf 100644
--- a/npapi/vlcshell.cpp
+++ b/npapi/vlcshell.cpp
@@ -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 )
 {
     ;
diff --git a/npapi/vlcshell.h b/npapi/vlcshell.h
index 7aa792a..7242ae5 100644
--- a/npapi/vlcshell.h
+++ b/npapi/vlcshell.h
@@ -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,



More information about the vlc-commits mailing list