mirror of
https://github.com/transmission/transmission
synced 2025-03-09 05:14:09 +00:00
remove unused functions tr_torrentSetActiveCallback() and tr_torrentClearActiveCallback()
This commit is contained in:
parent
793d5bc2b6
commit
7bfe7cc471
4 changed files with 1 additions and 56 deletions
|
@ -554,7 +554,7 @@ networkPage( GObject * core, gpointer alive )
|
|||
g_signal_connect( w, "toggled", G_CALLBACK(target_cb), w2 );
|
||||
hig_workarea_add_row_w( t, &row, w, w2, NULL );
|
||||
|
||||
s = _("_Forward these port(s) from my router" );
|
||||
s = _("Use port _forwarding from my router" );
|
||||
w = new_check_button( s, PREF_KEY_NAT, core );
|
||||
hig_workarea_add_wide_control( t, &row, w );
|
||||
|
||||
|
|
|
@ -964,32 +964,6 @@ freeTorrent( tr_torrent * tor )
|
|||
*** Start/Stop Callback
|
||||
**/
|
||||
|
||||
static void
|
||||
fireActiveChange( tr_torrent * tor, int isRunning )
|
||||
{
|
||||
assert( tor != NULL );
|
||||
|
||||
if( tor->active_func != NULL )
|
||||
(tor->active_func)( tor, isRunning, tor->active_func_user_data );
|
||||
}
|
||||
|
||||
void
|
||||
tr_torrentSetActiveCallback( tr_torrent * tor,
|
||||
tr_torrent_active_func func,
|
||||
void * user_data )
|
||||
{
|
||||
assert( tor != NULL );
|
||||
tor->active_func = func;
|
||||
tor->active_func_user_data = user_data;
|
||||
}
|
||||
|
||||
void
|
||||
tr_torrentClearActiveCallback( tr_torrent * torrent )
|
||||
{
|
||||
tr_torrentSetActiveCallback( torrent, NULL, NULL );
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
checkAndStartImpl( void * vtor )
|
||||
{
|
||||
|
@ -998,7 +972,6 @@ checkAndStartImpl( void * vtor )
|
|||
tr_globalLock( tor->handle );
|
||||
|
||||
tor->isRunning = 1;
|
||||
fireActiveChange( tor, tor->isRunning );
|
||||
*tor->errorString = '\0';
|
||||
tr_torrentResetTransferStats( tor );
|
||||
tor->cpStatus = tr_cpGetStatus( tor->completion );
|
||||
|
@ -1071,7 +1044,6 @@ stopTorrent( void * vtor )
|
|||
tr_verifyRemove( tor );
|
||||
tr_peerMgrStopTorrent( tor->handle->peerMgr, tor->info.hash );
|
||||
tr_trackerStop( tor->tracker );
|
||||
fireActiveChange( tor, 0 );
|
||||
|
||||
for( i=0; i<tor->info.fileCount; ++i )
|
||||
{
|
||||
|
|
|
@ -165,9 +165,6 @@ struct tr_torrent
|
|||
tr_torrent_status_func * status_func;
|
||||
void * status_func_user_data;
|
||||
|
||||
tr_torrent_active_func * active_func;
|
||||
void * active_func_user_data;
|
||||
|
||||
unsigned int isRunning : 1;
|
||||
unsigned int isDeleting : 1;
|
||||
|
||||
|
|
|
@ -712,30 +712,6 @@ void tr_torrentSetStatusCallback( tr_torrent * torrent,
|
|||
void tr_torrentClearStatusCallback( tr_torrent * torrent );
|
||||
|
||||
|
||||
|
||||
/**
|
||||
***
|
||||
**/
|
||||
|
||||
typedef void (tr_torrent_active_func)(tr_torrent * torrent,
|
||||
int isRunning,
|
||||
void * user_data );
|
||||
|
||||
/**
|
||||
* Register to be notified whenever a torrent starts or stops.
|
||||
*
|
||||
* func is invoked FROM LIBTRANSMISSION'S THREAD!
|
||||
* This means func must be fast (to avoid blocking peers),
|
||||
* shouldn't call libtransmission functions (to avoid deadlock),
|
||||
* and shouldn't modify client-level memory without using a mutex!
|
||||
*/
|
||||
void tr_torrentSetActiveCallback( tr_torrent * torrent,
|
||||
tr_torrent_active_func func,
|
||||
void * user_data );
|
||||
|
||||
void tr_torrentClearActiveCallback( tr_torrent * torrent );
|
||||
|
||||
|
||||
/**
|
||||
* MANUAL ANNOUNCE
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue