diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-12 02:49:53 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-12 02:52:43 +0100 |
commit | 7e1ecb34cb1eca2b74949c7ddc2ad52fb02e3a77 (patch) | |
tree | 1a7a479efffafcf5098798fd5ce8d815bf4503a9 /plugins/openpgp/src/encryption_list_entry.vala | |
parent | 63fffcddce49e231e82ee60aef4a23a16caa931e (diff) | |
download | dino-7e1ecb34cb1eca2b74949c7ddc2ad52fb02e3a77.tar.gz dino-7e1ecb34cb1eca2b74949c7ddc2ad52fb02e3a77.zip |
Move PGP support into plugin
Diffstat (limited to 'plugins/openpgp/src/encryption_list_entry.vala')
-rw-r--r-- | plugins/openpgp/src/encryption_list_entry.vala | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/openpgp/src/encryption_list_entry.vala b/plugins/openpgp/src/encryption_list_entry.vala new file mode 100644 index 00000000..96607e1e --- /dev/null +++ b/plugins/openpgp/src/encryption_list_entry.vala @@ -0,0 +1,26 @@ +using Dino.Entities; + +namespace Dino.Plugins.OpenPgp { + +private class EncryptionListEntry : Plugins.EncryptionListEntry, Object { + + private StreamInteractor stream_interactor; + + public EncryptionListEntry(StreamInteractor stream_interactor) { + this.stream_interactor = stream_interactor; + } + + public Entities.Encryption encryption { get { + return Encryption.PGP; + }} + + public string name { get { + return "OpenPGP"; + }} + + public bool can_encrypt(Entities.Conversation conversation) { + return Manager.get_instance(stream_interactor).get_key_id(conversation.account, conversation.counterpart) != null; + } +} + +}
\ No newline at end of file |