4 #include <firefox/npapi.h>
5 #include <firefox/nptypes.h>
6 #include <firefox/npfunctions.h>
9 * Loading and unloading the library
11 NPError NP_Initialize(NPNetscapeFuncs *aNPNFuncs, NPPluginFuncs *pFuncs)
15 * Setup - Ensure a sane environment
18 pFuncs->size < sizeof(NPNetscapeFuncs) )
19 return NPERR_INVALID_FUNCTABLE_ERROR;
21 if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR)
22 return NPERR_INCOMPATIBLE_VERSION_ERROR;
26 * Tell the browser about the API functions we implement
28 pFuncs->newp = NPP_New;
29 pFuncs->destroy = NPP_Destroy;
30 pFuncs->getvalue = NPP_GetValue;
32 return NPERR_NO_ERROR;
35 void NP_Shutdown(void)
41 * Create and destroy an instance of the plugin
43 NPError NPP_New(NPMIMEType pluginType,
44 NPP instance, uint16_t mode,
45 int16_t argc, char *argn[],
46 char *argv[], NPSavedData *saved)
48 return(NPERR_NO_ERROR);
51 NPError NPP_Destroy(NPP instance, NPSavedData **save)
53 return(NPERR_NO_ERROR);
59 * Register the plugin for MIME type, and name, etc.
61 #define MIME_TYPES_DESCRIPTION "application/gss-web:gssw:Web plugin for the Moonshot GSS-EAP libraries"
62 const char* NP_GetMIMEDescription(void)
64 return(MIME_TYPES_DESCRIPTION);
67 NPError NP_GetValue(void *instance,
71 // fprintf(stderr, "Called NP_GetValue with variable: %i\n", variable);
75 case NPPVpluginNameString:
76 *((char **)value) = "GSS-web Plugin\0";
78 case NPPVpluginDescriptionString:
79 *((char **)value) = "This plugin facilitates identification of you and authorization to access web resources using GSS-EAP, a standards-compliant mechanism for establishing an identity and access rights within a sophisticated organization.\0";
82 return NPERR_GENERIC_ERROR;
85 return NPERR_NO_ERROR;
88 NPError NPP_GetValue(NPP instance,
94 case NPPVpluginScriptableNPObject:
95 fprintf(stderr, "Received the scriptable object call!\n");
96 //value = NPN_CreateObject(instance, )
99 fprintf(stderr, "Called NPP_GetValue with %i.\n", variable);
100 return NPERR_NO_ERROR;