From b6b04642c8d513aaa75b924e1ef8480fa39f3109 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 17 Apr 2011 00:40:23 -0400 Subject: [PATCH] rename --- Remote/Bup.hs | 4 ++-- Remote/Directory.hs | 4 ++-- Remote/{Encrypted.hs => Encryptable.hs} | 8 ++++---- Remote/S3real.hs | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename Remote/{Encrypted.hs => Encryptable.hs} (93%) diff --git a/Remote/Bup.hs b/Remote/Bup.hs index 771212372f..698d1b188a 100644 --- a/Remote/Bup.hs +++ b/Remote/Bup.hs @@ -29,7 +29,7 @@ import Utility import Messages import Ssh import Remote.Special -import Remote.Encrypted +import Remote.Encryptable import Crypto type BupRepo = String @@ -49,7 +49,7 @@ gen r u c = do bupr <- liftIO $ bup2GitRemote buprepo (u', bupr') <- getBupUUID bupr u - return $ encryptedRemote c + return $ encryptableRemote c (storeEncrypted r buprepo) (retrieveEncrypted buprepo) Remote { diff --git a/Remote/Directory.hs b/Remote/Directory.hs index 2d31d12b2d..a84a1f45a7 100644 --- a/Remote/Directory.hs +++ b/Remote/Directory.hs @@ -27,7 +27,7 @@ import Config import Content import Utility import Remote.Special -import Remote.Encrypted +import Remote.Encryptable import Crypto remote :: RemoteType Annex @@ -42,7 +42,7 @@ gen :: Git.Repo -> UUID -> Maybe RemoteConfig -> Annex (Remote Annex) gen r u c = do dir <- getConfig r "directory" (error "missing directory") cst <- remoteCost r cheapRemoteCost - return $ encryptedRemote c + return $ encryptableRemote c (storeEncrypted dir) (retrieveEncrypted dir) Remote { diff --git a/Remote/Encrypted.hs b/Remote/Encryptable.hs similarity index 93% rename from Remote/Encrypted.hs rename to Remote/Encryptable.hs index 255b41d730..a9a7472fb5 100644 --- a/Remote/Encrypted.hs +++ b/Remote/Encryptable.hs @@ -1,11 +1,11 @@ -{- common functions for encrypted remotes +{- common functions for encryptable remotes - - Copyright 2011 Joey Hess - - Licensed under the GNU GPL version 3 or higher. -} -module Remote.Encrypted where +module Remote.Encryptable where import qualified Data.Map as M import Control.Monad.State (liftIO) @@ -37,13 +37,13 @@ encryptionSetup c = - - Two additional functions must be provided by the remote, - to support storing and retrieving encrypted content. -} -encryptedRemote +encryptableRemote :: Maybe RemoteConfig -> ((Cipher, Key) -> Key -> Annex Bool) -> ((Cipher, Key) -> FilePath -> Annex Bool) -> Remote Annex -> Remote Annex -encryptedRemote c storeKeyEncrypted retrieveKeyFileEncrypted r = +encryptableRemote c storeKeyEncrypted retrieveKeyFileEncrypted r = r { storeKey = store, retrieveKeyFile = retrieve, diff --git a/Remote/S3real.hs b/Remote/S3real.hs index 0f6327f575..1fa387d68e 100644 --- a/Remote/S3real.hs +++ b/Remote/S3real.hs @@ -28,7 +28,7 @@ import Messages import Locations import Config import Remote.Special -import Remote.Encrypted +import Remote.Encryptable remote :: RemoteType Annex remote = RemoteType {