From c3ed0d6f79176689ffe3710246ecc8b206be7b46 Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Sat, 6 Mar 1999 22:32:49 +0000 Subject: [PATCH] passing service manager, using NS_CALLBACK macro. git-svn-id: svn://10.0.0.236/trunk@23089 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/plugin/base/src/ns4xPlugin.h | 21 ++++++++------------ mozilla/modules/plugin/nglsrc/ns4xPlugin.h | 21 ++++++++------------ 2 files changed, 16 insertions(+), 26 deletions(-) diff --git a/mozilla/modules/plugin/base/src/ns4xPlugin.h b/mozilla/modules/plugin/base/src/ns4xPlugin.h index 08fa4c48d7a..99466b0fda4 100644 --- a/mozilla/modules/plugin/base/src/ns4xPlugin.h +++ b/mozilla/modules/plugin/base/src/ns4xPlugin.h @@ -22,7 +22,6 @@ #include "nsplugin.h" #include "prlink.h" // for PRLibrary #include "npupp.h" -#include "nsIMalloc.h" //////////////////////////////////////////////////////////////////////// @@ -39,16 +38,12 @@ // XXX These are defined in platform specific FE directories right now :-/ -//BTW: this sucks rocks. -#ifdef XP_PC -#define PLUGIN_ENTRYPOINT_CALL_TYPE __stdcall -#else -#define PLUGIN_ENTRYPOINT_CALL_TYPE -#endif +typedef NS_CALLBACK_(NPError, NP_GETENTRYPOINTS) (NPPluginFuncs* pCallbacks); +typedef NS_CALLBACK_(NPError, NP_PLUGININIT) (const NPNetscapeFuncs* pCallbacks); +typedef NS_CALLBACK_(NPError, NP_PLUGINSHUTDOWN) (void); -typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_GETENTRYPOINTS)(NPPluginFuncs* pCallbacks); -typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_PLUGININIT)(const NPNetscapeFuncs* pCallbacks); -typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_PLUGINSHUTDOWN)(); +class nsIServiceManager; +class nsIAllocator; //////////////////////////////////////////////////////////////////////// @@ -59,7 +54,7 @@ typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_PLUGINSHUTDOWN)(); class ns4xPlugin : public nsIPlugin { public: - ns4xPlugin(NPPluginFuncs* callbacks, NP_PLUGINSHUTDOWN aShutdown, nsISupports* browserInterfaces); + ns4xPlugin(NPPluginFuncs* callbacks, NP_PLUGINSHUTDOWN aShutdown, nsIServiceManager* serviceMgr); ~ns4xPlugin(void); NS_DECL_ISUPPORTS @@ -102,7 +97,7 @@ public: static nsresult CreatePlugin(PRLibrary *library, nsIPlugin **result, - nsISupports* browserInterfaces); + nsIServiceManager* serviceMgr); protected: /** @@ -226,7 +221,7 @@ protected: static NPNetscapeFuncs CALLBACKS; static nsIPluginManager *mPluginManager; - static nsIMalloc *mMalloc; + static nsIAllocator *mMalloc; }; #endif // ns4xPlugin_h__ diff --git a/mozilla/modules/plugin/nglsrc/ns4xPlugin.h b/mozilla/modules/plugin/nglsrc/ns4xPlugin.h index 08fa4c48d7a..99466b0fda4 100644 --- a/mozilla/modules/plugin/nglsrc/ns4xPlugin.h +++ b/mozilla/modules/plugin/nglsrc/ns4xPlugin.h @@ -22,7 +22,6 @@ #include "nsplugin.h" #include "prlink.h" // for PRLibrary #include "npupp.h" -#include "nsIMalloc.h" //////////////////////////////////////////////////////////////////////// @@ -39,16 +38,12 @@ // XXX These are defined in platform specific FE directories right now :-/ -//BTW: this sucks rocks. -#ifdef XP_PC -#define PLUGIN_ENTRYPOINT_CALL_TYPE __stdcall -#else -#define PLUGIN_ENTRYPOINT_CALL_TYPE -#endif +typedef NS_CALLBACK_(NPError, NP_GETENTRYPOINTS) (NPPluginFuncs* pCallbacks); +typedef NS_CALLBACK_(NPError, NP_PLUGININIT) (const NPNetscapeFuncs* pCallbacks); +typedef NS_CALLBACK_(NPError, NP_PLUGINSHUTDOWN) (void); -typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_GETENTRYPOINTS)(NPPluginFuncs* pCallbacks); -typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_PLUGININIT)(const NPNetscapeFuncs* pCallbacks); -typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_PLUGINSHUTDOWN)(); +class nsIServiceManager; +class nsIAllocator; //////////////////////////////////////////////////////////////////////// @@ -59,7 +54,7 @@ typedef NPError (PLUGIN_ENTRYPOINT_CALL_TYPE *NP_PLUGINSHUTDOWN)(); class ns4xPlugin : public nsIPlugin { public: - ns4xPlugin(NPPluginFuncs* callbacks, NP_PLUGINSHUTDOWN aShutdown, nsISupports* browserInterfaces); + ns4xPlugin(NPPluginFuncs* callbacks, NP_PLUGINSHUTDOWN aShutdown, nsIServiceManager* serviceMgr); ~ns4xPlugin(void); NS_DECL_ISUPPORTS @@ -102,7 +97,7 @@ public: static nsresult CreatePlugin(PRLibrary *library, nsIPlugin **result, - nsISupports* browserInterfaces); + nsIServiceManager* serviceMgr); protected: /** @@ -226,7 +221,7 @@ protected: static NPNetscapeFuncs CALLBACKS; static nsIPluginManager *mPluginManager; - static nsIMalloc *mMalloc; + static nsIAllocator *mMalloc; }; #endif // ns4xPlugin_h__