1 --- gpac/applications/osmozilla/npplat.h.orig 2005-07-13 16:34:30.000000000 +0200
2 +++ gpac/applications/osmozilla/npplat.h 2011-03-20 09:34:57.624712082 +0100
8 +#include "npfunctions.h"
10 /**************************************************/
12 --- gpac/applications/osmozilla/osmozilla.h.orig 2008-10-06 17:17:57.000000000 +0200
13 +++ gpac/applications/osmozilla/osmozilla.h 2011-03-20 10:04:41.876713758 +0100
17 #include <nsIClassInfo.h>
18 +#include <nsIProgrammingLanguage.h>
21 #include "nsIOsmozilla.h"
24 // global to get plugins name & description
25 NPError NS_PluginGetValue(NPPVariable aVariable, void *aValue);
26 -char* NPP_GetMIMEDescription(void);
27 +const char* NPP_GetMIMEDescription(void);
31 --- gpac/applications/osmozilla/osmozilla.cpp.orig 2008-10-06 17:17:57.000000000 +0200
32 +++ gpac/applications/osmozilla/osmozilla.cpp 2011-03-20 10:12:46.068709568 +0100
34 return NS_ERROR_NULL_POINTER;
36 if (aIID.Equals(kIZillaPluginIID)) {
37 - *aInstancePtr = NS_STATIC_CAST(nsIOsmozilla *, this);
38 + *aInstancePtr = static_cast<nsIOsmozilla *>(this);
43 if (aIID.Equals(kIClassInfoIID)) {
44 - *aInstancePtr = NS_STATIC_CAST(nsIClassInfo *, this);
45 + *aInstancePtr = static_cast<nsIClassInfo *>(this);
50 if (aIID.Equals(kISupportsIID)) {
51 - *aInstancePtr = NS_STATIC_CAST(nsISupports *, (NS_STATIC_CAST (nsIOsmozilla *, this)));
52 + *aInstancePtr = static_cast<nsISupports *>((static_cast<nsIOsmozilla *>(this)));
56 --- gpac/applications/osmozilla/npn_gate.cpp.orig 2005-07-13 16:34:29.000000000 +0200
57 +++ gpac/applications/osmozilla/npn_gate.cpp 2011-03-20 10:24:21.496702863 +0100
59 NPError rv = NPERR_NO_ERROR;
61 if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
62 - rv = CallNPN_GetURLNotifyProc(NPNFuncs.geturlnotify, instance, url, target, notifyData);
63 + rv = (*NPNFuncs.geturlnotify)(instance, url, target, notifyData);
65 rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
69 NPError NPN_GetURL(NPP instance, const char *url, const char *target)
71 - NPError rv = CallNPN_GetURLProc(NPNFuncs.geturl, instance, url, target);
72 + NPError rv = (*NPNFuncs.geturl)(instance, url, target);
76 -NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData)
77 +NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file, void* notifyData)
79 int navMinorVers = NPNFuncs.version & 0xFF;
80 NPError rv = NPERR_NO_ERROR;
82 if( navMinorVers >= NPVERS_HAS_NOTIFICATION )
83 - rv = CallNPN_PostURLNotifyProc(NPNFuncs.posturlnotify, instance, url, window, len, buf, file, notifyData);
84 + rv = (*NPNFuncs.posturlnotify)(instance, url, window, len, buf, file, notifyData);
86 rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
91 -NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file)
92 +NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32_t len, const char* buf, NPBool file)
94 - NPError rv = CallNPN_PostURLProc(NPNFuncs.posturl, instance, url, window, len, buf, file);
95 + NPError rv = (*NPNFuncs.posturl)(instance, url, window, len, buf, file);
99 NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList)
101 - NPError rv = CallNPN_RequestReadProc(NPNFuncs.requestread, stream, rangeList);
102 + NPError rv = (*NPNFuncs.requestread)(stream, rangeList);
106 @@ -103,20 +103,20 @@
107 NPError rv = NPERR_NO_ERROR;
109 if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
110 - rv = CallNPN_NewStreamProc(NPNFuncs.newstream, instance, type, target, stream);
111 + rv = (*NPNFuncs.newstream)(instance, type, target, stream);
113 rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
118 -int32 NPN_Write(NPP instance, NPStream *stream, int32 len, void *buffer)
119 +int32_t NPN_Write(NPP instance, NPStream *stream, int32_t len, void *buffer)
121 int navMinorVersion = NPNFuncs.version & 0xFF;
125 if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
126 - rv = CallNPN_WriteProc(NPNFuncs.write, instance, stream, len, buffer);
127 + rv = (*NPNFuncs.write)(instance, stream, len, buffer);
132 NPError rv = NPERR_NO_ERROR;
134 if( navMinorVersion >= NPVERS_HAS_STREAMOUTPUT )
135 - rv = CallNPN_DestroyStreamProc(NPNFuncs.destroystream, instance, stream, reason);
136 + rv = (*NPNFuncs.destroystream)(instance, stream, reason);
138 rv = NPERR_INCOMPATIBLE_VERSION_ERROR;
140 @@ -138,78 +138,78 @@
142 void NPN_Status(NPP instance, const char *message)
144 - CallNPN_StatusProc(NPNFuncs.status, instance, message);
145 + (*NPNFuncs.status)(instance, message);
148 const char* NPN_UserAgent(NPP instance)
150 const char * rv = NULL;
151 - rv = CallNPN_UserAgentProc(NPNFuncs.uagent, instance);
152 + rv = (*NPNFuncs.uagent)(instance);
156 -void* NPN_MemAlloc(uint32 size)
157 +void* NPN_MemAlloc(uint32_t size)
160 - rv = CallNPN_MemAllocProc(NPNFuncs.memalloc, size);
161 + rv = (*NPNFuncs.memalloc)(size);
165 void NPN_MemFree(void* ptr)
167 - CallNPN_MemFreeProc(NPNFuncs.memfree, ptr);
168 + (*NPNFuncs.memfree)(ptr);
171 -uint32 NPN_MemFlush(uint32 size)
172 +uint32_t NPN_MemFlush(uint32_t size)
174 - uint32 rv = CallNPN_MemFlushProc(NPNFuncs.memflush, size);
175 + uint32_t rv = (*NPNFuncs.memflush)(size);
179 void NPN_ReloadPlugins(NPBool reloadPages)
181 - CallNPN_ReloadPluginsProc(NPNFuncs.reloadplugins, reloadPages);
182 + (*NPNFuncs.reloadplugins)(reloadPages);
186 JRIEnv* NPN_GetJavaEnv(void)
189 - rv = CallNPN_GetJavaEnvProc(NPNFuncs.getJavaEnv);
190 + rv = (*NPNFuncs.getJavaEnv)();
194 jref NPN_GetJavaPeer(NPP instance)
197 - rv = CallNPN_GetJavaPeerProc(NPNFuncs.getJavaPeer, instance);
198 + rv = (*NPNFuncs.getJavaPeer)(instance);
203 NPError NPN_GetValue(NPP instance, NPNVariable variable, void *value)
205 - NPError rv = CallNPN_GetValueProc(NPNFuncs.getvalue, instance, variable, value);
206 + NPError rv = (*NPNFuncs.getvalue)(instance, variable, value);
210 NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value)
212 - NPError rv = CallNPN_SetValueProc(NPNFuncs.setvalue, instance, variable, value);
213 + NPError rv = (*NPNFuncs.setvalue)(instance, variable, value);
217 void NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
219 - CallNPN_InvalidateRectProc(NPNFuncs.invalidaterect, instance, invalidRect);
220 + (*NPNFuncs.invalidaterect)(instance, invalidRect);
223 void NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
225 - CallNPN_InvalidateRegionProc(NPNFuncs.invalidateregion, instance, invalidRegion);
226 + (*NPNFuncs.invalidateregion)(instance, invalidRegion);
229 void NPN_ForceRedraw(NPP instance)
231 - CallNPN_ForceRedrawProc(NPNFuncs.forceredraw, instance);
232 + (*NPNFuncs.forceredraw)(instance);
234 --- gpac/configure.orig 2011-05-29 21:09:10.138301981 +0200
235 +++ gpac/configure 2011-05-29 21:27:39.248339117 +0200
236 @@ -1145,6 +1145,7 @@
238 #look for GECKO support
240 +#include <mozilla-config.h>
241 #include <nsIServiceManager.h>
242 int main( void ) { return 0; }
244 --- gpac/applications/osmozilla/osmozilla.cpp~ 2012-01-22 17:15:26.902074831 +0100
245 +++ gpac/applications/osmozilla/osmozilla.cpp 2012-01-22 17:17:43.514543060 +0100
247 "application/x-gpac::GPAC plugin;" \
250 -char* NPP_GetMIMEDescription(void)
251 +const char* NPP_GetMIMEDescription(void)
253 return GPAC_PLUGIN_MIMETYPES;
255 --- gpac/applications/osmozilla/np_entry.cpp~ 2005-07-13 16:34:30.000000000 +0200
256 +++ gpac/applications/osmozilla/np_entry.cpp 2012-01-22 17:43:44.464387379 +0100
258 return NS_PluginInitialize();
261 -char * NP_GetMIMEDescription(void)
262 +const char * NP_GetMIMEDescription(void)
264 return NPP_GetMIMEDescription();