From db57a973534f099af2b150f1a1307d1948553d9f Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 19 Mar 2017 12:55:36 +0100 Subject: Add typed identity to manager modules and stream flags --- xmpp-vala/src/module/presence/flag.vala | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'xmpp-vala/src/module/presence/flag.vala') diff --git a/xmpp-vala/src/module/presence/flag.vala b/xmpp-vala/src/module/presence/flag.vala index a92c9405..8fb44e13 100644 --- a/xmpp-vala/src/module/presence/flag.vala +++ b/xmpp-vala/src/module/presence/flag.vala @@ -5,7 +5,7 @@ using Xmpp.Core; namespace Xmpp.Presence { public class Flag : XmppStreamFlag { - public const string ID = "presence"; + public static FlagIdentity IDENTITY = new FlagIdentity(NS_URI, "presence"); private HashMap> resources = new HashMap>(); private HashMap presences = new HashMap(); @@ -52,13 +52,9 @@ public class Flag : XmppStreamFlag { } } - public static Flag? get_flag(XmppStream stream) { return (Flag?) stream.get_flag(NS_URI, ID); } - - public static bool has_flag(XmppStream stream) { return get_flag(stream) != null; } - public override string get_ns() { return NS_URI; } - public override string get_id() { return ID; } + public override string get_id() { return IDENTITY.id; } } } \ No newline at end of file -- cgit v1.2.3-54-g00ecf