aboutsummaryrefslogtreecommitdiff
path: root/lib/keyring
diff options
context:
space:
mode:
authorZapata <zapata@xs4all.nl>2011-01-29 22:13:05 +0100
committerZapata <zapata@xs4all.nl>2011-01-29 22:13:05 +0100
commite65dbf59bf3aaa0b4bde29ca49ca67f7ad17b5a9 (patch)
treecd914b8c588ea35f732abdbd7336d3c459804b70 /lib/keyring
parent7382be9d83bc5f95ad8d184b95c379ca5b9d1725 (diff)
downloadkeyringer-e65dbf59bf3aaa0b4bde29ca49ca67f7ad17b5a9.tar.gz
keyringer-e65dbf59bf3aaa0b4bde29ca49ca67f7ad17b5a9.tar.bz2
added preliminary recipient management functionality
Diffstat (limited to 'lib/keyring')
-rw-r--r--lib/keyring/recipients.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/keyring/recipients.rb b/lib/keyring/recipients.rb
new file mode 100644
index 0000000..4cd9a48
--- /dev/null
+++ b/lib/keyring/recipients.rb
@@ -0,0 +1,26 @@
+module Keyring
+ class Recipients
+ def initialize(aBaseDirectory = '..')
+ @recipientsStore = Backend::RecipientsStore.new(aBaseDirectory)
+
+ end
+ def addRecipient(anEmail, aKeySignature)
+
+ @recipientsStore.load()
+ @recipientsStore.addRecipient(anEmail, aKeySignature)
+ @recipientsStore.save()
+ end
+
+ def removeRecipient(aKeySignature)
+ @recipientsStore.load()
+ @recipientsStore.removeRecipient(aKeySignature)
+ @recipientsStore.save()
+ end
+
+ def listRecipients()
+ @recipientsStore.load()
+
+ return @recipientsStore.getRecipients()
+ end
+ end
+end