npfunctions should reflect different NP_Initialize signature for Mac OS X. r=smichaud sr=jst a=beltzner
authorJosh Aas <joshmoz@gmail.com>
Fri, 28 Nov 2008 18:17:36 -0500
changeset 22117 f8acae5dc56b95e8b08985ccd7a3070620ab14e4
parent 22116 c927c0929dccf092138ca8f5fc896bd9cfaa7dab
child 22118 fc1c0104ec4dc22c067f48e1e1ceb15fbe4d0f90
push id3804
push usersdwilsh@shawnwilsher.com
push dateSat, 29 Nov 2008 01:34:43 +0000
treeherdermozilla-central@fc1c0104ec4d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud, jst, beltzner
milestone1.9.1b3pre
npfunctions should reflect different NP_Initialize signature for Mac OS X. r=smichaud sr=jst a=beltzner
modules/plugin/base/public/npapi.h
modules/plugin/base/public/npfunctions.h
modules/plugin/test/testplugin/Info.plist
--- a/modules/plugin/base/public/npapi.h
+++ b/modules/plugin/base/public/npapi.h
@@ -591,21 +591,21 @@ enum NPEventType {
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /* NPP_* functions are provided by the plugin and called by the navigator. */
 
 #ifdef XP_UNIX
-char* NPP_GetMIMEDescription(void);
+char* NPP_GetMIMEDescription();
 #endif
 
-NPError NP_LOADDS NPP_Initialize(void);
-void    NP_LOADDS NPP_Shutdown(void);
+NPError NP_LOADDS NPP_Initialize();
+void    NP_LOADDS NPP_Shutdown();
 NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance,
                           uint16_t mode, int16_t argc, char* argn[],
                           char* argv[], NPSavedData* saved);
 NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save);
 NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window);
 NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type,
                                 NPStream* stream, NPBool seekable,
                                 uint16_t* stype);
@@ -616,17 +616,17 @@ int32_t NP_LOADDS NPP_Write(NPP instance
                             int32_t len, void* buffer);
 void    NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream,
                                    const char* fname);
 void    NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint);
 int16_t NP_LOADDS NPP_HandleEvent(NPP instance, void* event);
 void    NP_LOADDS NPP_URLNotify(NPP instance, const char* url,
                                 NPReason reason, void* notifyData);
 #ifdef OJI
-jref    NP_LOADDS NPP_GetJavaClass(void);
+jref    NP_LOADDS NPP_GetJavaClass();
 #endif
 NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value);
 NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value);
 
 /* NPN_* functions are provided by the navigator and called by the plugin. */
 void        NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor,
                                   int* netscape_major, int* netscape_minor);
 NPError     NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url,
@@ -649,17 +649,17 @@ NPError     NP_LOADDS NPN_DestroyStream(
                                         NPReason reason);
 void        NP_LOADDS NPN_Status(NPP instance, const char* message);
 const char* NP_LOADDS NPN_UserAgent(NPP instance);
 void*       NP_LOADDS NPN_MemAlloc(uint32_t size);
 void        NP_LOADDS NPN_MemFree(void* ptr);
 uint32_t    NP_LOADDS NPN_MemFlush(uint32_t size);
 void        NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages);
 #ifdef OJI
-JRIEnv*     NP_LOADDS NPN_GetJavaEnv(void);
+JRIEnv*     NP_LOADDS NPN_GetJavaEnv();
 jref        NP_LOADDS NPN_GetJavaPeer(NPP instance);
 #endif
 NPError     NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable,
                                    void *value);
 NPError     NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable,
                                    void *value);
 void        NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect);
 void        NP_LOADDS NPN_InvalidateRegion(NPP instance,
--- a/modules/plugin/base/public/npfunctions.h
+++ b/modules/plugin/base/public/npfunctions.h
@@ -44,18 +44,18 @@
 
 #ifndef GENERATINGCFM
 #define GENERATINGCFM 0
 #endif
 
 #include "npapi.h"
 #include "npruntime.h"
 
-typedef void         (*NPP_InitializeProcPtr)(void);
-typedef void         (*NPP_ShutdownProcPtr)(void);
+typedef void         (*NPP_InitializeProcPtr)();
+typedef void         (*NPP_ShutdownProcPtr)();
 typedef NPError      (*NPP_NewProcPtr)(NPMIMEType pluginType, NPP instance, uint16_t mode, int16_t argc, char* argn[], char* argv[], NPSavedData* saved);
 typedef NPError      (*NPP_DestroyProcPtr)(NPP instance, NPSavedData** save);
 typedef NPError      (*NPP_SetWindowProcPtr)(NPP instance, NPWindow* window);
 typedef NPError      (*NPP_NewStreamProcPtr)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16_t* stype);
 typedef NPError      (*NPP_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason);
 typedef int32_t      (*NPP_WriteReadyProcPtr)(NPP instance, NPStream* stream);
 typedef int32_t      (*NPP_WriteProcPtr)(NPP instance, NPStream* stream, int32_t offset, int32_t len, void* buffer);
 typedef void         (*NPP_StreamAsFileProcPtr)(NPP instance, NPStream* stream, const char* fname);
