aboutsummaryrefslogtreecommitdiff
path: root/plugins/openpgp/src/plugin.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-03-12 02:49:53 +0100
committerfiaxh <git@mx.ax.lt>2017-03-12 02:52:43 +0100
commit7e1ecb34cb1eca2b74949c7ddc2ad52fb02e3a77 (patch)
tree1a7a479efffafcf5098798fd5ce8d815bf4503a9 /plugins/openpgp/src/plugin.vala
parent63fffcddce49e231e82ee60aef4a23a16caa931e (diff)
downloaddino-7e1ecb34cb1eca2b74949c7ddc2ad52fb02e3a77.tar.gz
dino-7e1ecb34cb1eca2b74949c7ddc2ad52fb02e3a77.zip
Move PGP support into plugin
Diffstat (limited to 'plugins/openpgp/src/plugin.vala')
-rw-r--r--plugins/openpgp/src/plugin.vala29
1 files changed, 29 insertions, 0 deletions
diff --git a/plugins/openpgp/src/plugin.vala b/plugins/openpgp/src/plugin.vala
new file mode 100644
index 00000000..d25c8cd0
--- /dev/null
+++ b/plugins/openpgp/src/plugin.vala
@@ -0,0 +1,29 @@
+namespace Dino.Plugins.OpenPgp {
+
+ public class Plugin : Plugins.RootInterface, Object {
+ public Dino.Application app;
+ public Database db;
+
+ private Module module;
+ private EncryptionListEntry list_entry;
+ private AccountSettingsEntry settings_entry;
+
+ public void registered(Dino.Application app) {
+ this.app = app;
+ this.module = new Module();
+ this.list_entry = new EncryptionListEntry(app.stream_interaction);
+ this.settings_entry = new AccountSettingsEntry();
+ app.plugin_registry.register_encryption_list_entry(list_entry);
+ app.plugin_registry.register_account_settings_entry(settings_entry);
+ app.stream_interaction.module_manager.initialize_account_modules.connect((account, list) => {
+ list.add(new Module());
+ });
+ Manager.start(app.stream_interaction, app.db);
+ }
+
+ public void shutdown() {
+ // Nothing to do
+ }
+ }
+
+}