|
|
@ -36,8 +36,9 @@
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/wait.h>
|
|
|
|
#include <sys/wait.h>
|
|
|
@ -69,6 +70,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
#include "npapi.h"
|
|
|
|
#include "npapi.h"
|
|
|
|
#include "plugin.h"
|
|
|
|
#include "plugin.h"
|
|
|
|
|
|
|
|
#include "plugin-exports.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* define LOG to write debug messages to /tmp/kaffeine_plugin.log */
|
|
|
|
/* define LOG to write debug messages to /tmp/kaffeine_plugin.log */
|
|
|
@ -139,6 +141,7 @@ static void xprintf (const char *format, ...) {
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PLUGIN_EXPORT
|
|
|
|
char *NPP_GetMIMEDescription(void) {
|
|
|
|
char *NPP_GetMIMEDescription(void) {
|
|
|
|
|
|
|
|
|
|
|
|
xprintf("NPP_GetMIMEDescription:\n");
|
|
|
|
xprintf("NPP_GetMIMEDescription:\n");
|
|
|
@ -166,6 +169,7 @@ char *NPP_GetMIMEDescription(void) {
|
|
|
|
;
|
|
|
|
;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PLUGIN_EXPORT
|
|
|
|
NPError NPP_GetValue(void *future, NPPVariable variable, void *value){
|
|
|
|
NPError NPP_GetValue(void *future, NPPVariable variable, void *value){
|
|
|
|
|
|
|
|
|
|
|
|
NPError err = NPERR_NO_ERROR;
|
|
|
|
NPError err = NPERR_NO_ERROR;
|
|
|
@ -185,6 +189,7 @@ NPError NPP_GetValue(void *future, NPPVariable variable, void *value){
|
|
|
|
return err;
|
|
|
|
return err;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PLUGIN_EXPORT
|
|
|
|
NPError NPP_Initialize(void) {
|
|
|
|
NPError NPP_Initialize(void) {
|
|
|
|
|
|
|
|
|
|
|
|
xprintf("NPP_Initialize:\n");
|
|
|
|
xprintf("NPP_Initialize:\n");
|
|
|
@ -200,11 +205,13 @@ NPError NPP_Initialize(void) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PLUGIN_EXPORT
|
|
|
|
void * NPP_GetJavaClass() {
|
|
|
|
void * NPP_GetJavaClass() {
|
|
|
|
xprintf("NPP_GetJavaClass:\n");
|
|
|
|
xprintf("NPP_GetJavaClass:\n");
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PLUGIN_EXPORT
|
|
|
|
void NPP_Shutdown(void) {
|
|
|
|
void NPP_Shutdown(void) {
|
|
|
|
xprintf("NPP_Shutdown:\n");
|
|
|
|
xprintf("NPP_Shutdown:\n");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -317,6 +324,7 @@ static void got_url (const char *url_) {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PLUGIN_EXPORT
|
|
|
|
NPError NPP_New(NPMIMEType pluginType, NPP instance,
|
|
|
|
NPError NPP_New(NPMIMEType pluginType, NPP instance,
|
|
|
|
uint16 mode,
|
|
|
|
uint16 mode,
|
|
|
|
int16 argc, char* argn[], char* argv[],
|
|
|
|
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) {
|
|
|
|
NPError NPP_SetWindow(NPP instance, NPWindow* window) {
|
|
|
|
|
|
|
|
|
|
|
|
plugin_instance_t* this;
|
|
|
|
plugin_instance_t* this;
|
|
|
@ -438,6 +447,7 @@ NPError NPP_SetWindow(NPP instance, NPWindow* window) {
|
|
|
|
return NPERR_NO_ERROR;
|
|
|
|
return NPERR_NO_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PLUGIN_EXPORT
|
|
|
|
NPError NPP_Destroy(NPP instance, NPSavedData** save) {
|
|
|
|
NPError NPP_Destroy(NPP instance, NPSavedData** save) {
|
|
|
|
|
|
|
|
|
|
|
|
plugin_instance_t* this;
|
|
|
|
plugin_instance_t* this;
|
|
|
@ -463,6 +473,7 @@ NPError NPP_Destroy(NPP instance, NPSavedData** save) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PLUGIN_EXPORT
|
|
|
|
NPError NPP_NewStream (NPP instance,
|
|
|
|
NPError NPP_NewStream (NPP instance,
|
|
|
|
NPMIMEType type,
|
|
|
|
NPMIMEType type,
|
|
|
|
NPStream *stream,
|
|
|
|
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
|
|
|
|
* mode so we can take any size stream in our
|
|
|
|
* write call (since we ignore it) */
|
|
|
|
* write call (since we ignore it) */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PLUGIN_EXPORT
|
|
|
|
int32 NPP_WriteReady(NPP instance, NPStream *stream) {
|
|
|
|
int32 NPP_WriteReady(NPP instance, NPStream *stream) {
|
|
|
|
|
|
|
|
|
|
|
|
plugin_instance_t* this;
|
|
|
|
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) {
|
|
|
|
int32 NPP_Write(NPP instance, NPStream *stream, int32 offset, int32 len, void *buffer) {
|
|
|
|
|
|
|
|
|
|
|
|
xprintf("NPP_Write:\n");
|
|
|
|
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) {
|
|
|
|
NPError NPP_DestroyStream(NPP instance, NPStream *stream, NPError reason) {
|
|
|
|
|
|
|
|
|
|
|
|
plugin_instance_t* this;
|
|
|
|
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) {
|
|
|
|
void NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname) {
|
|
|
|
|
|
|
|
|
|
|
|
plugin_instance_t* this;
|
|
|
|
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) {
|
|
|
|
void NPP_Print(NPP instance, NPPrint* printInfo) {
|
|
|
|
|
|
|
|
|
|
|
|
xprintf("NPP_Print:\n");
|
|
|
|
xprintf("NPP_Print:\n");
|
|
|
@ -572,6 +588,7 @@ void NPP_Print(NPP instance, NPPrint* printInfo) {
|
|
|
|
xprintf("NPP_Print: Not implemented. \n");
|
|
|
|
xprintf("NPP_Print: Not implemented. \n");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PLUGIN_EXPORT
|
|
|
|
int16 NPP_HandleEvent(NPP instance, void* ev) {
|
|
|
|
int16 NPP_HandleEvent(NPP instance, void* ev) {
|
|
|
|
|
|
|
|
|
|
|
|
xprintf("NPP_HandleEvent\n");
|
|
|
|
xprintf("NPP_HandleEvent\n");
|
|
|
|