Added stanza hooks to test plugins
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user