Changeset 11013 for trunk/libtransmission/transmission.h
- Timestamp:
- Jul 16, 2010, 3:12:57 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/transmission.h
r10999 r11013 171 171 #define TR_PREFS_KEY_DOWNLOAD_DIR "download-dir" 172 172 #define TR_PREFS_KEY_ENCRYPTION "encryption" 173 #define TR_PREFS_KEY_INACTIVE_LIMIT "inactive-limit" 174 #define TR_PREFS_KEY_INACTIVE_LIMIT_ENABLED "inactive-limit-enabled" 173 175 #define TR_PREFS_KEY_INCOMPLETE_DIR "incomplete-dir" 174 176 #define TR_PREFS_KEY_INCOMPLETE_DIR_ENABLED "incomplete-dir-enabled" … … 724 726 double tr_sessionGetRatioLimit ( const tr_session * ); 725 727 728 void tr_sessionSetInactivityLimited ( tr_session *, tr_bool isLimited ); 729 tr_bool tr_sessionIsInactivityLimited ( const tr_session * ); 730 731 void tr_sessionSetInactiveLimit ( tr_session *, uint64_t inactivityMinutes ); 732 uint64_t tr_sessionGetInactiveLimit ( const tr_session * ); 733 726 734 void tr_sessionSetPeerLimit( tr_session *, uint16_t maxGlobalPeers ); 727 735 uint16_t tr_sessionGetPeerLimit( const tr_session * ); … … 1160 1168 tr_bool tr_torrentGetSeedRatio( const tr_torrent *, double * ratio ); 1161 1169 1170 1171 /**** 1172 ***** Inactive Time Limits 1173 ****/ 1174 1175 typedef enum 1176 { 1177 TR_INACTIVELIMIT_GLOBAL = 0, /* follow the global settings */ 1178 TR_INACTIVELIMIT_SINGLE = 1, /* override the global settings, seeding until a certain inactive time */ 1179 TR_INACTIVELIMIT_UNLIMITED = 2 /* override the global settings, seeding regardless of activity */ 1180 } 1181 tr_inactvelimit; 1182 1183 void tr_torrentSetInactiveMode( tr_torrent * tor, 1184 tr_inactvelimit mode ); 1185 1186 tr_ratiolimit tr_torrentGetInactiveMode( const tr_torrent * tor ); 1187 1188 void tr_torrentSetInactiveLimit( tr_torrent * tor, 1189 uint64_t inactiveMinutes ); 1190 1191 uint64_t tr_torrentGetInactiveLimit( const tr_torrent * tor ); 1192 1193 1194 tr_bool tr_torrentGetSeedInactive( const tr_torrent *, uint64_t * inactiveMinutes ); 1195 1162 1196 /**** 1163 1197 ***** Peer Limits … … 1289 1323 void * user_data ); 1290 1324 1325 typedef void ( tr_torrent_inactive_limit_hit_func )( tr_torrent * torrent, 1326 void * user_data ); 1327 1328 1291 1329 /** 1292 1330 * Register to be notified whenever a torrent's "completeness" … … 1337 1375 1338 1376 void tr_torrentClearRatioLimitHitCallback( tr_torrent * torrent ); 1377 1378 /** 1379 * Register to be notified whenever a torrent's inactivity limit 1380 * has been hit. This will be called when the seeding torrent's 1381 * idle time has met or exceeded the designated inactivity limit. 1382 * 1383 * Has the same restrictions as tr_torrentSetCompletenessCallback 1384 */ 1385 void tr_torrentSetInactivityLimitHitCallback( 1386 tr_torrent * torrent, 1387 tr_torrent_inactive_limit_hit_func func, 1388 void * user_data ); 1389 1390 void tr_torrentClearInactiveLimitHitCallback( tr_torrent * torrent ); 1339 1391 1340 1392 … … 1847 1899 -1 if activity is not seeding or downloading. */ 1848 1900 int idleSecs; 1849 1901 1850 1902 /** A torrent is considered finished if it has met its seed ratio. 1851 1903 As a result, only paused torrents can be finished. */
Note: See TracChangeset
for help on using the changeset viewer.