diff options
Diffstat (limited to 'libdino/src/plugin/registry.vala')
-rw-r--r-- | libdino/src/plugin/registry.vala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/libdino/src/plugin/registry.vala b/libdino/src/plugin/registry.vala new file mode 100644 index 00000000..8c75784e --- /dev/null +++ b/libdino/src/plugin/registry.vala @@ -0,0 +1,20 @@ +using Gee; + +namespace Dino.Plugins { + +public class Registry { + internal ArrayList<EncryptionListEntry> encryption_list_entries = new ArrayList<EncryptionListEntry>(); + + public bool register_encryption_list_entry(EncryptionListEntry entry) { + lock(encryption_list_entries) { + foreach(var e in encryption_list_entries) { + if (e.encryption == entry.encryption) return false; + } + encryption_list_entries.add(entry); + encryption_list_entries.sort((a,b) => b.name.collate(a.name)); + return true; + } + } +} + +}
\ No newline at end of file |