diff options
author | Marvin W <git@larma.de> | 2017-05-13 17:43:51 +0200 |
---|---|---|
committer | Marvin W <git@larma.de> | 2017-08-12 11:59:38 +0200 |
commit | 6904bda756321c67bea0108342fa9ba859dd66e9 (patch) | |
tree | 24517bf54d6188af401afedd343c42b6ece3d1c6 /xmpp-vala/src/core/stanza_attribute.vala | |
parent | dd88db7556a20707f6fe3c81b3c58df42a0f5224 (diff) | |
download | dino-6904bda756321c67bea0108342fa9ba859dd66e9.tar.gz dino-6904bda756321c67bea0108342fa9ba859dd66e9.zip |
xmpp-vala: improve namespace handling, add some tests
Diffstat (limited to 'xmpp-vala/src/core/stanza_attribute.vala')
-rw-r--r-- | xmpp-vala/src/core/stanza_attribute.vala | 7 |
1 files changed, 7 insertions, 0 deletions
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); |