Profanity C Plugin API
profapi.h
Go to the documentation of this file.
1 
12 typedef char* PROF_WIN_TAG;
13 
15 typedef void(*CMD_CB)(char **args);
16 
18 typedef void(*TIMED_CB)(void);
19 
21 typedef void(*WINDOW_CB)(PROF_WIN_TAG win, char *line);
22 
24 void prof_cons_alert(void);
25 
31 int prof_cons_show(const char * const message);
32 
42 int prof_cons_show_themed(const char *const group, const char *const item, const char *const def, const char *const message);
43 
49 int prof_cons_bad_cmd_usage(const char *const cmd);
50 
63 void prof_register_command(const char *command_name, int min_args, int max_args,
64  char **synopsis, const char *description, char *arguments[][2], char **examples,
65  CMD_CB callback);
66 
72 void prof_register_timed(TIMED_CB callback, int interval_seconds);
73 
79 void prof_completer_add(const char *key, char **items);
80 
87 void prof_completer_remove(const char *key, char **items);
88 
94 void prof_completer_clear(const char *key);
95 
101 void prof_filepath_completer_add(const char *prefix);
102 
109 void prof_notify(const char *message, int timeout_ms, const char *category);
110 
115 void prof_send_line(char *line);
116 
121 char* prof_get_current_recipient(void);
122 
127 char* prof_get_current_muc(void);
128 
134 
139 char* prof_get_current_nick(void);
140 
145 char** prof_get_current_occupants(void);
146 
152 char* prof_get_room_nick(const char *barejid);
153 
158 void prof_log_debug(const char *message);
159 
164 void prof_log_info(const char *message);
165 
170 void prof_log_warning(const char *message);
171 
176 void prof_log_error(const char *message);
177 
183 void prof_win_create(PROF_WIN_TAG win, WINDOW_CB input_handler);
184 
191 
198 
205 int prof_win_show(PROF_WIN_TAG win, char *message);
206 
217 int prof_win_show_themed(PROF_WIN_TAG tag, char *group, char *key, char *def, char *message);
218 
224 int prof_send_stanza(char *stanza);
225 
234 int prof_settings_boolean_get(char *group, char *key, int def);
235 
243 void prof_settings_boolean_set(char *group, char *key, int value);
244 
253 char* prof_settings_string_get(char *group, char *key, char *def);
254 
262 void prof_settings_string_set(char *group, char *key, char *value);
263 
272 char** prof_settings_string_list_get(char *group, char *key);
273 
282 void prof_settings_string_list_add(char *group, char *key, char *value);
283 
292 int prof_settings_string_list_remove(char *group, char *key, char *value);
293 
301 int prof_settings_string_list_clear(char *group, char *key);
302 
311 int prof_settings_int_get(char *group, char *key, int def);
312 
320 void prof_settings_int_set(char *group, char *key, int value);
321 
328 void prof_incoming_message(char *barejid, char *resource, char *message);
329 
335 void prof_disco_add_feature(char *feature);
336 
341 void prof_encryption_reset(char *barejid);
342 
349 int prof_chat_set_titlebar_enctext(char *barejid, char *enctext);
350 
356 int prof_chat_unset_titlebar_enctext(char *barejid);
357 
364 int prof_chat_set_incoming_char(char *barejid, char *ch);
365 
371 int prof_chat_unset_incoming_char(char *barejid);
372 
379 int prof_chat_set_outgoing_char(char *barejid, char *ch);
380 
386 int prof_chat_unset_outgoing_char(char *barejid);
387 
394 int prof_room_set_titlebar_enctext(char *roomjid, char *enctext);
395 
401 int prof_room_unset_titlebar_enctext(char *roomjid);
402 
409 int prof_room_set_message_char(char *roomjid, char *ch);
410 
416 int prof_room_unset_message_char(char *roomjid);
417 
424 int prof_chat_show(char *barejid, char *message);
425 
437 int prof_chat_show_themed(char *barejid, char *group, char *item, char *def, char *ch, char *message);
438 
445 int prof_room_show(char *roomjid, char *message);
446 
458 int prof_room_show_themed(char *roomjid, char *group, char *item, char *def, char *ch, char *message);
void prof_settings_int_set(char *group, char *key, int value)
char * PROF_WIN_TAG
Definition: profapi.h:12
void prof_completer_remove(const char *key, char **items)
void prof_log_warning(const char *message)
void prof_settings_string_list_add(char *group, char *key, char *value)
int prof_chat_unset_outgoing_char(char *barejid)
void prof_register_timed(TIMED_CB callback, int interval_seconds)
void prof_log_debug(const char *message)
int prof_room_show(char *roomjid, char *message)
char * prof_get_room_nick(const char *barejid)
int prof_chat_show_themed(char *barejid, char *group, char *item, char *def, char *ch, char *message)
void(* WINDOW_CB)(PROF_WIN_TAG win, char *line)
Definition: profapi.h:21
char * prof_settings_string_get(char *group, char *key, char *def)
int prof_chat_unset_incoming_char(char *barejid)
void prof_filepath_completer_add(const char *prefix)
int prof_room_show_themed(char *roomjid, char *group, char *item, char *def, char *ch, char *message)
int prof_settings_boolean_get(char *group, char *key, int def)
char ** prof_settings_string_list_get(char *group, char *key)
int prof_chat_show(char *barejid, char *message)
void(* TIMED_CB)(void)
Definition: profapi.h:18
int prof_room_set_titlebar_enctext(char *roomjid, char *enctext)
int prof_chat_unset_titlebar_enctext(char *barejid)
void prof_completer_add(const char *key, char **items)
void prof_win_create(PROF_WIN_TAG win, WINDOW_CB input_handler)
char * prof_get_current_nick(void)
void prof_incoming_message(char *barejid, char *resource, char *message)
int prof_settings_string_list_clear(char *group, char *key)
void prof_completer_clear(const char *key)
void prof_send_line(char *line)
char ** prof_get_current_occupants(void)
void prof_disco_add_feature(char *feature)
int prof_cons_show_themed(const char *const group, const char *const item, const char *const def, const char *const message)
int prof_win_exists(PROF_WIN_TAG win)
int prof_settings_int_get(char *group, char *key, int def)
char * prof_get_current_recipient(void)
void(* CMD_CB)(char **args)
Definition: profapi.h:15
int prof_chat_set_incoming_char(char *barejid, char *ch)
int prof_current_win_is_console(void)
int prof_win_focus(PROF_WIN_TAG win)
int prof_win_show_themed(PROF_WIN_TAG tag, char *group, char *key, char *def, char *message)
void prof_register_command(const char *command_name, int min_args, int max_args, char **synopsis, const char *description, char *arguments[][2], char **examples, CMD_CB callback)
void prof_log_error(const char *message)
int prof_send_stanza(char *stanza)
void prof_notify(const char *message, int timeout_ms, const char *category)
char * prof_get_current_muc(void)
int prof_cons_bad_cmd_usage(const char *const cmd)
int prof_settings_string_list_remove(char *group, char *key, char *value)
int prof_room_unset_message_char(char *roomjid)
void prof_log_info(const char *message)
int prof_win_show(PROF_WIN_TAG win, char *message)
void prof_cons_alert(void)
void prof_settings_boolean_set(char *group, char *key, int value)
int prof_room_set_message_char(char *roomjid, char *ch)
int prof_cons_show(const char *const message)
int prof_chat_set_outgoing_char(char *barejid, char *ch)
int prof_chat_set_titlebar_enctext(char *barejid, char *enctext)
void prof_settings_string_set(char *group, char *key, char *value)
void prof_encryption_reset(char *barejid)
int prof_room_unset_titlebar_enctext(char *roomjid)