1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Merge branch 'master' into osx-functional

This commit is contained in:
James Booth 2015-10-26 01:05:31 +00:00
commit 67d57ba908
85 changed files with 1948 additions and 2006 deletions

View File

@ -46,8 +46,8 @@
static GHashTable *sessions; static GHashTable *sessions;
static void static void
_chat_session_new(const char * const barejid, const char * const resource, _chat_session_new(const char *const barejid, const char *const resource, gboolean resource_override,
gboolean resource_override, gboolean send_states) gboolean send_states)
{ {
assert(barejid != NULL); assert(barejid != NULL);
assert(resource != NULL); assert(resource != NULL);

View File

@ -51,8 +51,7 @@ void chat_sessions_clear(void);
void chat_session_resource_override(const char *const barejid, const char *const resource); void chat_session_resource_override(const char *const barejid, const char *const resource);
ChatSession* chat_session_get(const char *const barejid); ChatSession* chat_session_get(const char *const barejid);
void chat_session_recipient_active(const char * const barejid, const char * const resource, void chat_session_recipient_active(const char *const barejid, const char *const resource, gboolean send_states);
gboolean send_states);
void chat_session_recipient_typing(const char *const barejid, const char *const resource); void chat_session_recipient_typing(const char *const barejid, const char *const resource);
void chat_session_recipient_paused(const char *const barejid, const char *const resource); void chat_session_recipient_paused(const char *const barejid, const char *const resource);
void chat_session_recipient_gone(const char *const barejid, const char *const resource); void chat_session_recipient_gone(const char *const barejid, const char *const resource);

View File

@ -76,7 +76,6 @@ static void _update_presence(const resource_presence_t presence,
const char *const show, gchar **args); const char *const show, gchar **args);
static gboolean _cmd_set_boolean_preference(gchar *arg, const char *const command, static gboolean _cmd_set_boolean_preference(gchar *arg, const char *const command,
const char *const display, preference_t pref); const char *const display, preference_t pref);
//static void _cmd_show_filtered_help(char *heading, gchar *cmd_filter[], int filter_size);
static void _who_room(ProfWin *window, const char *const command, gchar **args); static void _who_room(ProfWin *window, const char *const command, gchar **args);
static void _who_roster(ProfWin *window, const char *const command, gchar **args); static void _who_roster(ProfWin *window, const char *const command, gchar **args);
@ -2064,7 +2063,6 @@ cmd_info(ProfWin *window, const char * const command, gchar **args)
char *usr = args[0]; char *usr = args[0];
jabber_conn_status_t conn_status = jabber_get_connection_status(); jabber_conn_status_t conn_status = jabber_get_connection_status();
PContact pcontact = NULL;
if (conn_status != JABBER_CONNECTED) { if (conn_status != JABBER_CONNECTED) {
cons_show("You are not currently connected."); cons_show("You are not currently connected.");
@ -2127,7 +2125,7 @@ cmd_info(ProfWin *window, const char * const command, gchar **args)
if (usr_jid == NULL) { if (usr_jid == NULL) {
usr_jid = usr; usr_jid = usr;
} }
pcontact = roster_get_contact(usr_jid); PContact pcontact = roster_get_contact(usr_jid);
if (pcontact) { if (pcontact) {
cons_show_info(pcontact); cons_show_info(pcontact);
} else { } else {
@ -2148,7 +2146,6 @@ gboolean
cmd_caps(ProfWin *window, const char *const command, gchar **args) cmd_caps(ProfWin *window, const char *const command, gchar **args)
{ {
jabber_conn_status_t conn_status = jabber_get_connection_status(); jabber_conn_status_t conn_status = jabber_get_connection_status();
PContact pcontact = NULL;
Occupant *occupant = NULL; Occupant *occupant = NULL;
if (conn_status != JABBER_CONNECTED) { if (conn_status != JABBER_CONNECTED) {
@ -2182,7 +2179,7 @@ cmd_caps(ProfWin *window, const char * const command, gchar **args)
if (jid->fulljid == NULL) { if (jid->fulljid == NULL) {
cons_show("You must provide a full jid to the /caps command."); cons_show("You must provide a full jid to the /caps command.");
} else { } else {
pcontact = roster_get_contact(jid->barejid); PContact pcontact = roster_get_contact(jid->barejid);
if (pcontact == NULL) { if (pcontact == NULL) {
cons_show("Contact not found in roster: %s", jid->barejid); cons_show("Contact not found in roster: %s", jid->barejid);
} else { } else {
@ -2225,7 +2222,6 @@ gboolean
cmd_software(ProfWin *window, const char *const command, gchar **args) cmd_software(ProfWin *window, const char *const command, gchar **args)
{ {
jabber_conn_status_t conn_status = jabber_get_connection_status(); jabber_conn_status_t conn_status = jabber_get_connection_status();
Occupant *occupant = NULL;
if (conn_status != JABBER_CONNECTED) { if (conn_status != JABBER_CONNECTED) {
cons_show("You are not currently connected."); cons_show("You are not currently connected.");
@ -2238,7 +2234,7 @@ cmd_software(ProfWin *window, const char * const command, gchar **args)
if (args[0]) { if (args[0]) {
ProfMucWin *mucwin = (ProfMucWin*)window; ProfMucWin *mucwin = (ProfMucWin*)window;
assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK); assert(mucwin->memcheck == PROFMUCWIN_MEMCHECK);
occupant = muc_roster_item(mucwin->roomjid, args[0]); Occupant *occupant = muc_roster_item(mucwin->roomjid, args[0]);
if (occupant) { if (occupant) {
Jid *jid = jid_create_from_bare_and_resource(mucwin->roomjid, args[0]); Jid *jid = jid_create_from_bare_and_resource(mucwin->roomjid, args[0]);
iq_send_software_version(jid->fulljid); iq_send_software_version(jid->fulljid);

View File

@ -310,7 +310,7 @@ prof_getline(FILE *stream)
} }
char* char*
release_get_latest() release_get_latest(void)
{ {
char *url = "http://www.profanity.im/profanity_version.txt"; char *url = "http://www.profanity.im/profanity_version.txt";
@ -644,3 +644,21 @@ strip_arg_quotes(const char * const input)
return unquoted; return unquoted;
} }
gboolean
is_notify_enabled(void)
{
gboolean notify_enabled = FALSE;
#ifdef HAVE_OSXNOTIFY
notify_enabled = TRUE;
#endif
#ifdef HAVE_LIBNOTIFY
notify_enabled = TRUE;
#endif
#ifdef PLATFORM_CYGWIN
notify_enabled = TRUE;
#endif
return notify_enabled;
}

View File

@ -102,8 +102,7 @@ gboolean p_hash_table_contains(GHashTable *hash_table, gconstpointer key);
gboolean create_dir(char *name); gboolean create_dir(char *name);
gboolean mkdir_recursive(const char *dir); gboolean mkdir_recursive(const char *dir);
char * str_replace(const char *string, const char *substr, char* str_replace(const char *string, const char *substr, const char *replacement);
const char *replacement);
gboolean str_contains_str(const char *const searchstr, const char *const substr); gboolean str_contains_str(const char *const searchstr, const char *const substr);
int str_contains(const char str[], int size, char ch); int str_contains(const char str[], int size, char ch);
gboolean strtoi_range(char *str, int *saveptr, int min, int max, char **err_msg); gboolean strtoi_range(char *str, int *saveptr, int min, int max, char **err_msg);
@ -128,5 +127,6 @@ int get_next_available_win_num(GList *used);
char* get_file_or_linked(char *loc, char *basedir); char* get_file_or_linked(char *loc, char *basedir);
char* strip_arg_quotes(const char *const input); char* strip_arg_quotes(const char *const input);
gboolean is_notify_enabled(void);
#endif #endif

View File

@ -263,7 +263,8 @@ prefs_set_max_log_size(gint value)
_save_prefs(); _save_prefs();
} }
gint prefs_get_inpblock(void) gint
prefs_get_inpblock(void)
{ {
int val = g_key_file_get_integer(prefs, PREF_GROUP_UI, "inpblock", NULL); int val = g_key_file_get_integer(prefs, PREF_GROUP_UI, "inpblock", NULL);
if (val == 0) { if (val == 0) {
@ -273,7 +274,8 @@ gint prefs_get_inpblock(void)
} }
} }
void prefs_set_inpblock(gint value) void
prefs_set_inpblock(gint value)
{ {
g_key_file_set_integer(prefs, PREF_GROUP_UI, "inpblock", value); g_key_file_set_integer(prefs, PREF_GROUP_UI, "inpblock", value);
_save_prefs(); _save_prefs();

View File

@ -40,9 +40,8 @@
typedef struct p_contact_t *PContact; typedef struct p_contact_t *PContact;
PContact p_contact_new(const char * const barejid, const char * const name, PContact p_contact_new(const char *const barejid, const char *const name, GSList *groups,
GSList *groups, const char * const subscription, const char *const subscription, const char *const offline_message, gboolean pending_out);
const char * const offline_message, gboolean pending_out);
void p_contact_add_resource(PContact contact, Resource *resource); void p_contact_add_resource(PContact contact, Resource *resource);
gboolean p_contact_remove_resource(PContact contact, const char *const resource); gboolean p_contact_remove_resource(PContact contact, const char *const resource);
void p_contact_free(PContact contact); void p_contact_free(PContact contact);

View File

@ -133,8 +133,7 @@ sv_ev_room_invite(jabber_invite_t invite_type,
} }
void void
sv_ev_room_broadcast(const char *const room_jid, sv_ev_room_broadcast(const char *const room_jid, const char *const message)
const char * const message)
{ {
if (muc_roster_complete(room_jid)) { if (muc_roster_complete(room_jid)) {
ui_room_broadcast(room_jid, message); ui_room_broadcast(room_jid, message);

View File

@ -43,8 +43,7 @@ void sv_ev_failed_login(void);
void sv_ev_room_invite(jabber_invite_t invite_type, void sv_ev_room_invite(jabber_invite_t invite_type,
const char *const invitor, const char *const room, const char *const invitor, const char *const room,
const char *const reason, const char *const password); const char *const reason, const char *const password);
void sv_ev_room_broadcast(const char *const room_jid, void sv_ev_room_broadcast(const char *const room_jid, const char *const message);
const char * const message);
void sv_ev_room_subject(const char *const room, const char *const nick, const char *const subject); void sv_ev_room_subject(const char *const room, const char *const nick, const char *const subject);
void sv_ev_room_history(const char *const room_jid, const char *const nick, void sv_ev_room_history(const char *const room_jid, const char *const nick,
GDateTime *timestamp, const char *const message); GDateTime *timestamp, const char *const message);

View File

@ -82,16 +82,15 @@ static struct dated_chat_log * _create_log(const char * const other, const char
static struct dated_chat_log* _create_groupchat_log(char *room, const char *const login); static struct dated_chat_log* _create_groupchat_log(char *room, const char *const login);
static void _free_chat_log(struct dated_chat_log *dated_log); static void _free_chat_log(struct dated_chat_log *dated_log);
static gboolean _key_equals(void *key1, void *key2); static gboolean _key_equals(void *key1, void *key2);
static char * _get_log_filename(const char * const other, const char * const login, static char* _get_log_filename(const char *const other, const char *const login, GDateTime *dt, gboolean create);
GDateTime *dt, gboolean create); static char* _get_groupchat_log_filename(const char *const room, const char *const login, GDateTime *dt,
static char * _get_groupchat_log_filename(const char * const room, gboolean create);
const char * const login, GDateTime *dt, gboolean create);
static gchar* _get_chatlog_dir(void); static gchar* _get_chatlog_dir(void);
static gchar* _get_main_log_file(void); static gchar* _get_main_log_file(void);
static void _rotate_log_file(void); static void _rotate_log_file(void);
static char* _log_string_from_level(log_level_t level); static char* _log_string_from_level(log_level_t level);
static void _chat_log_chat(const char * const login, const char * const other, static void _chat_log_chat(const char *const login, const char *const other, const gchar *const msg,
const gchar * const msg, chat_log_direction_t direction, GDateTime *timestamp); chat_log_direction_t direction, GDateTime *timestamp);
void void
log_debug(const char *const msg, ...) log_debug(const char *const msg, ...)
@ -353,8 +352,8 @@ chat_log_msg_in(const char * const barejid, const char * const msg, GDateTime *t
} }
static void static void
_chat_log_chat(const char * const login, const char * const other, _chat_log_chat(const char *const login, const char *const other, const char *const msg,
const char * const msg, chat_log_direction_t direction, GDateTime *timestamp) chat_log_direction_t direction, GDateTime *timestamp)
{ {
struct dated_chat_log *dated_log = g_hash_table_lookup(logs, other); struct dated_chat_log *dated_log = g_hash_table_lookup(logs, other);
@ -404,8 +403,7 @@ _chat_log_chat(const char * const login, const char * const other,
} }
void void
groupchat_log_chat(const gchar * const login, const gchar * const room, groupchat_log_chat(const gchar *const login, const gchar *const room, const gchar *const nick, const gchar *const msg)
const gchar * const nick, const gchar * const msg)
{ {
gchar *room_copy = strdup(room); gchar *room_copy = strdup(room);
struct dated_chat_log *dated_log = g_hash_table_lookup(groupchat_logs, room_copy); struct dated_chat_log *dated_log = g_hash_table_lookup(groupchat_logs, room_copy);
@ -572,8 +570,7 @@ gboolean _key_equals(void *key1, void *key2)
} }
static char* static char*
_get_log_filename(const char * const other, const char * const login, _get_log_filename(const char *const other, const char *const login, GDateTime *dt, gboolean create)
GDateTime *dt, gboolean create)
{ {
gchar *chatlogs_dir = _get_chatlog_dir(); gchar *chatlogs_dir = _get_chatlog_dir();
GString *log_file = g_string_new(chatlogs_dir); GString *log_file = g_string_new(chatlogs_dir);
@ -604,8 +601,7 @@ _get_log_filename(const char * const other, const char * const login,
} }
static char* static char*
_get_groupchat_log_filename(const char * const room, const char * const login, _get_groupchat_log_filename(const char *const room, const char *const login, GDateTime *dt, gboolean create)
GDateTime *dt, gboolean create)
{ {
gchar *chatlogs_dir = _get_chatlog_dir(); gchar *chatlogs_dir = _get_chatlog_dir();
GString *log_file = g_string_new(chatlogs_dir); GString *log_file = g_string_new(chatlogs_dir);

View File

@ -59,8 +59,7 @@ void log_debug(const char * const msg, ...);
void log_info(const char *const msg, ...); void log_info(const char *const msg, ...);
void log_warning(const char *const msg, ...); void log_warning(const char *const msg, ...);
void log_error(const char *const msg, ...); void log_error(const char *const msg, ...);
void log_msg(log_level_t level, const char * const area, void log_msg(log_level_t level, const char *const area, const char *const msg);
const char * const msg);
log_level_t log_level_from_string(char *log_level); log_level_t log_level_from_string(char *log_level);
void log_stderr_init(log_level_t level); void log_stderr_init(log_level_t level);
@ -78,10 +77,10 @@ void chat_log_otr_msg_in(const char * const barejid, const char * const msg, gbo
void chat_log_pgp_msg_in(const char *const barejid, const char *const msg, GDateTime *timestamp); void chat_log_pgp_msg_in(const char *const barejid, const char *const msg, GDateTime *timestamp);
void chat_log_close(void); void chat_log_close(void);
GSList * chat_log_get_previous(const gchar * const login, GSList* chat_log_get_previous(const gchar *const login, const gchar *const recipient);
const gchar * const recipient);
void groupchat_log_init(void); void groupchat_log_init(void);
void groupchat_log_chat(const gchar * const login, const gchar * const room, void groupchat_log_chat(const gchar *const login, const gchar *const room, const gchar *const nick,
const gchar * const nick, const gchar * const msg); const gchar *const msg);
#endif #endif

View File

@ -40,6 +40,7 @@
#endif #endif
#include "profanity.h" #include "profanity.h"
#include "common.h"
#include "command/command.h" #include "command/command.h"
static gboolean version = FALSE; static gboolean version = FALSE;
@ -103,18 +104,7 @@ main(int argc, char **argv)
g_print("XMPP library: libstrophe\n"); g_print("XMPP library: libstrophe\n");
#endif #endif
gboolean notify_enabled = FALSE; if (is_notify_enabled()) {
#ifdef HAVE_OSXNOTIFY
notify_enabled = TRUE;
#endif
#ifdef HAVE_LIBNOTIFY
notify_enabled = TRUE;
#endif
#ifdef PLATFORM_CYGWIN
notify_enabled = TRUE;
#endif
if (notify_enabled) {
g_print("Desktop notification support: Enabled\n"); g_print("Desktop notification support: Enabled\n");
} else { } else {
g_print("Desktop notification support: Disabled\n"); g_print("Desktop notification support: Disabled\n");

View File

@ -76,8 +76,8 @@ static muc_role_t _role_from_string(const char * const role);
static muc_affiliation_t _affiliation_from_string(const char *const affiliation); static muc_affiliation_t _affiliation_from_string(const char *const affiliation);
static char* _role_to_string(muc_role_t role); static char* _role_to_string(muc_role_t role);
static char* _affiliation_to_string(muc_affiliation_t affiliation); static char* _affiliation_to_string(muc_affiliation_t affiliation);
static Occupant* _muc_occupant_new(const char *const nick, const char * const jid, static Occupant* _muc_occupant_new(const char *const nick, const char *const jid, muc_role_t role,
muc_role_t role, muc_affiliation_t affiliation, resource_presence_t presence, const char * const status); muc_affiliation_t affiliation, resource_presence_t presence, const char *const status);
static void _occupant_free(Occupant *occupant); static void _occupant_free(Occupant *occupant);
void void
@ -172,8 +172,7 @@ muc_invites_clear(void)
} }
void void
muc_join(const char * const room, const char * const nick, muc_join(const char *const room, const char *const nick, const char *const password, gboolean autojoin)
const char * const password, gboolean autojoin)
{ {
ChatRoom *new_room = malloc(sizeof(ChatRoom)); ChatRoom *new_room = malloc(sizeof(ChatRoom));
new_room->room = strdup(room); new_room->room = strdup(room);
@ -425,8 +424,8 @@ muc_roster_contains_nick(const char * const room, const char * const nick)
* Add a new chat room member to the room's roster * Add a new chat room member to the room's roster
*/ */
gboolean gboolean
muc_roster_add(const char * const room, const char * const nick, const char * const jid, muc_roster_add(const char *const room, const char *const nick, const char *const jid, const char *const role,
const char * const role, const char * const affiliation, const char * const show, const char * const status) const char *const affiliation, const char *const show, const char *const status)
{ {
ChatRoom *chat_room = g_hash_table_lookup(rooms, room); ChatRoom *chat_room = g_hash_table_lookup(rooms, room);
gboolean updated = FALSE; gboolean updated = FALSE;
@ -631,8 +630,7 @@ muc_occupants_by_affiliation(const char * const room, muc_affiliation_t affiliat
* is in progress * is in progress
*/ */
void void
muc_occupant_nick_change_start(const char * const room, muc_occupant_nick_change_start(const char *const room, const char *const new_nick, const char *const old_nick)
const char * const new_nick, const char * const old_nick)
{ {
ChatRoom *chat_room = g_hash_table_lookup(rooms, room); ChatRoom *chat_room = g_hash_table_lookup(rooms, room);
if (chat_room) { if (chat_room) {
@ -648,8 +646,7 @@ muc_occupant_nick_change_start(const char * const room,
* the caller * the caller
*/ */
char* char*
muc_roster_nick_change_complete(const char * const room, muc_roster_nick_change_complete(const char *const room, const char *const nick)
const char * const nick)
{ {
ChatRoom *chat_room = g_hash_table_lookup(rooms, room); ChatRoom *chat_room = g_hash_table_lookup(rooms, room);
if (chat_room) { if (chat_room) {
@ -832,8 +829,8 @@ _free_room(ChatRoom *room)
} }
} }
static static gint
gint _compare_occupants(Occupant *a, Occupant *b) _compare_occupants(Occupant *a, Occupant *b)
{ {
const char * utf8_str_a = a->nick_collate_key; const char * utf8_str_a = a->nick_collate_key;
const char * utf8_str_b = b->nick_collate_key; const char * utf8_str_b = b->nick_collate_key;
@ -937,8 +934,8 @@ _affiliation_to_string(muc_affiliation_t affiliation)
} }
static Occupant* static Occupant*
_muc_occupant_new(const char *const nick, const char * const jid, muc_role_t role, muc_affiliation_t affiliation, resource_presence_t presence, _muc_occupant_new(const char *const nick, const char *const jid, muc_role_t role, muc_affiliation_t affiliation,
const char * const status) resource_presence_t presence, const char *const status)
{ {
Occupant *occupant = malloc(sizeof(Occupant)); Occupant *occupant = malloc(sizeof(Occupant));

View File

@ -96,9 +96,8 @@ char* muc_old_nick(const char * const room, const char * const new_nick);
gboolean muc_roster_contains_nick(const char *const room, const char *const nick); gboolean muc_roster_contains_nick(const char *const room, const char *const nick);
gboolean muc_roster_complete(const char *const room); gboolean muc_roster_complete(const char *const room);
gboolean muc_roster_add(const char * const room, const char * const nick, const char * const jid, gboolean muc_roster_add(const char *const room, const char *const nick, const char *const jid, const char *const role,
const char * const role, const char * const affiliation, const char * const show, const char *const affiliation, const char *const show, const char *const status);
const char * const status);
void muc_roster_remove(const char *const room, const char *const nick); void muc_roster_remove(const char *const room, const char *const nick);
void muc_roster_set_complete(const char *const room); void muc_roster_set_complete(const char *const room);
GList* muc_roster(const char *const room); GList* muc_roster(const char *const room);

View File

@ -78,8 +78,7 @@ otrlib_start_query(void)
} }
static const char* static const char*
cb_otr_error_message(void *opdata, ConnContext *context, cb_otr_error_message(void *opdata, ConnContext *context, OtrlErrorCode err_code)
OtrlErrorCode err_code)
{ {
switch(err_code) switch(err_code)
{ {

View File

@ -71,5 +71,4 @@ char* p_gpg_autocomplete_key(const char * const search_str);
void p_gpg_autocomplete_key_reset(void); void p_gpg_autocomplete_key_reset(void);
char* p_gpg_format_fp_str(char *fp); char* p_gpg_format_fp_str(char *fp);
#endif #endif

View File

@ -177,7 +177,7 @@ _connect_default(const char * const account)
} }
static void static void
_check_autoaway() _check_autoaway(void)
{ {
jabber_conn_status_t conn_status = jabber_get_connection_status(); jabber_conn_status_t conn_status = jabber_get_connection_status();
if (conn_status != JABBER_CONNECTED) { if (conn_status != JABBER_CONNECTED) {

View File

@ -39,8 +39,8 @@
#include <common.h> #include <common.h>
#include <resource.h> #include <resource.h>
Resource * resource_new(const char * const name, resource_presence_t presence, Resource*
const char * const status, const int priority) resource_new(const char *const name, resource_presence_t presence, const char *const status, const int priority)
{ {
assert(name != NULL); assert(name != NULL);
Resource *new_resource = malloc(sizeof(struct resource_t)); Resource *new_resource = malloc(sizeof(struct resource_t));
@ -86,7 +86,8 @@ resource_compare_availability(Resource *first, Resource *second)
} }
} }
void resource_destroy(Resource *resource) void
resource_destroy(Resource *resource)
{ {
if (resource) { if (resource) {
free(resource->name); free(resource->name);

View File

@ -44,10 +44,9 @@ typedef struct resource_t {
int priority; int priority;
} Resource; } Resource;
Resource * resource_new(const char * const name, resource_presence_t presence, Resource* resource_new(const char *const name, resource_presence_t presence, const char *const status,
const char * const status, const int priority); const int priority);
void resource_destroy(Resource *resource); void resource_destroy(Resource *resource);
int resource_compare_availability(Resource *first, Resource *second); int resource_compare_availability(Resource *first, Resource *second);
#endif #endif

View File

@ -64,10 +64,8 @@ static GHashTable *name_to_barejid;
static gboolean _key_equals(void *key1, void *key2); static gboolean _key_equals(void *key1, void *key2);
static gboolean _datetimes_equal(GDateTime *dt1, GDateTime *dt2); static gboolean _datetimes_equal(GDateTime *dt1, GDateTime *dt2);
static void _replace_name(const char * const current_name, static void _replace_name(const char *const current_name, const char *const new_name, const char *const barejid);
const char * const new_name, const char * const barejid); static void _add_name_and_barejid(const char *const name, const char *const barejid);
static void _add_name_and_barejid(const char * const name,
const char * const barejid);
static gint _compare_contacts(PContact a, PContact b); static gint _compare_contacts(PContact a, PContact b);
void void
@ -86,8 +84,7 @@ roster_clear(void)
} }
gboolean gboolean
roster_update_presence(const char * const barejid, Resource *resource, roster_update_presence(const char *const barejid, Resource *resource, GDateTime *last_activity)
GDateTime *last_activity)
{ {
assert(barejid != NULL); assert(barejid != NULL);
assert(resource != NULL); assert(resource != NULL);
@ -145,8 +142,7 @@ roster_get_msg_display_name(const char * const barejid, const char * const resou
} }
gboolean gboolean
roster_contact_offline(const char * const barejid, roster_contact_offline(const char *const barejid, const char *const resource, const char *const status)
const char * const resource, const char * const status)
{ {
PContact contact = roster_get_contact(barejid); PContact contact = roster_get_contact(barejid);
@ -241,8 +237,8 @@ roster_remove(const char * const name, const char * const barejid)
} }
void void
roster_update(const char * const barejid, const char * const name, roster_update(const char *const barejid, const char *const name, GSList *groups, const char *const subscription,
GSList *groups, const char * const subscription, gboolean pending_out) gboolean pending_out)
{ {
PContact contact = roster_get_contact(barejid); PContact contact = roster_get_contact(barejid);
assert(contact != NULL); assert(contact != NULL);
@ -268,8 +264,8 @@ roster_update(const char * const barejid, const char * const name,
} }
gboolean gboolean
roster_add(const char * const barejid, const char * const name, GSList *groups, roster_add(const char *const barejid, const char *const name, GSList *groups, const char *const subscription,
const char * const subscription, gboolean pending_out) gboolean pending_out)
{ {
PContact contact = roster_get_contact(barejid); PContact contact = roster_get_contact(barejid);
if (contact) { if (contact) {
@ -449,8 +445,8 @@ roster_barejid_autocomplete(const char * const search_str)
return autocomplete_complete(barejid_ac, search_str, TRUE); return autocomplete_complete(barejid_ac, search_str, TRUE);
} }
static static gboolean
gboolean _key_equals(void *key1, void *key2) _key_equals(void *key1, void *key2)
{ {
gchar *str1 = (gchar *) key1; gchar *str1 = (gchar *) key1;
gchar *str2 = (gchar *) key2; gchar *str2 = (gchar *) key2;
@ -473,8 +469,7 @@ _datetimes_equal(GDateTime *dt1, GDateTime *dt2)
} }
static void static void
_replace_name(const char * const current_name, const char * const new_name, _replace_name(const char *const current_name, const char *const new_name, const char *const barejid)
const char * const barejid)
{ {
// current handle exists already // current handle exists already
if (current_name) { if (current_name) {
@ -501,8 +496,8 @@ _add_name_and_barejid(const char * const name, const char * const barejid)
} }
} }
static static gint
gint _compare_contacts(PContact a, PContact b) _compare_contacts(PContact a, PContact b)
{ {
const char * utf8_str_a = NULL; const char * utf8_str_a = NULL;
const char * utf8_str_b = NULL; const char * utf8_str_b = NULL;

View File

@ -41,20 +41,18 @@
#include "contact.h" #include "contact.h"
void roster_clear(void); void roster_clear(void);
gboolean roster_update_presence(const char * const barejid, Resource *resource, gboolean roster_update_presence(const char *const barejid, Resource *resource, GDateTime *last_activity);
GDateTime *last_activity);
PContact roster_get_contact(const char *const barejid); PContact roster_get_contact(const char *const barejid);
gboolean roster_contact_offline(const char * const barejid, gboolean roster_contact_offline(const char *const barejid, const char *const resource, const char *const status);
const char * const resource, const char * const status);
void roster_reset_search_attempts(void); void roster_reset_search_attempts(void);
void roster_init(void); void roster_init(void);
void roster_free(void); void roster_free(void);
void roster_change_name(PContact contact, const char *const new_name); void roster_change_name(PContact contact, const char *const new_name);
void roster_remove(const char *const name, const char *const barejid); void roster_remove(const char *const name, const char *const barejid);
void roster_update(const char * const barejid, const char * const name, void roster_update(const char *const barejid, const char *const name, GSList *groups, const char *const subscription,
GSList *groups, const char * const subscription, gboolean pending_out); gboolean pending_out);
gboolean roster_add(const char * const barejid, const char * const name, GSList *groups, gboolean roster_add(const char *const barejid, const char *const name, GSList *groups, const char *const subscription,
const char * const subscription, gboolean pending_out); gboolean pending_out);
char* roster_barejid_from_name(const char *const name); char* roster_barejid_from_name(const char *const name);
GSList* roster_get_contacts(void); GSList* roster_get_contacts(void);
GSList* roster_get_contacts_online(void); GSList* roster_get_contacts_online(void);

View File

@ -58,7 +58,7 @@ struct prof_buff_t {
static void _free_entry(ProfBuffEntry *entry); static void _free_entry(ProfBuffEntry *entry);
ProfBuff ProfBuff
buffer_create() buffer_create(void)
{ {
ProfBuff new_buff = malloc(sizeof(struct prof_buff_t)); ProfBuff new_buff = malloc(sizeof(struct prof_buff_t));
new_buff->entries = NULL; new_buff->entries = NULL;

View File

@ -66,5 +66,4 @@ int buffer_size(ProfBuff buffer);
ProfBuffEntry* buffer_yield_entry(ProfBuff buffer, int entry); ProfBuffEntry* buffer_yield_entry(ProfBuff buffer, int entry);
gboolean buffer_mark_received(ProfBuff buffer, const char *const id); gboolean buffer_mark_received(ProfBuff buffer, const char *const id);
#endif #endif

View File

@ -1170,18 +1170,7 @@ cons_show_ui_prefs(void)
void void
cons_notify_setting(void) cons_notify_setting(void)
{ {
gboolean notify_enabled = FALSE; if (is_notify_enabled()) {
#ifdef HAVE_OSXNOTIFY
notify_enabled = TRUE;
#endif
#ifdef HAVE_LIBNOTIFY
notify_enabled = TRUE;
#endif
#ifdef PLATFORM_CYGWIN
notify_enabled = TRUE;
#endif
if (notify_enabled) {
if (prefs_get_boolean(PREF_NOTIFY_MESSAGE)) if (prefs_get_boolean(PREF_NOTIFY_MESSAGE))
cons_show("Messages (/notify message) : ON"); cons_show("Messages (/notify message) : ON");
else else

View File

@ -2586,12 +2586,9 @@ ui_handle_room_configuration_form_error(const char * const roomjid, const char *
void void
ui_handle_room_config_submit_result(const char *const roomjid) ui_handle_room_config_submit_result(const char *const roomjid)
{ {
ProfWin *muc_window = NULL;
ProfWin *form_window = NULL;
int num;
if (roomjid) { if (roomjid) {
muc_window = (ProfWin*)wins_get_muc(roomjid); ProfWin *form_window = NULL;
ProfWin *muc_window = (ProfWin*)wins_get_muc(roomjid);
GString *form_recipient = g_string_new(roomjid); GString *form_recipient = g_string_new(roomjid);
g_string_append(form_recipient, " config"); g_string_append(form_recipient, " config");
@ -2599,7 +2596,7 @@ ui_handle_room_config_submit_result(const char * const roomjid)
g_string_free(form_recipient, TRUE); g_string_free(form_recipient, TRUE);
if (form_window) { if (form_window) {
num = wins_get_num(form_window); int num = wins_get_num(form_window);
wins_close_by_num(num); wins_close_by_num(num);
} }
@ -2620,10 +2617,9 @@ void
ui_handle_room_config_submit_result_error(const char *const roomjid, const char *const message) ui_handle_room_config_submit_result_error(const char *const roomjid, const char *const message)
{ {
ProfWin *console = wins_get_console(); ProfWin *console = wins_get_console();
if (roomjid) {
ProfWin *muc_window = NULL; ProfWin *muc_window = NULL;
ProfWin *form_window = NULL; ProfWin *form_window = NULL;
if (roomjid) {
muc_window = (ProfWin*)wins_get_muc(roomjid); muc_window = (ProfWin*)wins_get_muc(roomjid);
GString *form_recipient = g_string_new(roomjid); GString *form_recipient = g_string_new(roomjid);
@ -2903,4 +2899,3 @@ _win_show_history(ProfChatWin *chatwin, const char * const contact)
g_slist_free_full(history, free); g_slist_free_full(history, free);
} }
} }

View File

@ -195,8 +195,7 @@ notify_remind(void)
} }
static void static void
_notify(const char * const message, int timeout, _notify(const char *const message, int timeout, const char *const category)
const char * const category)
{ {
#ifdef HAVE_LIBNOTIFY #ifdef HAVE_LIBNOTIFY
log_debug("Attempting notification: %s", message); log_debug("Attempting notification: %s", message);

View File

@ -471,12 +471,12 @@ win_clear(ProfWin *window)
void void
win_resize(ProfWin *window) win_resize(ProfWin *window)
{ {
int subwin_cols = 0;
int cols = getmaxx(stdscr); int cols = getmaxx(stdscr);
if (window->layout->type == LAYOUT_SPLIT) { if (window->layout->type == LAYOUT_SPLIT) {
ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout; ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout;
if (layout->subwin) { if (layout->subwin) {
int subwin_cols = 0;
if (window->type == WIN_CONSOLE) { if (window->type == WIN_CONSOLE) {
subwin_cols = win_roster_cols(); subwin_cols = win_roster_cols();
} else if (window->type == WIN_MUC) { } else if (window->type == WIN_MUC) {
@ -506,11 +506,11 @@ win_update_virtual(ProfWin *window)
{ {
int rows, cols; int rows, cols;
getmaxyx(stdscr, rows, cols); getmaxyx(stdscr, rows, cols);
int subwin_cols = 0;
if (window->layout->type == LAYOUT_SPLIT) { if (window->layout->type == LAYOUT_SPLIT) {
ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout; ProfLayoutSplit *layout = (ProfLayoutSplit*)window->layout;
if (layout->subwin) { if (layout->subwin) {
int subwin_cols = 0;
if (window->type == WIN_MUC) { if (window->type == WIN_MUC) {
subwin_cols = win_occpuants_cols(); subwin_cols = win_occpuants_cols();
} else { } else {
@ -905,6 +905,7 @@ win_vprint(ProfWin *window, const char show_char, int pad_indent, GDateTime *tim
g_string_vprintf(fmt_msg, message, arg); g_string_vprintf(fmt_msg, message, arg);
win_print(window, show_char, pad_indent, timestamp, flags, theme_item, from, fmt_msg->str); win_print(window, show_char, pad_indent, timestamp, flags, theme_item, from, fmt_msg->str);
g_string_free(fmt_msg, TRUE); g_string_free(fmt_msg, TRUE);
va_end(arg);
} }
void void

View File

@ -150,7 +150,7 @@ iq_room_list_request(gchar *conferencejid)
} }
void void
iq_enable_carbons() iq_enable_carbons(void)
{ {
xmpp_conn_t * const conn = connection_get_conn(); xmpp_conn_t * const conn = connection_get_conn();
xmpp_ctx_t * const ctx = connection_get_ctx(); xmpp_ctx_t * const ctx = connection_get_ctx();
@ -164,7 +164,7 @@ iq_enable_carbons()
} }
void void
iq_disable_carbons() iq_disable_carbons(void)
{ {
xmpp_conn_t * const conn = connection_get_conn(); xmpp_conn_t * const conn = connection_get_conn();
xmpp_ctx_t * const ctx = connection_get_ctx(); xmpp_ctx_t * const ctx = connection_get_ctx();
@ -1264,7 +1264,8 @@ _room_config_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
return 0; return 0;
} }
static int _room_affiliation_set_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, static int
_room_affiliation_set_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza,
void *const userdata) void *const userdata)
{ {
const char *id = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_ID); const char *id = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_ID);
@ -1293,7 +1294,8 @@ static int _room_affiliation_set_result_handler(xmpp_conn_t * const conn, xmpp_s
return 0; return 0;
} }
static int _room_role_set_result_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, static int
_room_role_set_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza,
void *const userdata) void *const userdata)
{ {
const char *id = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_ID); const char *id = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_ID);

View File

@ -62,23 +62,15 @@
static Autocomplete sub_requests_ac; static Autocomplete sub_requests_ac;
#define HANDLE(ns, type, func) xmpp_handler_add(conn, func, ns, \ #define HANDLE(ns, type, func) xmpp_handler_add(conn, func, ns, STANZA_NAME_PRESENCE, type, ctx)
STANZA_NAME_PRESENCE, type, ctx)
static int _unavailable_handler(xmpp_conn_t * const conn, static int _unavailable_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
xmpp_stanza_t * const stanza, void * const userdata); static int _subscribe_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
static int _subscribe_handler(xmpp_conn_t * const conn, static int _subscribed_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
xmpp_stanza_t * const stanza, void * const userdata); static int _unsubscribed_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
static int _subscribed_handler(xmpp_conn_t * const conn, static int _available_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
xmpp_stanza_t * const stanza, void * const userdata); static int _muc_user_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
static int _unsubscribed_handler(xmpp_conn_t * const conn, static int _presence_error_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
xmpp_stanza_t * const stanza, void * const userdata);
static int _available_handler(xmpp_conn_t * const conn,
xmpp_stanza_t * const stanza, void * const userdata);
static int _muc_user_handler(xmpp_conn_t * const conn,
xmpp_stanza_t * const stanza, void * const userdata);
static int _presence_error_handler(xmpp_conn_t * const conn,
xmpp_stanza_t * const stanza, void * const userdata);
void _send_caps_request(char *node, char *caps_key, char *id, char *from); void _send_caps_request(char *node, char *caps_key, char *id, char *from);
static void _send_room_presence(xmpp_conn_t *conn, xmpp_stanza_t *presence); static void _send_room_presence(xmpp_conn_t *conn, xmpp_stanza_t *presence);

View File

@ -60,8 +60,7 @@
#include "xmpp/stanza.h" #include "xmpp/stanza.h"
#include "xmpp/xmpp.h" #include "xmpp/xmpp.h"
#define HANDLE(type, func) xmpp_handler_add(conn, func, XMPP_NS_ROSTER, \ #define HANDLE(type, func) xmpp_handler_add(conn, func, XMPP_NS_ROSTER, STANZA_NAME_IQ, type, ctx)
STANZA_NAME_IQ, type, ctx)
// callback data for group commands // callback data for group commands
typedef struct _group_data { typedef struct _group_data {
@ -70,18 +69,12 @@ typedef struct _group_data {
} GroupData; } GroupData;
// event handlers // event handlers
static int _roster_set_handler(xmpp_conn_t * const conn, static int _roster_set_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
xmpp_stanza_t * const stanza, void * const userdata); static int _roster_result_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
static int _roster_result_handler(xmpp_conn_t * const conn,
xmpp_stanza_t * const stanza, void * const userdata);
// id handlers // id handlers
static int static int _group_add_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
_group_add_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza, static int _group_remove_handler(xmpp_conn_t *const conn, xmpp_stanza_t *const stanza, void *const userdata);
void * const userdata);
static int
_group_remove_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
void * const userdata);
// helper functions // helper functions
GSList* _get_groups_from_item(xmpp_stanza_t *item); GSList* _get_groups_from_item(xmpp_stanza_t *item);

View File

@ -207,7 +207,8 @@ stanza_create_bookmarks_pubsub_add(xmpp_ctx_t *ctx, const char * const jid,
#endif #endif
xmpp_stanza_t* xmpp_stanza_t*
stanza_enable_carbons(xmpp_ctx_t *ctx){ stanza_enable_carbons(xmpp_ctx_t *ctx)
{
xmpp_stanza_t *iq = xmpp_stanza_new(ctx); xmpp_stanza_t *iq = xmpp_stanza_new(ctx);
char *id = create_unique_id("carbons"); char *id = create_unique_id("carbons");
@ -227,7 +228,8 @@ stanza_enable_carbons(xmpp_ctx_t *ctx){
} }
xmpp_stanza_t* xmpp_stanza_t*
stanza_disable_carbons(xmpp_ctx_t *ctx){ stanza_disable_carbons(xmpp_ctx_t *ctx)
{
xmpp_stanza_t *iq = xmpp_stanza_new(ctx); xmpp_stanza_t *iq = xmpp_stanza_new(ctx);
char *id = create_unique_id("carbons"); char *id = create_unique_id("carbons");

View File

@ -246,16 +246,11 @@ gboolean stanza_is_room_nick_change(xmpp_stanza_t * const stanza);
gboolean stanza_muc_requires_config(xmpp_stanza_t *const stanza); gboolean stanza_muc_requires_config(xmpp_stanza_t *const stanza);
char* stanza_get_new_nick(xmpp_stanza_t *const stanza); char* stanza_get_new_nick(xmpp_stanza_t *const stanza);
xmpp_stanza_t* stanza_create_instant_room_request_iq(xmpp_ctx_t *ctx, xmpp_stanza_t* stanza_create_instant_room_request_iq(xmpp_ctx_t *ctx, const char *const room_jid);
const char * const room_jid); xmpp_stanza_t* stanza_create_instant_room_destroy_iq(xmpp_ctx_t *ctx, const char *const room_jid);
xmpp_stanza_t* stanza_create_instant_room_destroy_iq(xmpp_ctx_t *ctx, xmpp_stanza_t* stanza_create_room_config_request_iq(xmpp_ctx_t *ctx, const char *const room_jid);
const char * const room_jid); xmpp_stanza_t* stanza_create_room_config_cancel_iq(xmpp_ctx_t *ctx, const char *const room_jid);
xmpp_stanza_t* stanza_create_room_config_request_iq(xmpp_ctx_t *ctx, xmpp_stanza_t* stanza_create_room_config_submit_iq(xmpp_ctx_t *ctx, const char *const room, DataForm *form);
const char * const room_jid);
xmpp_stanza_t* stanza_create_room_config_cancel_iq(xmpp_ctx_t *ctx,
const char * const room_jid);
xmpp_stanza_t* stanza_create_room_config_submit_iq(xmpp_ctx_t *ctx,
const char * const room, DataForm *form);
xmpp_stanza_t* stanza_create_room_affiliation_list_iq(xmpp_ctx_t *ctx, const char *const room, xmpp_stanza_t* stanza_create_room_affiliation_list_iq(xmpp_ctx_t *ctx, const char *const room,
const char *const affiliation); const char *const affiliation);
xmpp_stanza_t* stanza_create_room_affiliation_set_iq(xmpp_ctx_t *ctx, const char *const room, const char *const jid, xmpp_stanza_t* stanza_create_room_affiliation_set_iq(xmpp_ctx_t *ctx, const char *const room, const char *const jid,
@ -274,28 +269,22 @@ char * stanza_get_caps_str(xmpp_stanza_t * const stanza);
DataForm* stanza_create_form(xmpp_stanza_t *const stanza); DataForm* stanza_create_form(xmpp_stanza_t *const stanza);
void stanza_destroy_form(DataForm *form); void stanza_destroy_form(DataForm *form);
void stanza_attach_priority(xmpp_ctx_t * const ctx, void stanza_attach_priority(xmpp_ctx_t *const ctx, xmpp_stanza_t *const presence, const int pri);
xmpp_stanza_t * const presence, const int pri); void stanza_attach_last_activity(xmpp_ctx_t *const ctx, xmpp_stanza_t *const presence, const int idle);
void stanza_attach_last_activity(xmpp_ctx_t * const ctx,
xmpp_stanza_t * const presence, const int idle);
void stanza_attach_caps(xmpp_ctx_t *const ctx, xmpp_stanza_t *const presence); void stanza_attach_caps(xmpp_ctx_t *const ctx, xmpp_stanza_t *const presence);
void stanza_attach_show(xmpp_ctx_t * const ctx, xmpp_stanza_t * const presence, void stanza_attach_show(xmpp_ctx_t *const ctx, xmpp_stanza_t *const presence, const char *const show);
const char * const show); void stanza_attach_status(xmpp_ctx_t *const ctx, xmpp_stanza_t *const presence, const char *const status);
void stanza_attach_status(xmpp_ctx_t * const ctx, xmpp_stanza_t * const presence,
const char * const status);
const char* stanza_get_presence_string_from_type(resource_presence_t presence_type); const char* stanza_get_presence_string_from_type(resource_presence_t presence_type);
xmpp_stanza_t* stanza_create_software_version_iq(xmpp_ctx_t *ctx, const char *const fulljid); xmpp_stanza_t* stanza_create_software_version_iq(xmpp_ctx_t *ctx, const char *const fulljid);
xmpp_stanza_t * stanza_create_disco_items_iq(xmpp_ctx_t *ctx, const char * const id, xmpp_stanza_t* stanza_create_disco_items_iq(xmpp_ctx_t *ctx, const char *const id, const char *const jid);
const char * const jid);
char* stanza_get_status(xmpp_stanza_t *stanza, char *def); char* stanza_get_status(xmpp_stanza_t *stanza, char *def);
char* stanza_get_show(xmpp_stanza_t *stanza, char *def); char* stanza_get_show(xmpp_stanza_t *stanza, char *def);
xmpp_stanza_t * stanza_create_roster_set(xmpp_ctx_t *ctx, const char * const id, xmpp_stanza_t* stanza_create_roster_set(xmpp_ctx_t *ctx, const char *const id, const char *const jid,
const char * const jid, const char * const handle, GSList *groups); const char *const handle, GSList *groups);
xmpp_stanza_t * stanza_create_roster_remove_set(xmpp_ctx_t *ctx, xmpp_stanza_t* stanza_create_roster_remove_set(xmpp_ctx_t *ctx, const char *const barejid);
const char * const barejid);
char* stanza_get_error_message(xmpp_stanza_t *const stanza); char* stanza_get_error_message(xmpp_stanza_t *const stanza);

View File

@ -138,8 +138,8 @@ typedef struct data_form_t {
// connection functions // connection functions
void jabber_init(void); void jabber_init(void);
jabber_conn_status_t jabber_connect_with_details(const char * const jid, jabber_conn_status_t jabber_connect_with_details(const char *const jid, const char *const passwd,
const char * const passwd, const char * const altdomain, const int port, const char *const tls_policy); const char *const altdomain, const int port, const char *const tls_policy);
jabber_conn_status_t jabber_connect_with_account(const ProfAccount *const account); jabber_conn_status_t jabber_connect_with_account(const ProfAccount *const account);
void jabber_disconnect(void); void jabber_disconnect(void);
void jabber_shutdown(void); void jabber_shutdown(void);
@ -166,8 +166,7 @@ void message_send_composing(const char * const jid);
void message_send_paused(const char *const jid); void message_send_paused(const char *const jid);
void message_send_gone(const char *const jid); void message_send_gone(const char *const jid);
void message_send_invite(const char * const room, const char * const contact, void message_send_invite(const char *const room, const char *const contact, const char *const reason);
const char * const reason);
// presence functions // presence functions
void presence_subscription(const char *const jid, const jabber_subscr_t action); void presence_subscription(const char *const jid, const jabber_subscr_t action);
@ -182,8 +181,8 @@ void presence_send(resource_presence_t status, const char * const msg, int idle,
gboolean presence_sub_request_exists(const char *const bare_jid); gboolean presence_sub_request_exists(const char *const bare_jid);
// iq functions // iq functions
void iq_enable_carbons(); void iq_enable_carbons(void);
void iq_disable_carbons(); void iq_disable_carbons(void);
void iq_send_software_version(const char *const fulljid); void iq_send_software_version(const char *const fulljid);
void iq_room_list_request(gchar *conferencejid); void iq_room_list_request(gchar *conferencejid);
void iq_disco_info_request(gchar *jid); void iq_disco_info_request(gchar *jid);
@ -196,19 +195,17 @@ void iq_request_room_config_form(const char * const room_jid);
void iq_submit_room_config(const char *const room, DataForm *form); void iq_submit_room_config(const char *const room, DataForm *form);
void iq_room_config_cancel(const char *const room_jid); void iq_room_config_cancel(const char *const room_jid);
void iq_send_ping(const char *const target); void iq_send_ping(const char *const target);
void iq_send_caps_request(const char * const to, const char * const id, void iq_send_caps_request(const char *const to, const char *const id, const char *const node, const char *const ver);
const char * const node, const char * const ver); void iq_send_caps_request_for_jid(const char *const to, const char *const id, const char *const node,
void iq_send_caps_request_for_jid(const char * const to, const char * const id, const char *const ver);
const char * const node, const char * const ver); void iq_send_caps_request_legacy(const char *const to, const char *const id, const char *const node,
void iq_send_caps_request_legacy(const char * const to, const char * const id, const char *const ver);
const char * const node, const char * const ver);
void iq_room_info_request(const char *const room, gboolean display_result); void iq_room_info_request(const char *const room, gboolean display_result);
void iq_room_affiliation_list(const char *const room, char *affiliation); void iq_room_affiliation_list(const char *const room, char *affiliation);
void iq_room_affiliation_set(const char *const room, const char *const jid, char *affiliation, void iq_room_affiliation_set(const char *const room, const char *const jid, char *affiliation,
const char *const reason); const char *const reason);
void iq_room_kick_occupant(const char *const room, const char *const nick, const char *const reason); void iq_room_kick_occupant(const char *const room, const char *const nick, const char *const reason);
void iq_room_role_set(const char * const room, const char * const nick, char *role, void iq_room_role_set(const char *const room, const char *const nick, char *role, const char *const reason);
const char * const reason);
void iq_room_role_list(const char * const room, char *role); void iq_room_role_list(const char * const room, char *role);
// caps functions // caps functions