aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/plugin/registry.vala
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/plugin/registry.vala')
-rw-r--r--libdino/src/plugin/registry.vala13
1 files changed, 13 insertions, 0 deletions
diff --git a/libdino/src/plugin/registry.vala b/libdino/src/plugin/registry.vala
index 6c0234ca..7180aa14 100644
--- a/libdino/src/plugin/registry.vala
+++ b/libdino/src/plugin/registry.vala
@@ -6,6 +6,7 @@ public class Registry {
public HashMap<Entities.Encryption, EncryptionListEntry> encryption_list_entries = new HashMap<Entities.Encryption, EncryptionListEntry>();
public HashMap<string, CallEncryptionEntry> call_encryption_entries = new HashMap<string, CallEncryptionEntry>();
public ArrayList<AccountSettingsEntry> account_settings_entries = new ArrayList<AccountSettingsEntry>();
+ public ArrayList<EncryptionPreferencesEntry> encryption_preferences_entries = new ArrayList<EncryptionPreferencesEntry>();
public ArrayList<ContactDetailsProvider> contact_details_entries = new ArrayList<ContactDetailsProvider>();
public Map<string, TextCommand> text_commands = new HashMap<string, TextCommand>();
public Gee.List<ConversationAdditionPopulator> conversation_addition_populators = new ArrayList<ConversationAdditionPopulator>();
@@ -43,6 +44,18 @@ public class Registry {
}
}
+ public bool register_encryption_preferences_entry(EncryptionPreferencesEntry entry) {
+ lock(encryption_preferences_entries) {
+ foreach(var e in encryption_preferences_entries) {
+ if (e.id == entry.id) return false;
+ }
+ encryption_preferences_entries.add(entry);
+ // TODO: Order by priority
+// encryption_preferences_entries.sort((a,b) => b.name.collate(a.name));
+ return true;
+ }
+ }
+
public bool register_contact_details_entry(ContactDetailsProvider entry) {
lock(contact_details_entries) {
foreach(ContactDetailsProvider e in contact_details_entries) {