-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | BitTorrent file parser and generater
--   
--   BitTorrent file parser and generater
@package torrent
@version 10000.1.3

-- | BitTorrent metainfo files
--   
--   http://www.bittorrent.org/beps/bep_0003.html
module Data.Torrent
data Torrent
Torrent :: Maybe ByteString -> [ByteString] -> ByteString -> Maybe ByteString -> TorrentInfo -> Torrent
[tAnnounce] :: Torrent -> Maybe ByteString
[tAnnounceList] :: Torrent -> [ByteString]
[tComment] :: Torrent -> ByteString
[tCreatedBy] :: Torrent -> Maybe ByteString
[tInfo] :: Torrent -> TorrentInfo
data TorrentInfo
SingleFile :: Integer -> ByteString -> Integer -> ByteString -> TorrentInfo
[tLength] :: TorrentInfo -> Integer
[tName] :: TorrentInfo -> ByteString
[tPieceLength] :: TorrentInfo -> Integer
[tPieces] :: TorrentInfo -> ByteString
MultiFile :: [TorrentFile] -> ByteString -> Integer -> ByteString -> TorrentInfo
[tFiles] :: TorrentInfo -> [TorrentFile]
[tName] :: TorrentInfo -> ByteString
[tPieceLength] :: TorrentInfo -> Integer
[tPieces] :: TorrentInfo -> ByteString
data TorrentFile
TorrentFile :: Integer -> [ByteString] -> TorrentFile
[fileLength] :: TorrentFile -> Integer
[filePath] :: TorrentFile -> [ByteString]
readTorrent :: ByteString -> Either String Torrent
serializeTorrent :: Torrent -> BEncode

-- | Size of the files in the torrent.
torrentSize :: Torrent -> Integer

-- | generates a torrent file
--   
--   Due to lexographical ordering requirements of BEncoded data, this
--   should generate the same ByteString that readTorrent read to generate
--   the Torrent. However, torrent files may contain extensions and
--   nonstandard fields that prevent that from holding for all torrent
--   files.
showTorrent :: Torrent -> ByteString
instance Data.Binary.Class.Binary Data.Torrent.Torrent
instance GHC.Internal.Data.Data.Data Data.Torrent.Torrent
instance GHC.Internal.Data.Data.Data Data.Torrent.TorrentFile
instance GHC.Internal.Data.Data.Data Data.Torrent.TorrentInfo
instance GHC.Internal.Read.Read Data.Torrent.Torrent
instance GHC.Internal.Read.Read Data.Torrent.TorrentFile
instance GHC.Internal.Read.Read Data.Torrent.TorrentInfo
instance GHC.Internal.Show.Show Data.Torrent.Torrent
instance GHC.Internal.Show.Show Data.Torrent.TorrentFile
instance GHC.Internal.Show.Show Data.Torrent.TorrentInfo

-- | http://en.wikipedia.org/wiki/Tracker_scrape
module Data.Torrent.Scrape
data ScrapeInfo
ScrapeInfo :: Integer -> Integer -> ScrapeInfo
[scrapeSeeds] :: ScrapeInfo -> Integer
[scrapeLeechers] :: ScrapeInfo -> Integer
parseScrapeInfo :: ByteString -> Maybe ScrapeInfo
scrapeUrl :: ByteString -> [String] -> Maybe String
instance GHC.Internal.Read.Read Data.Torrent.Scrape.ScrapeInfo
instance GHC.Internal.Show.Show Data.Torrent.Scrape.ScrapeInfo
