Copyright | (c) Kai Lindholm, 2014-2015 |
---|---|
License | MIT |
Maintainer | megantti@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
For more info on actions, see Network.RTorrent.Action.
- data TorrentInfo = TorrentInfo {}
- newtype TorrentId = TorrentId String
- type TorrentAction = Action TorrentId
- start :: TorrentId -> TorrentAction Int
- close :: TorrentId -> TorrentAction Int
- stop :: TorrentId -> TorrentAction Int
- closeStop :: TorrentId -> TorrentAction Int
- erase :: TorrentId -> TorrentAction Int
- checkHash :: TorrentId -> TorrentAction Int
- getTorrent :: TorrentId -> TorrentAction TorrentInfo
- getTorrents :: AllAction TorrentId TorrentInfo
- allTorrents :: (TorrentId -> TorrentAction a) -> AllAction TorrentId a
- setTorrentPriority :: TorrentPriority -> TorrentId -> TorrentAction Int
- getTorrentPriority :: TorrentId -> TorrentAction TorrentPriority
- getTorrentId :: TorrentId -> TorrentAction TorrentId
- getTorrentOpen :: TorrentId -> TorrentAction Bool
- getTorrentUpRate :: TorrentId -> TorrentAction Int
- getTorrentDownRate :: TorrentId -> TorrentAction Int
- getTorrentSizeBytes :: TorrentId -> TorrentAction Int
- getTorrentLeftBytes :: TorrentId -> TorrentAction Int
- getTorrentName :: TorrentId -> TorrentAction String
- getTorrentPath :: TorrentId -> TorrentAction String
- getTorrentDir :: TorrentId -> TorrentAction String
- setTorrentDir :: String -> TorrentId -> TorrentAction Int
- getTorrentRatio :: TorrentId -> TorrentAction Int
- getTorrentFileCount :: TorrentId -> TorrentAction Int
- getTorrentSizeChunks :: TorrentId -> TorrentAction Int
- getTorrentChunks :: TorrentId -> TorrentAction (Maybe [Bool])
- getTorrentChunkSize :: TorrentId -> TorrentAction Int
Documentation
data TorrentInfo Source
TorrentInfo | |
|
A newtype wrapper for torrent identifiers.
type TorrentAction = Action TorrentId Source
Functions for handling torrents
start :: TorrentId -> TorrentAction Int Source
Start downloading a torrent.
close :: TorrentId -> TorrentAction Int Source
Close a torrent.
stop :: TorrentId -> TorrentAction Int Source
Stop a torrent.
closeStop :: TorrentId -> TorrentAction Int Source
erase :: TorrentId -> TorrentAction Int Source
Erase a torrent.
checkHash :: TorrentId -> TorrentAction Int Source
Initiate a hash check for a torrent.
getTorrent :: TorrentId -> TorrentAction TorrentInfo Source
Get a TorrentInfo for a torrent.
getTorrents :: AllAction TorrentId TorrentInfo Source
A command for getting torrent info for all torrents.
allTorrents :: (TorrentId -> TorrentAction a) -> AllAction TorrentId a Source
Execute a command on all torrents. For example the command
allTorrents (setTorrentPriority TorrentPriorityNormal)
will set the priority of all torrents to normal.
Functions for single variables
setTorrentPriority :: TorrentPriority -> TorrentId -> TorrentAction Int Source
Set the download priority of a torrent.
getTorrentPath :: TorrentId -> TorrentAction String Source
Get the absolute path to the torrent's directory or file.
getTorrentDir :: TorrentId -> TorrentAction String Source
Get the absolute path to the directory in which the torrent's directory or file resides.
setTorrentDir :: String -> TorrentId -> TorrentAction Int Source
getTorrentRatio :: TorrentId -> TorrentAction Int Source
Get the ratio (which is multiplied by a thousand)
getTorrentSizeChunks :: TorrentId -> TorrentAction Int Source
A total number of chunks.
getTorrentChunks :: TorrentId -> TorrentAction (Maybe [Bool]) Source
Get a list that shows which chunks of the torrent are recorded as completed.
Will return Nothing
in the case that the torrent is closed.
getTorrentChunkSize :: TorrentId -> TorrentAction Int Source
Get the size of a chunk.