@@ -76,17 +76,17 @@ typedef NPError      (*NPN_NewStreamProc
 typedef int32_t      (*NPN_WriteProcPtr)(NPP instance, NPStream* stream, int32_t len, void* buffer);
 typedef NPError      (*NPN_DestroyStreamProcPtr)(NPP instance, NPStream* stream, NPReason reason);
 typedef void         (*NPN_StatusProcPtr)(NPP instance, const char* message);
 typedef const char*  (*NPN_UserAgentProcPtr)(NPP instance);
 typedef void*        (*NPN_MemAllocProcPtr)(uint32_t size);
 typedef void         (*NPN_MemFreeProcPtr)(void* ptr);
 typedef uint32_t     (*NPN_MemFlushProcPtr)(uint32_t size);
 typedef void         (*NPN_ReloadPluginsProcPtr)(NPBool reloadPages);
-typedef void*        (*NPN_GetJavaEnvProcPtr)(void);
+typedef void*        (*NPN_GetJavaEnvProcPtr)();
 typedef void*        (*NPN_GetJavaPeerProcPtr)(NPP instance);
 typedef void         (*NPN_InvalidateRectProcPtr)(NPP instance, NPRect *rect);
 typedef void         (*NPN_InvalidateRegionProcPtr)(NPP instance, NPRegion region);
 typedef void         (*NPN_ForceRedrawProcPtr)(NPP instance);
 typedef NPIdentifier (*NPN_GetStringIdentifierProcPtr)(const NPUTF8* name);
 typedef void         (*NPN_GetStringIdentifiersProcPtr)(const NPUTF8** names, int32_t nameCount, NPIdentifier* identifiers);
 typedef NPIdentifier (*NPN_GetIntIdentifierProcPtr)(int32_t intid);
 typedef bool         (*NPN_IdentifierIsStringProcPtr)(NPIdentifier identifier);
@@ -258,19 +258,23 @@ char*          NP_GetMIMEDescription();
 #if defined(__OS2__)
 #pragma pack()
 #endif
 
 #ifdef XP_UNIX
 #ifdef __cplusplus
 extern "C" {
 #endif
-NP_EXPORT(char*)   NP_GetPluginVersion(void);
-NP_EXPORT(char*)   NP_GetMIMEDescription(void);
-NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs*, NPPluginFuncs*);
-NP_EXPORT(NPError) NP_Shutdown(void);
+NP_EXPORT(char*)   NP_GetPluginVersion();
+NP_EXPORT(char*)   NP_GetMIMEDescription();
+#ifdef XP_MACOSX
+NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs);
+#else
+NP_EXPORT(NPError) NP_Initialize(NPNetscapeFuncs* bFuncs, NPPluginFuncs* pFuncs);
+#endif
+NP_EXPORT(NPError) NP_Shutdown();
 NP_EXPORT(NPError) NP_GetValue(void *future, NPPVariable aVariable, void *aValue);
 #ifdef __cplusplus
 }
 #endif
 #endif
 
 #endif /* npfunctions_h_ */
--- a/modules/plugin/test/testplugin/Info.plist
+++ b/modules/plugin/test/testplugin/Info.plist
@@ -1,18 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
 	<key>CFBundleDevelopmentRegion</key>
 	<string>English</string>
 	<key>CFBundleExecutable</key>
 	<string>libnptest.dylib</string>
 	<key>CFBundleIdentifier</key>
-	<string>com.mozilla.TestPlugin</string>
+	<string>org.mozilla.TestPlugin</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundlePackageType</key>
 	<string>BRPL</string>
 	<key>CFBundleShortVersionString</key>
 	<string>1.0.0.0</string>
 	<key>CFBundleSignature</key>
 	<string>TEST</string>
@@ -30,9 +30,9 @@
 			<array>
 				<string>tst</string>
 			</array>
 			<key>WebPluginTypeDescription</key>
 			<string>Test mimetype</string>
 		</dict>
 	</dict>
 </dict>
-</plist>
\ No newline at end of file
+</plist>