From 6904bda756321c67bea0108342fa9ba859dd66e9 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sat, 13 May 2017 17:43:51 +0200 Subject: xmpp-vala: improve namespace handling, add some tests --- xmpp-vala/src/core/stanza_attribute.vala | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xmpp-vala/src/core/stanza_attribute.vala') diff --git a/xmpp-vala/src/core/stanza_attribute.vala b/xmpp-vala/src/core/stanza_attribute.vala index f751c801..ea776110 100644 --- a/xmpp-vala/src/core/stanza_attribute.vala +++ b/xmpp-vala/src/core/stanza_attribute.vala @@ -20,6 +20,13 @@ public class StanzaAttribute : StanzaEntry { this.val = val; } + public bool equals(StanzaAttribute other) { + if (other.ns_uri != ns_uri) return false; + if (other.name != name) return false; + if (other.val != val) return false; + return true; + } + internal string printf(string fmt, bool no_ns = false, string? ns_name = null) { if (no_ns) { return fmt.printf(name, (!)val); -- cgit v1.2.3-54-g00ecf