aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/iq
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala/src/module/iq')
-rw-r--r--xmpp-vala/src/module/iq/module.vala5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmpp-vala/src/module/iq/module.vala b/xmpp-vala/src/module/iq/module.vala
index 56605d01..17cd3f0d 100644
--- a/xmpp-vala/src/module/iq/module.vala
+++ b/xmpp-vala/src/module/iq/module.vala
@@ -6,6 +6,9 @@ namespace Xmpp.Iq {
public class Module : XmppStreamNegotiationModule {
public static ModuleIdentity<Module> IDENTITY = new ModuleIdentity<Module>(NS_URI, "iq_module");
+ public signal void preprocess_incoming_iq_set_get(XmppStream stream, Stanza iq_stanza);
+ public signal void preprocess_outgoing_iq_set_get(XmppStream stream, Stanza iq_stanza);
+
private HashMap<string, ResponseListener> responseListeners = new HashMap<string, ResponseListener>();
private HashMap<string, ArrayList<Handler>> namespaceRegistrants = new HashMap<string, ArrayList<Handler>>();
@@ -23,6 +26,7 @@ namespace Xmpp.Iq {
public delegate void OnResult(XmppStream stream, Iq.Stanza iq);
public void send_iq(XmppStream stream, Iq.Stanza iq, owned OnResult? listener = null) {
+ preprocess_outgoing_iq_set_get(stream, iq);
stream.write(iq.stanza);
if (listener != null) {
responseListeners[iq.id] = new ResponseListener((owned) listener);
@@ -70,6 +74,7 @@ namespace Xmpp.Iq {
} else {
Gee.List<StanzaNode> children = node.get_all_subnodes();
if (children.size == 1 && namespaceRegistrants.has_key(children[0].ns_uri)) {
+ preprocess_incoming_iq_set_get(stream, iq);
Gee.List<Handler> handlers = namespaceRegistrants[children[0].ns_uri];
foreach (Handler handler in handlers) {
if (iq.type_ == Iq.Stanza.TYPE_GET) {