]> Sergey Matveev's repositories - btrtrc.git/blob - download.go
Merge branch 'master' of https://github.com/anacrolix/torrent
[btrtrc.git] / download.go
1 package torrent
2
3 import(
4         "github.com/anacrolix/torrent/metainfo"
5         "github.com/anacrolix/missinggo/pubsub"
6         "github.com/anacrolix/torrent/tracker"
7 )
8
9 type Download interface {
10         InfoHash() InfoHash
11         GotInfo() <-chan struct{}
12         Info() *metainfo.Info
13         NewReader() (ret *Reader)
14         PieceStateRuns() []PieceStateRun
15         NumPieces() int
16         Drop()
17         BytesCompleted() int64
18         SubscribePieceStateChanges() *pubsub.Subscription
19         Seeding() bool
20         SetDisplayName(dn string)
21         Client() *Client
22         AddPeers(pp []Peer) error
23         DownloadAll()
24         Trackers() [][]tracker.Client
25         Files() (ret []File)
26         Peers() map[PeersKey]Peer
27 }