diff options
author | Marvin W <git@larma.de> | 2018-01-12 21:03:09 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2018-01-28 00:38:47 +0100 |
commit | 782ae4c049e2b6fab13d7453cbb0e74610e7d200 (patch) | |
tree | 1b4cd0a1689cee0c2e2cac2ae9a5fb8ebbe63621 /xmpp-vala/src/module/bind.vala | |
parent | d46d071e57e599e8cfb1780597cbecb36881c4d8 (diff) | |
download | dino-782ae4c049e2b6fab13d7453cbb0e74610e7d200.tar.gz dino-782ae4c049e2b6fab13d7453cbb0e74610e7d200.zip |
Move Jid class to xmpp-vala, partially refactor namespace
Diffstat (limited to 'xmpp-vala/src/module/bind.vala')
-rw-r--r-- | xmpp-vala/src/module/bind.vala | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/xmpp-vala/src/module/bind.vala b/xmpp-vala/src/module/bind.vala index 71aae149..a3b0762b 100644 --- a/xmpp-vala/src/module/bind.vala +++ b/xmpp-vala/src/module/bind.vala @@ -1,5 +1,3 @@ -using Xmpp.Core; - namespace Xmpp.Bind { private const string NS_URI = "urn:ietf:params:xml:ns:xmpp-bind"; @@ -9,7 +7,7 @@ namespace Xmpp.Bind { public string requested_resource { get; set; } - public signal void bound_to_resource(XmppStream stream, string my_jid); + public signal void bound_to_resource(XmppStream stream, Jid my_jid); public Module(string requested_resource) { this.requested_resource = requested_resource; @@ -20,7 +18,7 @@ namespace Xmpp.Bind { if (flag == null || flag.finished) return; if (iq.type_ == Iq.Stanza.TYPE_RESULT) { - flag.my_jid = iq.stanza.get_subnode("jid", NS_URI, true).get_string_content(); + flag.my_jid = Jid.parse(iq.stanza.get_subnode("jid", NS_URI, true).get_string_content()); flag.finished = true; bound_to_resource(stream, flag.my_jid); } @@ -62,7 +60,7 @@ namespace Xmpp.Bind { public class Flag : XmppStreamFlag { public static FlagIdentity<Flag> IDENTITY = new FlagIdentity<Flag>(NS_URI, "bind"); - public string? my_jid; + public Jid? my_jid; public bool finished = false; public override string get_ns() { return NS_URI; } |