plumb MeterUpdate into getKey
No behavior changes, but this shows everywhere that a progress meter could be displayed when hashing a file to add to the annex. Many of the places don't make sense to display a progress meter though, eg when importing the copy of the file probably swamps the hashing of the file.
This commit is contained in:
parent
191bdaafc5
commit
8355dba5cc
18 changed files with 60 additions and 44 deletions
|
@ -2,7 +2,7 @@
|
|||
-
|
||||
- Most things should not need this, using Types instead
|
||||
-
|
||||
- Copyright 2010-2017 Joey Hess <id@joeyh.name>
|
||||
- Copyright 2010-2019 Joey Hess <id@joeyh.name>
|
||||
-
|
||||
- Licensed under the GNU AGPL version 3 or higher.
|
||||
-}
|
||||
|
@ -12,11 +12,12 @@ module Types.Backend where
|
|||
import Types.Key
|
||||
import Types.KeySource
|
||||
|
||||
import Utility.Metered
|
||||
import Utility.FileSystemEncoding
|
||||
|
||||
data BackendA a = Backend
|
||||
{ backendVariety :: KeyVariety
|
||||
, getKey :: KeySource -> a (Maybe Key)
|
||||
, getKey :: KeySource -> MeterUpdate -> a (Maybe Key)
|
||||
-- Verifies the content of a key.
|
||||
, verifyKeyContent :: Maybe (Key -> FilePath -> a Bool)
|
||||
-- Checks if a key can be upgraded to a better form.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue