summaryrefslogtreecommitdiff
path: root/Assistant/Types/ScanRemotes.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-29 19:14:30 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-29 19:14:30 -0400
commitcb504374b53a940ea12feeb5ba91dd78466be455 (patch)
treea9e954e85c333a494016df935f32f13aeb38c02f /Assistant/Types/ScanRemotes.hs
parent86b3857a4c1edafef817935ad3c5d63e6d2d3b25 (diff)
split ScanRemotes and lifted
Diffstat (limited to 'Assistant/Types/ScanRemotes.hs')
-rw-r--r--Assistant/Types/ScanRemotes.hs25
1 files changed, 25 insertions, 0 deletions
diff --git a/Assistant/Types/ScanRemotes.hs b/Assistant/Types/ScanRemotes.hs
new file mode 100644
index 000000000..d2f0c588f
--- /dev/null
+++ b/Assistant/Types/ScanRemotes.hs
@@ -0,0 +1,25 @@
+{- git-annex assistant remotes needing scanning
+ -
+ - Copyright 2012 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+module Assistant.Types.ScanRemotes where
+
+import Common.Annex
+
+import Control.Concurrent.STM
+import qualified Data.Map as M
+
+data ScanInfo = ScanInfo
+ { scanPriority :: Int
+ , fullScan :: Bool
+ }
+
+type ScanRemoteMap = TMVar (M.Map Remote ScanInfo)
+
+{- The TMVar starts empty, and is left empty when there are no remotes
+ - to scan. -}
+newScanRemoteMap :: IO ScanRemoteMap
+newScanRemoteMap = atomically newEmptyTMVar