diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-19 12:55:36 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-20 22:28:27 +0100 |
commit | db57a973534f099af2b150f1a1307d1948553d9f (patch) | |
tree | 238ae1d4e53412a33e3febd07318dfd38b0eb2f8 /xmpp-vala/src/module/xep/0045_muc/flag.vala | |
parent | 233f2b35d033cd20d1ac648bf2d723bcb7a918fc (diff) | |
download | dino-db57a973534f099af2b150f1a1307d1948553d9f.tar.gz dino-db57a973534f099af2b150f1a1307d1948553d9f.zip |
Add typed identity to manager modules and stream flags
Diffstat (limited to 'xmpp-vala/src/module/xep/0045_muc/flag.vala')
-rw-r--r-- | xmpp-vala/src/module/xep/0045_muc/flag.vala | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/xmpp-vala/src/module/xep/0045_muc/flag.vala b/xmpp-vala/src/module/xep/0045_muc/flag.vala index 13363220..f6340a5c 100644 --- a/xmpp-vala/src/module/xep/0045_muc/flag.vala +++ b/xmpp-vala/src/module/xep/0045_muc/flag.vala @@ -5,7 +5,7 @@ using Xmpp.Core; namespace Xmpp.Xep.Muc { public class Flag : XmppStreamFlag { - public const string ID = "muc"; + public static FlagIdentity<Flag> IDENTITY = new FlagIdentity<Flag>(NS_URI, "muc"); private HashMap<string, ListenerHolder> enter_listeners = new HashMap<string, ListenerHolder>(); private HashMap<string, string> enter_ids = new HashMap<string, string>(); @@ -68,13 +68,9 @@ public class Flag : XmppStreamFlag { occupant_role.unset(full_jid); } - 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 |