diff --git a/tests/python-test.py b/tests/python-test.py index 7edacb4..581ad7e 100644 --- a/tests/python-test.py +++ b/tests/python-test.py @@ -2,7 +2,6 @@ import prof import threading import time -import sys plugin_win = "Python Test" @@ -422,10 +421,25 @@ def prof_on_message_stanza_send(stanza): _create_win() prof.win_show(plugin_win, "fired -> prof_on_message_stanza_send: " + stanza) +def prof_on_message_stanza_receive(stanza): + _create_win() + prof.win_show(plugin_win, "fired -> prof_on_message_stanza_receive: " + stanza) + return True + def prof_on_presence_stanza_send(stanza): _create_win() prof.win_show(plugin_win, "fired -> prof_on_presence_stanza_send: " + stanza) +def prof_on_presence_stanza_receive(stanza): + _create_win() + prof.win_show(plugin_win, "fired -> prof_on_presence_stanza_receive: " + stanza) + return True + def prof_on_iq_stanza_send(stanza): _create_win() prof.win_show(plugin_win, "fired -> prof_on_iq_stanza_send: " + stanza) + +def prof_on_iq_stanza_receive(stanza): + _create_win() + prof.win_show(plugin_win, "fired -> prof_on_iq_stanza_receive: " + stanza) + return True diff --git a/tests/test-c-plugin/test-c-plugin.c b/tests/test-c-plugin/test-c-plugin.c index 63e22af..62c5f50 100644 --- a/tests/test-c-plugin/test-c-plugin.c +++ b/tests/test-c-plugin/test-c-plugin.c @@ -701,6 +701,19 @@ prof_on_message_stanza_send(const char *const stanza) // return (char *)new_stanza; } +int +prof_on_message_stanza_receive(const char *const stanza) +{ + create_win(); + + char *str = "fired -> prof_on_message_stanza_receive: "; + char buf[strlen(str) + strlen(stanza)]; + sprintf(buf, "%s%s", str, stanza); + prof_win_show(plugin_win, buf); + + return 1; +} + char* prof_on_presence_stanza_send(const char *const stanza) { @@ -714,6 +727,19 @@ prof_on_presence_stanza_send(const char *const stanza) return NULL; } +int +prof_on_presence_stanza_receive(const char *const stanza) +{ + create_win(); + + char *str = "fired -> prof_on_presence_stanza_receive: "; + char buf[strlen(str) + strlen(stanza)]; + sprintf(buf, "%s%s", str, stanza); + prof_win_show(plugin_win, buf); + + return 1; +} + char* prof_on_iq_stanza_send(const char *const stanza) { @@ -726,3 +752,16 @@ prof_on_iq_stanza_send(const char *const stanza) return NULL; } + +int +prof_on_iq_stanza_receive(const char *const stanza) +{ + create_win(); + + char *str = "fired -> prof_on_iq_stanza_receive: "; + char buf[strlen(str) + strlen(stanza)]; + sprintf(buf, "%s%s", str, stanza); + prof_win_show(plugin_win, buf); + + return 1; +}