2 * (C) Copyright 2009 ZeXx86 (zexx86@gmail.com)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 void Log (const char *, ...);
27 #define pdof(x) ((pluginData *) (x->pdata))
29 typedef struct pluginData_t
{
39 void (*swapbuffers
) (struct pluginData_t
*);
40 void (*getsize
) (struct pluginData_t
*, int *, int *); /* TODO */
45 /* html tag parameters */
50 void (*handle_newstream
) (struct pluginData_t
*, NPStream
*);
51 void (*handle_destroystream
) (struct pluginData_t
*, NPStream
*);
52 void (*handle_write
) (struct pluginData_t
*, NPStream
*, int32
, int32
, void *);
55 void glugin_proc (pluginData
*pd
);
58 //op number, unsigned int
59 #define gln_new_stream 1 /* stream * */
60 #define gln_stream_data 2 /* stream *, data offset, data size, data */
61 #define gln_destroy_stream 3 /* stream * */
62 #define gln_request_get 4 /* url size, url */
63 #define gln_request_post 5 /* url size, data size, url, data */
65 void host_newstream (pluginData
*, NPStream
*);
66 void host_destroystream (pluginData
*, NPStream
*);
67 void host_write (pluginData
*, NPStream
*, int32
, int32
, void *);
68 void host_read_guest_requests (pluginData
*);
69 void guest_read_host_requests (pluginData
*);
71 extern int plugin_action (pluginData
*pd
);