From 782ae4c049e2b6fab13d7453cbb0e74610e7d200 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Fri, 12 Jan 2018 21:03:09 +0100 Subject: Move Jid class to xmpp-vala, partially refactor namespace --- xmpp-vala/src/module/bind.vala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'xmpp-vala/src/module/bind.vala') 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 IDENTITY = new FlagIdentity(NS_URI, "bind"); - public string? my_jid; + public Jid? my_jid; public bool finished = false; public override string get_ns() { return NS_URI; } -- cgit v1.2.3-54-g00ecf