1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

add "this session" stats stubs for BentMyWookie

This commit is contained in:
Charles Kerr 2007-11-19 20:07:21 +00:00
parent 963dd61f72
commit b61dcfdbff
2 changed files with 17 additions and 4 deletions

View file

@ -341,7 +341,7 @@ tr_close( tr_handle * h )
}
void
tr_getGlobalStats( const tr_handle * handle, tr_global_stats * setme )
tr_getSessionStats( const tr_handle * handle, tr_session_stats * setme )
{
assert( handle != NULL );
assert( setme != NULL );
@ -357,6 +357,12 @@ tr_getGlobalStats( const tr_handle * handle, tr_global_stats * setme )
setme->secondsActive = 2112;
}
void
tr_getAccumulatedStats( const tr_handle * handle, tr_session_stats * setme )
{
tr_getSessionStats( handle, setme );
}
tr_torrent **
tr_loadTorrents ( tr_handle * h,
const char * fallbackDestination,

View file

@ -116,7 +116,7 @@ void tr_close( tr_handle * );
***
**/
typedef struct tr_global_stats
typedef struct tr_session_stats
{
uint64_t downloadedGigs; /* total down / GiB */
uint64_t downloadedBytes; /* total down % GiB */
@ -127,9 +127,16 @@ typedef struct tr_global_stats
uint64_t sessionCount; /* program started N times */
uint64_t secondsActive; /* how long Transmisson's been running */
}
tr_global_stats;
tr_session_stats;
void tr_getGlobalStats( const tr_handle * handle, tr_global_stats * setme );
/* stats accumulated across all the times that Transmission's been used. */
void tr_getCumulativeSessionStats( const tr_handle * handle,
tr_session_stats * setme );
/* stats accumulated during this current session.
'sessionCount' is pretty useless here, eh? :) */
void tr_getSessionStats( const tr_handle * handle,
tr_session_stats * setme );
/**