diff options
Diffstat (limited to 'Types')
-rw-r--r-- | Types/Remote.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Types/Remote.hs b/Types/Remote.hs index 5e2e566e5..b89972fdd 100644 --- a/Types/Remote.hs +++ b/Types/Remote.hs @@ -36,6 +36,10 @@ instance Eq (RemoteTypeA a) where {- A filename associated with a Key, for display to user. -} type AssociatedFile = Maybe FilePath +{- An action that can be run repeatedly, feeding it the number of + - bytes sent or retreived so far. -} +type ProgressCallback = (Integer -> IO ()) + {- An individual remote. -} data RemoteA a = Remote { -- each Remote has a unique uuid @@ -45,7 +49,7 @@ data RemoteA a = Remote { -- Remotes have a use cost; higher is more expensive cost :: Int, -- Transfers a key to the remote. - storeKey :: Key -> AssociatedFile -> a Bool, + storeKey :: Key -> AssociatedFile -> ProgressCallback -> a Bool, -- retrieves a key's contents to a file retrieveKeyFile :: Key -> AssociatedFile -> FilePath -> a Bool, -- retrieves a key's contents to a tmp file, if it can be done cheaply |