aboutsummaryrefslogtreecommitdiff
path: root/Types/Remote.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2014-12-08 19:14:24 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2014-12-08 19:15:07 -0400
commit929de31900dbc9654e0bcc1f4679f526aee7f99a (patch)
treed868a3bbae9a0af26191f461f317f6d40b08a2af /Types/Remote.hs
parent28764ce2dc29d1d93989b4061b5b12bac10902de (diff)
Urls can now be claimed by remotes. This will allow creating, for example, a external special remote that handles magnet: and *.torrent urls.
Diffstat (limited to 'Types/Remote.hs')
-rw-r--r--Types/Remote.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Types/Remote.hs b/Types/Remote.hs
index 3f71e1fb4..baa857906 100644
--- a/Types/Remote.hs
+++ b/Types/Remote.hs
@@ -103,7 +103,12 @@ data RemoteA a = Remote {
-- Information about the remote, for git annex info to display.
getInfo :: a [(String, String)],
-- Some remotes can download from an url (or uri).
- claimUrl :: Maybe (URLString -> a Bool)
+ claimUrl :: Maybe (URLString -> a Bool),
+ -- Checks that the url is accessible, and gets the size of its
+ -- content. Returns Nothing if the url is accessible, but
+ -- its size cannot be determined inexpensively.
+ -- Throws an exception if the url is inaccessible.
+ checkUrl :: URLString -> a (Maybe Integer)
}
instance Show (RemoteA a) where