2 * Copyright (c) 2013 <copyright holder> <email>
4 * For license details, see the LICENSE file in the root of this project.
8 #include "npapiplugin.h"
11 NPAPIPlugin::NPAPIPlugin(NPNetscapeFuncs *aNPNFuncs, NPPluginFuncs *pFuncs)
14 * Setup - Ensure a sane environment
17 pFuncs->size < sizeof(NPNetscapeFuncs) )
18 return NPERR_INVALID_FUNCTABLE_ERROR;
20 if(HIBYTE(pFuncs->version) > NP_VERSION_MAJOR)
21 return NPERR_INCOMPATIBLE_VERSION_ERROR;
25 * Tell the browser about the API functions we implement
27 pFuncs->newp = NPP_New;
28 pFuncs->destroy = NPP_Destroy;
29 pFuncs->getvalue = NPP_GetValue;
31 return NPERR_NO_ERROR;
35 NPAPIPlugin::~NPAPIPlugin(NPP instance, NPSavedData **save)
42 * Create and destroy an instance of the plugin
44 NPError NPAPIPlugin::NPP_New(NPMIMEType pluginType,
45 NPP instance, uint16_t mode,
46 int16_t argc, char *argn[],
47 char *argv[], NPSavedData *saved)
49 return(NPERR_NO_ERROR);
52 NPError NPAPIPlugin::NPP_Destroy(NPP instance, NPSavedData **save)
54 return(NPERR_NO_ERROR);
57 NPError NPAPIPlugin::NPP_GetValue(NPP instance,
63 case NPPVpluginScriptableNPObject:
64 cerr << "Received the scriptable object call!\n";
65 //value = NPN_CreateObject(instance, )
68 cerr << "Called NPP_GetValue with " << variable << ".\n";
69 return NPERR_NO_ERROR;