mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Bind roster functions in main.c
This commit is contained in:
parent
4e169689f6
commit
6a9bb8ea11
@ -45,6 +45,7 @@ _init_modules(void)
|
||||
iq_init_module();
|
||||
message_init_module();
|
||||
presence_init_module();
|
||||
roster_init_module();
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -90,7 +90,6 @@ _roster_add_new(const char * const barejid, const char * const name)
|
||||
xmpp_send(conn, iq);
|
||||
xmpp_stanza_release(iq);
|
||||
}
|
||||
void (*roster_add_new)(const char * const, const char * const) = _roster_add_new;
|
||||
|
||||
static void
|
||||
_roster_send_remove(const char * const barejid)
|
||||
@ -101,7 +100,6 @@ _roster_send_remove(const char * const barejid)
|
||||
xmpp_send(conn, iq);
|
||||
xmpp_stanza_release(iq);
|
||||
}
|
||||
void (*roster_send_remove)(const char * const) = _roster_send_remove;
|
||||
|
||||
static void
|
||||
_roster_send_name_change(const char * const barejid, const char * const new_name, GSList *groups)
|
||||
@ -113,8 +111,6 @@ _roster_send_name_change(const char * const barejid, const char * const new_name
|
||||
xmpp_send(conn, iq);
|
||||
xmpp_stanza_release(iq);
|
||||
}
|
||||
void (*roster_send_name_change)(const char * const, const char * const,
|
||||
GSList *) = _roster_send_name_change;
|
||||
|
||||
static void
|
||||
_roster_send_add_to_group(const char * const group, PContact contact)
|
||||
@ -146,7 +142,6 @@ _roster_send_add_to_group(const char * const group, PContact contact)
|
||||
xmpp_stanza_release(iq);
|
||||
free(unique_id);
|
||||
}
|
||||
void (*roster_send_add_to_group)(const char * const, PContact) = _roster_send_add_to_group;
|
||||
|
||||
static int
|
||||
_group_add_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
|
||||
@ -194,7 +189,6 @@ _roster_send_remove_from_group(const char * const group, PContact contact)
|
||||
xmpp_stanza_release(iq);
|
||||
free(unique_id);
|
||||
}
|
||||
void (*roster_send_remove_from_group)(const char * const, PContact) = _roster_send_remove_from_group;
|
||||
|
||||
static int
|
||||
_group_remove_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
|
||||
@ -329,3 +323,14 @@ _get_groups_from_item(xmpp_stanza_t *item)
|
||||
|
||||
return groups;
|
||||
}
|
||||
|
||||
void
|
||||
roster_init_module(void)
|
||||
{
|
||||
roster_add_new = _roster_add_new;
|
||||
roster_send_remove = _roster_send_remove;
|
||||
roster_send_name_change = _roster_send_name_change;
|
||||
roster_send_add_to_group = _roster_send_add_to_group;
|
||||
roster_send_remove_from_group = _roster_send_remove_from_group;
|
||||
|
||||
}
|
||||
|
@ -80,6 +80,7 @@ void capabilities_init_module(void);
|
||||
void iq_init_module(void);
|
||||
void message_init_module(void);
|
||||
void presence_init_module(void);
|
||||
void roster_init_module(void);
|
||||
|
||||
// connection functions
|
||||
void (*jabber_init)(const int disable_tls);
|
||||
|
Loading…
Reference in New Issue
Block a user