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 --- plugins/openpgp/src/stream_flag.vala | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/openpgp/src/stream_flag.vala') diff --git a/plugins/openpgp/src/stream_flag.vala b/plugins/openpgp/src/stream_flag.vala index 5ace26bd..165327b9 100644 --- a/plugins/openpgp/src/stream_flag.vala +++ b/plugins/openpgp/src/stream_flag.vala @@ -6,20 +6,17 @@ using Xmpp.Core; namespace Dino.Plugins.OpenPgp { public class Flag : XmppStreamFlag { - public const string ID = "pgp"; + public static FlagIdentity IDENTITY = new FlagIdentity(NS_URI, "pgp"); + public HashMap key_ids = new HashMap(); public string? get_key_id(string jid) { return key_ids[get_bare_jid(jid)]; } public void set_key_id(string jid, string key) { key_ids[get_bare_jid(jid)] = key; } - 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