mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-20 01:56:21 +00:00
Added basic stanza receive eooks
This commit is contained in:
@@ -430,6 +430,24 @@ plugins_on_message_stanza_send(const char *const text)
|
||||
return curr_stanza;
|
||||
}
|
||||
|
||||
gboolean
|
||||
plugins_on_message_stanza_receive(const char *const text)
|
||||
{
|
||||
gboolean cont = TRUE;
|
||||
|
||||
GSList *curr = plugins;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
gboolean res = plugin->on_message_stanza_receive(plugin, text);
|
||||
if (res == FALSE) {
|
||||
cont = FALSE;
|
||||
}
|
||||
curr = g_slist_next(curr);
|
||||
}
|
||||
|
||||
return cont;
|
||||
}
|
||||
|
||||
char*
|
||||
plugins_on_presence_stanza_send(const char *const text)
|
||||
{
|
||||
@@ -451,6 +469,24 @@ plugins_on_presence_stanza_send(const char *const text)
|
||||
return curr_stanza;
|
||||
}
|
||||
|
||||
gboolean
|
||||
plugins_on_presence_stanza_receive(const char *const text)
|
||||
{
|
||||
gboolean cont = TRUE;
|
||||
|
||||
GSList *curr = plugins;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
gboolean res = plugin->on_presence_stanza_receive(plugin, text);
|
||||
if (res == FALSE) {
|
||||
cont = FALSE;
|
||||
}
|
||||
curr = g_slist_next(curr);
|
||||
}
|
||||
|
||||
return cont;
|
||||
}
|
||||
|
||||
char*
|
||||
plugins_on_iq_stanza_send(const char *const text)
|
||||
{
|
||||
@@ -472,6 +508,24 @@ plugins_on_iq_stanza_send(const char *const text)
|
||||
return curr_stanza;
|
||||
}
|
||||
|
||||
gboolean
|
||||
plugins_on_iq_stanza_receive(const char *const text)
|
||||
{
|
||||
gboolean cont = TRUE;
|
||||
|
||||
GSList *curr = plugins;
|
||||
while (curr) {
|
||||
ProfPlugin *plugin = curr->data;
|
||||
gboolean res = plugin->on_iq_stanza_receive(plugin, text);
|
||||
if (res == FALSE) {
|
||||
cont = FALSE;
|
||||
}
|
||||
curr = g_slist_next(curr);
|
||||
}
|
||||
|
||||
return cont;
|
||||
}
|
||||
|
||||
void
|
||||
plugins_shutdown(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user