-- 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.0.1


-- | <a>http://en.wikipedia.org/wiki/Tracker_scrape</a>
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.Show.Show Data.Torrent.Scrape.ScrapeInfo
instance GHC.Read.Read Data.Torrent.Scrape.ScrapeInfo


-- | BitTorrent metainfo files
--   
--   <a>http://www.bittorrent.org/beps/bep_0003.html</a>
module Data.Torrent
data Torrent
Torrent :: ByteString -> [ByteString] -> ByteString -> Maybe ByteString -> TorrentInfo -> Torrent
[tAnnounce] :: Torrent -> 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.Data.Data Data.Torrent.Torrent
instance GHC.Read.Read Data.Torrent.Torrent
instance GHC.Show.Show Data.Torrent.Torrent
instance Data.Data.Data Data.Torrent.TorrentInfo
instance GHC.Read.Read Data.Torrent.TorrentInfo
instance GHC.Show.Show Data.Torrent.TorrentInfo
instance Data.Data.Data Data.Torrent.TorrentFile
instance GHC.Read.Read Data.Torrent.TorrentFile
instance GHC.Show.Show Data.Torrent.TorrentFile
instance Data.Binary.Class.Binary Data.Torrent.Torrent
