[vlc-devel] [PATCH 5/5] Remove OJI code

David Menestrina dmenest at yahoo.com
Thu Apr 15 01:24:08 CEST 2010


From: David Menestrina <dmenest-vlc at ofb dot net>

Since we don't want OJI to be defined, we might as well delete the code
ifdeffed with OJI.
---
 projects/mozilla/support/npmac.cpp |   50 ++---------------------------------
 projects/mozilla/vlcshell.cpp      |    7 -----
 projects/mozilla/vlcshell.h        |    3 --
 3 files changed, 3 insertions(+), 57 deletions(-)

diff --git a/projects/mozilla/support/npmac.cpp b/projects/mozilla/support/npmac.cpp
index b8e2d0e..754c488 100644
--- a/projects/mozilla/support/npmac.cpp
+++ b/projects/mozilla/support/npmac.cpp
@@ -384,18 +384,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);
@@ -634,10 +622,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)
 {
@@ -785,23 +769,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)
 {
@@ -1059,14 +1026,9 @@ 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
@@ -1237,14 +1199,8 @@ 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/projects/mozilla/vlcshell.cpp b/projects/mozilla/vlcshell.cpp
index 3afe5ed..42fa858 100644
--- a/projects/mozilla/vlcshell.cpp
+++ b/projects/mozilla/vlcshell.cpp
@@ -276,13 +276,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/projects/mozilla/vlcshell.h b/projects/mozilla/vlcshell.h
index fca6afa..cb3347b 100644
--- a/projects/mozilla/vlcshell.h
+++ b/projects/mozilla/vlcshell.h
@@ -34,9 +34,6 @@ char * NPP_GetMIMEDescription( void );
 
 NPError NPP_Initialize( void );
 
-#ifdef OJI 
-jref NPP_GetJavaClass( void );
-#endif
 void NPP_Shutdown( void );
 
 #if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
-- 
1.7.0.3




More information about the vlc-devel mailing list