4
4
* This file is licensed by the GPL version 2. Works owned by the
5
5
* Transmission project are granted a special exemption to clause 2(b)
6
* so that the bulk of its code can remain under the MIT license.
6
* so that the bulk of its code can remain under the MIT license.
7
7
* This exemption does not extend to derived works not owned by
8
8
* the Transmission project.
10
* $Id: tracker.h 6421 2008-07-31 13:06:59Z charles $
10
* $Id: tracker.h 6795 2008-09-23 19:11:04Z charles $
13
13
#ifndef _TR_TRACKER_H_
26
26
tr_tracker * tr_trackerNew( const tr_torrent * );
28
void tr_trackerFree ( tr_tracker * );
28
void tr_trackerFree( tr_tracker * );
30
void tr_trackerSessionClose( tr_handle * );
30
void tr_trackerSessionClose( tr_handle * );
33
33
*** Tracker Publish / Subscribe
47
47
/* what type of event this is */
48
TrackerEventType messageType;
48
TrackerEventType messageType;
50
50
/* the torrent's 20-character sha1 hash */
53
53
/* for TR_TRACKER_WARNING and TR_TRACKER_ERROR */
56
56
/* for TR_TRACKER_PEERS */
57
const uint8_t * compact;
57
const uint8_t * compact;
63
tr_publisher_tag tr_trackerSubscribe ( struct tr_tracker * tag,
64
tr_delivery_func func,
63
tr_publisher_tag tr_trackerSubscribe( struct tr_tracker * tag,
64
tr_delivery_func func,
67
void tr_trackerUnsubscribe ( struct tr_tracker * tracker,
68
tr_publisher_tag tag );
67
void tr_trackerUnsubscribe( struct tr_tracker * tracker,
68
tr_publisher_tag tag );
74
void tr_trackerStat ( const tr_tracker * tracker,
75
struct tr_stat * setme);
77
void tr_trackerStart ( struct tr_tracker * );
79
void tr_trackerCompleted ( struct tr_tracker * );
81
void tr_trackerStop ( struct tr_tracker * );
83
void tr_trackerReannounce ( struct tr_tracker * );
85
void tr_trackerChangeMyPort ( struct tr_tracker * );
74
void tr_trackerStat( const tr_tracker * tracker,
75
struct tr_stat * setme );
77
void tr_trackerStart( struct tr_tracker * );
79
void tr_trackerCompleted( struct tr_tracker * );
81
void tr_trackerStop( struct tr_tracker * );
83
void tr_trackerReannounce( struct tr_tracker * );
85
void tr_trackerChangeMyPort( struct tr_tracker * );
87
87
const tr_tracker_info * tr_trackerGetAddress( struct tr_tracker * );
89
int tr_trackerCanManualAnnounce ( const struct tr_tracker * );
91
time_t tr_trackerGetManualAnnounceTime ( const struct tr_tracker * );
93
void tr_trackerGetCounts ( const struct tr_tracker *,
94
int * setme_completedCount,
95
int * setme_leecherCount,
96
int * setme_seederCount );
89
int tr_trackerCanManualAnnounce(
90
const struct tr_tracker * );
92
time_t tr_trackerGetManualAnnounceTime(
93
const struct tr_tracker * );
95
void tr_trackerGetCounts(
96
const struct tr_tracker *,
101
int * setme_seederCount );