summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/System/Torrent/Storage.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/System/Torrent/Storage.hs b/src/System/Torrent/Storage.hs
index bb6c5d2e..fafdab98 100644
--- a/src/System/Torrent/Storage.hs
+++ b/src/System/Torrent/Storage.hs
@@ -23,6 +23,10 @@ module System.Torrent.Storage
23 , open 23 , open
24 , close 24 , close
25 25
26 -- * Query
27 , genPieceInfo
28 , getBitfield
29
26 -- * Modification 30 -- * Modification
27 , writePiece 31 , writePiece
28 , readPiece 32 , readPiece
@@ -32,6 +36,7 @@ module System.Torrent.Storage
32import Control.Applicative 36import Control.Applicative
33import Data.ByteString.Lazy as BL 37import Data.ByteString.Lazy as BL
34 38
39import Data.Torrent.Bitfield
35import Data.Torrent.Layout 40import Data.Torrent.Layout
36import Data.Torrent.Piece 41import Data.Torrent.Piece
37import System.Torrent.FileMap 42import System.Torrent.FileMap
@@ -65,3 +70,11 @@ unsafeReadPiece pix Storage {..} = return $ Piece pix lbs
65 where 70 where
66 lbs = unsafeReadBytes (fromIntegral (pix * pieceLen)) 71 lbs = unsafeReadBytes (fromIntegral (pix * pieceLen))
67 (fromIntegral pieceLen) fileMap 72 (fromIntegral pieceLen) fileMap
73
74-- | TODO examples of use
75genPieceInfo :: Storage -> IO PieceInfo
76genPieceInfo = undefined
77
78-- | TODO examples of use
79getBitfield :: Storage -> PieceInfo -> IO Bitfield
80getBitfield = undefined \ No newline at end of file