aboutsummaryrefslogtreecommitdiff
path: root/plugins/openpgp/src/stream_flag.vala
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/openpgp/src/stream_flag.vala')
-rw-r--r--plugins/openpgp/src/stream_flag.vala9
1 files changed, 3 insertions, 6 deletions
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<Flag> IDENTITY = new FlagIdentity<Flag>(NS_URI, "pgp");
+
public HashMap<string, string> key_ids = new HashMap<string, string>();
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