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/xep/0048_bookmarks/conference.vala | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'xmpp-vala/src/module/xep/0048_bookmarks/conference.vala') diff --git a/xmpp-vala/src/module/xep/0048_bookmarks/conference.vala b/xmpp-vala/src/module/xep/0048_bookmarks/conference.vala index 6964f83d..e5037e42 100644 --- a/xmpp-vala/src/module/xep/0048_bookmarks/conference.vala +++ b/xmpp-vala/src/module/xep/0048_bookmarks/conference.vala @@ -1,5 +1,3 @@ -using Xmpp.Core; - namespace Xmpp.Xep.Bookmarks { public class Conference : Object { @@ -21,9 +19,10 @@ public class Conference : Object { set { stanza_node.set_attribute(ATTRIBUTE_AUTOJOIN, value.to_string()); } } - public string jid { - get { return stanza_node.get_attribute(ATTRIBUTE_JID); } - set { stanza_node.set_attribute(ATTRIBUTE_JID, value); } + private Jid jid_; + public Jid jid { + get { return jid_ ?? (jid_ = Jid.parse(stanza_node.get_attribute(ATTRIBUTE_JID))); } + set { stanza_node.set_attribute(ATTRIBUTE_JID, value.to_string()); } } public string? name { @@ -73,7 +72,7 @@ public class Conference : Object { } } - public Conference(string jid) { + public Conference(Jid jid) { this.stanza_node = new StanzaNode.build("conference", NS_URI); this.jid = jid; } @@ -90,4 +89,4 @@ public class Conference : Object { } } -} \ No newline at end of file +} -- cgit v1.2.3