99 |
char *description; /* plugin description */ |
char *description; /* plugin description */ |
100 |
char *version; /* plugin version */ |
char *version; /* plugin version */ |
101 |
|
|
102 |
|
/* plugin handlers */ |
103 |
|
t_plugin_msg_handler *msg_handlers; /* IRC message handlers */ |
104 |
|
t_plugin_msg_handler *last_msg_handler; |
105 |
|
t_plugin_cmd_handler *cmd_handlers; /* command handlers */ |
106 |
|
t_plugin_cmd_handler *last_cmd_handler; |
107 |
|
|
108 |
|
/* links to previous/next plugins */ |
109 |
|
t_weechat_plugin *prev_plugin; /* link to previous plugin */ |
110 |
|
t_weechat_plugin *next_plugin; /* link to next plugin */ |
111 |
|
|
112 |
/* plugin functions (interface) */ |
/* plugin functions (interface) */ |
113 |
|
|
114 |
|
/* IMPORTANT NOTE for WeeChat developers: always add new interface functions |
115 |
|
at the END of functions, for keeping backward compatibility with |
116 |
|
existing plugins */ |
117 |
|
|
118 |
|
int (*ascii_strcasecmp) (t_weechat_plugin *, char *, char *); |
119 |
|
char **(*explode_string) (t_weechat_plugin *, char *, char *, int, int *); |
120 |
|
void (*free_exploded_string) (t_weechat_plugin *, char **); |
121 |
int (*mkdir_home) (t_weechat_plugin *, char *); |
int (*mkdir_home) (t_weechat_plugin *, char *); |
122 |
void (*exec_on_files) (t_weechat_plugin *, char *, |
void (*exec_on_files) (t_weechat_plugin *, char *, |
123 |
int (*)(t_weechat_plugin *, char *)); |
int (*)(t_weechat_plugin *, char *)); |
124 |
|
|
125 |
t_plugin_msg_handler *(*msg_handler_add) (t_weechat_plugin *, char *, |
t_plugin_msg_handler *(*msg_handler_add) (t_weechat_plugin *, char *, |
126 |
t_plugin_handler_func *, |
t_plugin_handler_func *, |
127 |
char *, void *); |
char *, void *); |
133 |
char *, void *); |
char *, void *); |
134 |
void (*cmd_handler_remove) (t_weechat_plugin *, t_plugin_cmd_handler *); |
void (*cmd_handler_remove) (t_weechat_plugin *, t_plugin_cmd_handler *); |
135 |
void (*cmd_handler_remove_all) (t_weechat_plugin *); |
void (*cmd_handler_remove_all) (t_weechat_plugin *); |
136 |
|
|
137 |
void (*printf) (t_weechat_plugin *, char *, char *, char *, ...); |
void (*printf) (t_weechat_plugin *, char *, char *, char *, ...); |
138 |
void (*printf_server) (t_weechat_plugin *, char *, ...); |
void (*printf_server) (t_weechat_plugin *, char *, ...); |
139 |
void (*infobar_printf) (t_weechat_plugin *, int, char *, ...); |
void (*infobar_printf) (t_weechat_plugin *, int, char *, ...); |
140 |
|
|
141 |
void (*exec_command) (t_weechat_plugin *, char *, char *, char *); |
void (*exec_command) (t_weechat_plugin *, char *, char *, char *); |
142 |
char *(*get_info) (t_weechat_plugin *, char *, char *, char *); |
char *(*get_info) (t_weechat_plugin *, char *, char *, char *); |
143 |
t_plugin_dcc_info *(*get_dcc_info) (t_weechat_plugin *); |
t_plugin_dcc_info *(*get_dcc_info) (t_weechat_plugin *); |
144 |
void (*free_dcc_info) (t_weechat_plugin *, t_plugin_dcc_info *); |
void (*free_dcc_info) (t_weechat_plugin *, t_plugin_dcc_info *); |
|
char **(*explode_string) (t_weechat_plugin *, char *, char *, int, int *); |
|
|
void (*free_exploded_string) (t_weechat_plugin *, char **); |
|
|
int (*ascii_strcasecmp) (t_weechat_plugin *, char *, char *); |
|
145 |
|
|
146 |
/* plugin handlers */ |
char *(*get_config) (t_weechat_plugin *, char *); |
147 |
t_plugin_msg_handler *msg_handlers; /* IRC message handlers */ |
|
148 |
t_plugin_msg_handler *last_msg_handler; |
/* WeeChat developers: ALWAYS add new functions at the end */ |
|
t_plugin_cmd_handler *cmd_handlers; /* command handlers */ |
|
|
t_plugin_cmd_handler *last_cmd_handler; |
|
|
|
|
|
/* links to previous/next plugins */ |
|
|
t_weechat_plugin *prev_plugin; /* link to previous plugin */ |
|
|
t_weechat_plugin *next_plugin; /* link to next plugin */ |
|
149 |
}; |
}; |
150 |
|
|
151 |
|
/* general useful functions */ |
152 |
|
extern int weechat_ascii_strcasecmp (t_weechat_plugin *,char *, char *); |
153 |
|
extern char **weechat_explode_string (t_weechat_plugin *, char *, char *, int, int *); |
154 |
|
extern void weechat_free_exploded_string (t_weechat_plugin *, char **); |
155 |
extern int weechat_plugin_mkdir_home (t_weechat_plugin *, char *); |
extern int weechat_plugin_mkdir_home (t_weechat_plugin *, char *); |
156 |
extern void weechat_plugin_exec_on_files (t_weechat_plugin *, char *, |
extern void weechat_plugin_exec_on_files (t_weechat_plugin *, char *, |
157 |
int (*)(t_weechat_plugin *, char *)); |
int (*)(t_weechat_plugin *, char *)); |
158 |
|
|
159 |
|
/* handler functions */ |
160 |
extern t_plugin_msg_handler *weechat_plugin_msg_handler_add (t_weechat_plugin *, char *, |
extern t_plugin_msg_handler *weechat_plugin_msg_handler_add (t_weechat_plugin *, char *, |
161 |
t_plugin_handler_func *, |
t_plugin_handler_func *, |
162 |
char *, void *); |
char *, void *); |
168 |
char *, void *); |
char *, void *); |
169 |
extern void weechat_plugin_cmd_handler_remove (t_weechat_plugin *, t_plugin_cmd_handler *); |
extern void weechat_plugin_cmd_handler_remove (t_weechat_plugin *, t_plugin_cmd_handler *); |
170 |
extern void weechat_plugin_cmd_handler_remove_all (t_weechat_plugin *); |
extern void weechat_plugin_cmd_handler_remove_all (t_weechat_plugin *); |
171 |
|
|
172 |
|
/* display functions */ |
173 |
extern void weechat_plugin_printf (t_weechat_plugin *, char *, char *, char *, ...); |
extern void weechat_plugin_printf (t_weechat_plugin *, char *, char *, char *, ...); |
174 |
extern void weechat_plugin_printf_server (t_weechat_plugin *, char *, ...); |
extern void weechat_plugin_printf_server (t_weechat_plugin *, char *, ...); |
175 |
extern void weechat_plugin_infobar_printf (t_weechat_plugin *, int, char *, ...); |
extern void weechat_plugin_infobar_printf (t_weechat_plugin *, int, char *, ...); |
176 |
|
|
177 |
|
/* IRC functions */ |
178 |
extern void weechat_plugin_exec_command (t_weechat_plugin *, char *, char *, char *); |
extern void weechat_plugin_exec_command (t_weechat_plugin *, char *, char *, char *); |
179 |
extern char *weechat_plugin_get_info (t_weechat_plugin *, char *, char *, char *); |
extern char *weechat_plugin_get_info (t_weechat_plugin *, char *, char *, char *); |
180 |
extern t_plugin_dcc_info *weechat_plugin_get_dcc_info (t_weechat_plugin *); |
extern t_plugin_dcc_info *weechat_plugin_get_dcc_info (t_weechat_plugin *); |
181 |
extern void weechat_plugin_free_dcc_info (t_weechat_plugin *, t_plugin_dcc_info *); |
extern void weechat_plugin_free_dcc_info (t_weechat_plugin *, t_plugin_dcc_info *); |
182 |
extern char **weechat_explode_string (t_weechat_plugin *, char *, char *, int, int *); |
|
183 |
extern void weechat_free_exploded_string (t_weechat_plugin *, char **); |
/* other functions */ |
184 |
extern int weechat_ascii_strcasecmp (t_weechat_plugin *,char *, char *); |
extern char *weechat_plugin_get_config (t_weechat_plugin *, char *); |
185 |
|
|
186 |
#endif /* weechat-plugin.h */ |
#endif /* weechat-plugin.h */ |