mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -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();
|
iq_init_module();
|
||||||
message_init_module();
|
message_init_module();
|
||||||
presence_init_module();
|
presence_init_module();
|
||||||
|
roster_init_module();
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -90,7 +90,6 @@ _roster_add_new(const char * const barejid, const char * const name)
|
|||||||
xmpp_send(conn, iq);
|
xmpp_send(conn, iq);
|
||||||
xmpp_stanza_release(iq);
|
xmpp_stanza_release(iq);
|
||||||
}
|
}
|
||||||
void (*roster_add_new)(const char * const, const char * const) = _roster_add_new;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_roster_send_remove(const char * const barejid)
|
_roster_send_remove(const char * const barejid)
|
||||||
@ -101,7 +100,6 @@ _roster_send_remove(const char * const barejid)
|
|||||||
xmpp_send(conn, iq);
|
xmpp_send(conn, iq);
|
||||||
xmpp_stanza_release(iq);
|
xmpp_stanza_release(iq);
|
||||||
}
|
}
|
||||||
void (*roster_send_remove)(const char * const) = _roster_send_remove;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_roster_send_name_change(const char * const barejid, const char * const new_name, GSList *groups)
|
_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_send(conn, iq);
|
||||||
xmpp_stanza_release(iq);
|
xmpp_stanza_release(iq);
|
||||||
}
|
}
|
||||||
void (*roster_send_name_change)(const char * const, const char * const,
|
|
||||||
GSList *) = _roster_send_name_change;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_roster_send_add_to_group(const char * const group, PContact contact)
|
_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);
|
xmpp_stanza_release(iq);
|
||||||
free(unique_id);
|
free(unique_id);
|
||||||
}
|
}
|
||||||
void (*roster_send_add_to_group)(const char * const, PContact) = _roster_send_add_to_group;
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_group_add_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
|
_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);
|
xmpp_stanza_release(iq);
|
||||||
free(unique_id);
|
free(unique_id);
|
||||||
}
|
}
|
||||||
void (*roster_send_remove_from_group)(const char * const, PContact) = _roster_send_remove_from_group;
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_group_remove_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
|
_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;
|
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 iq_init_module(void);
|
||||||
void message_init_module(void);
|
void message_init_module(void);
|
||||||
void presence_init_module(void);
|
void presence_init_module(void);
|
||||||
|
void roster_init_module(void);
|
||||||
|
|
||||||
// connection functions
|
// connection functions
|
||||||
void (*jabber_init)(const int disable_tls);
|
void (*jabber_init)(const int disable_tls);
|
||||||
|
Loading…
Reference in New Issue
Block a user