From 5da773256d10f244e3e38b8da57ad8e78e340709 Mon Sep 17 00:00:00 2001 From: Sam Truzjan Date: Tue, 10 Dec 2013 02:31:40 +0400 Subject: Add stubs in Storage --- src/System/Torrent/Storage.hs | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 , open , close + -- * Query + , genPieceInfo + , getBitfield + -- * Modification , writePiece , readPiece @@ -32,6 +36,7 @@ module System.Torrent.Storage import Control.Applicative import Data.ByteString.Lazy as BL +import Data.Torrent.Bitfield import Data.Torrent.Layout import Data.Torrent.Piece import System.Torrent.FileMap @@ -65,3 +70,11 @@ unsafeReadPiece pix Storage {..} = return $ Piece pix lbs where lbs = unsafeReadBytes (fromIntegral (pix * pieceLen)) (fromIntegral pieceLen) fileMap + +-- | TODO examples of use +genPieceInfo :: Storage -> IO PieceInfo +genPieceInfo = undefined + +-- | TODO examples of use +getBitfield :: Storage -> PieceInfo -> IO Bitfield +getBitfield = undefined \ No newline at end of file -- cgit v1.2.3