aboutsummaryrefslogtreecommitdiff
path: root/plugins/openpgp/src/stream_flag.vala
blob: 165327b9535b0600a17698af9d29a803a25dcf3b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using Gee;

using Xmpp;
using Xmpp.Core;

namespace Dino.Plugins.OpenPgp {

public class Flag : XmppStreamFlag {
    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 override string get_ns() { return NS_URI; }

    public override string get_id() { return IDENTITY.id; }
}

}