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/roster/module.vala | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'xmpp-vala/src/module/roster/module.vala') diff --git a/xmpp-vala/src/module/roster/module.vala b/xmpp-vala/src/module/roster/module.vala index 85693686..5b15a43a 100644 --- a/xmpp-vala/src/module/roster/module.vala +++ b/xmpp-vala/src/module/roster/module.vala @@ -1,7 +1,5 @@ using Gee; -using Xmpp.Core; - namespace Xmpp.Roster { private const string NS_URI = "jabber:iq:roster"; @@ -16,7 +14,7 @@ public class Module : XmppStreamModule, Iq.Handler { public bool interested_resource = true; - public void add_jid(XmppStream stream, string jid, string? handle = null) { + public void add_jid(XmppStream stream, Jid jid, string? handle = null) { Item roster_item = new Item(); roster_item.jid = jid; if (handle != null) { @@ -25,7 +23,7 @@ public class Module : XmppStreamModule, Iq.Handler { roster_set(stream, roster_item); } - public void remove_jid(XmppStream stream, string jid) { + public void remove_jid(XmppStream stream, Jid jid) { Item roster_item = new Item(); roster_item.jid = jid; roster_item.subscription = Item.SUBSCRIPTION_REMOVE; @@ -37,7 +35,7 @@ public class Module : XmppStreamModule, Iq.Handler { * Set a handle for a jid * @param handle Handle to be set. If null, any handle will be removed. */ - public void set_jid_handle(XmppStream stream, string jid, string? handle) { + public void set_jid_handle(XmppStream stream, Jid jid, string? handle) { Flag flag = stream.get_flag(Flag.IDENTITY); Item item = flag.get_item(jid) ?? new Item() { jid=jid }; item.name = handle != null ? handle : ""; -- cgit v1.2.3-70-g09d2