summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 6e49a7d..f3715c7 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -36,8 +36,9 @@
*
*/
-
-
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include <sys/types.h>
#include <sys/wait.h>
@@ -69,6 +70,7 @@
#include "npapi.h"
#include "plugin.h"
+#include "plugin-exports.h"
/* define LOG to write debug messages to /tmp/kaffeine_plugin.log */
@@ -139,6 +141,7 @@ static void xprintf (const char *format, ...) {
#endif
}
+PLUGIN_EXPORT
char *NPP_GetMIMEDescription(void) {
xprintf("NPP_GetMIMEDescription:\n");
@@ -166,6 +169,7 @@ char *NPP_GetMIMEDescription(void) {
;
}
+PLUGIN_EXPORT
NPError NPP_GetValue(void *future, NPPVariable variable, void *value){
NPError err = NPERR_NO_ERROR;
@@ -185,6 +189,7 @@ NPError NPP_GetValue(void *future, NPPVariable variable, void *value){
return err;
}
+PLUGIN_EXPORT
NPError NPP_Initialize(void) {
xprintf("NPP_Initialize:\n");
@@ -200,11 +205,13 @@ NPError NPP_Initialize(void) {
}
+PLUGIN_EXPORT
void * NPP_GetJavaClass() {
xprintf("NPP_GetJavaClass:\n");
return NULL;
}
+PLUGIN_EXPORT
void NPP_Shutdown(void) {
xprintf("NPP_Shutdown:\n");
}
@@ -317,6 +324,7 @@ static void got_url (const char *url_) {
}
+PLUGIN_EXPORT
NPError NPP_New(NPMIMEType pluginType, NPP instance,
uint16 mode,
int16 argc, char* argn[], char* argv[],
@@ -378,6 +386,7 @@ NPError NPP_New(NPMIMEType pluginType, NPP instance,
}
+PLUGIN_EXPORT
NPError NPP_SetWindow(NPP instance, NPWindow* window) {
plugin_instance_t* this;
@@ -438,6 +447,7 @@ NPError NPP_SetWindow(NPP instance, NPWindow* window) {
return NPERR_NO_ERROR;
}
+PLUGIN_EXPORT
NPError NPP_Destroy(NPP instance, NPSavedData** save) {
plugin_instance_t* this;
@@ -463,6 +473,7 @@ NPError NPP_Destroy(NPP instance, NPSavedData** save) {
}
+PLUGIN_EXPORT
NPError NPP_NewStream (NPP instance,
NPMIMEType type,
NPStream *stream,
@@ -516,6 +527,7 @@ int32 STREAMBUFSIZE = 0X0FFFFFFF; /* If we are reading from a file in NPAsFile
* mode so we can take any size stream in our
* write call (since we ignore it) */
+PLUGIN_EXPORT
int32 NPP_WriteReady(NPP instance, NPStream *stream) {
plugin_instance_t* this;
@@ -527,6 +539,7 @@ int32 NPP_WriteReady(NPP instance, NPStream *stream) {
}
+PLUGIN_EXPORT
int32 NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer) {
xprintf("NPP_Write:\n");
@@ -540,6 +553,7 @@ int32 NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *b
}
+PLUGIN_EXPORT
NPError NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason) {
plugin_instance_t* this;
@@ -553,6 +567,7 @@ NPError NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason) {
}
+PLUGIN_EXPORT
void NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname) {
plugin_instance_t* this;
@@ -563,6 +578,7 @@ void NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname) {
}
+PLUGIN_EXPORT
void NPP_Print(NPP instance, NPPrint* printInfo) {
xprintf("NPP_Print:\n");
@@ -572,6 +588,7 @@ void NPP_Print(NPP instance, NPPrint* printInfo) {
xprintf("NPP_Print: Not implemented. \n");
}
+PLUGIN_EXPORT
int16 NPP_HandleEvent(NPP instance, void* ev) {
xprintf("NPP_HandleEvent\n");