Changeset 3885
- Timestamp:
- Nov 19, 2007, 5:29:17 PM (15 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/transmission.c
r3787 r3885 341 341 } 342 342 343 void 344 tr_getGlobalStats( const tr_handle * handle, tr_global_stats * setme ) 345 { 346 assert( handle != NULL ); 347 assert( setme != NULL ); 348 349 /* FIXME */ 350 setme->downloadedGigs = 4; 351 setme->downloadedBytes = 8; 352 setme->uploadedGigs = 15; 353 setme->uploadedBytes = 16; 354 setme->ratio = 23; 355 setme->filesAdded = 42; 356 setme->sessionCount = 666; 357 } 358 343 359 tr_torrent ** 344 360 tr_loadTorrents ( tr_handle * h, -
trunk/libtransmission/transmission.h
r3872 r3885 97 97 * tr_init 98 98 *********************************************************************** 99 * Initializes a libtransmission instance . Returns a obscure handle to100 * be passed to allfunctions below. The tag argument is a short string99 * Initializes a libtransmission instance and returns an opaque handle 100 * to be passed to functions below. The tag argument is a short string 101 101 * unique to the program invoking tr_init(), it is currently used as 102 102 * part of saved torrent files' names to prevent one frontend from … … 109 109 tr_handle * tr_init( const char * tag ); 110 110 111 typedef struct tr_tracker_info tr_tracker_info; 111 /* shut down a libtransmission instance created by tr_init(). */ 112 void tr_close( tr_handle * ); 113 114 115 /** 116 *** 117 **/ 118 119 typedef struct tr_global_stats 120 { 121 uint64_t downloadedGigs; /* total down / GiB */ 122 uint64_t downloadedBytes; /* total down % GiB */ 123 uint64_t uploadedGigs; /* total up / GiB */ 124 uint64_t uploadedBytes; /* total up % GiB */ 125 double ratio; /* total up / total down */ 126 uint64_t filesAdded; /* number of files added */ 127 uint64_t sessionCount; /* program started N times */ 128 } 129 tr_global_stats; 130 131 void tr_getGlobalStats( const tr_handle * handle, tr_global_stats * setme ); 132 112 133 113 134 /** … … 292 313 **********************************************************************/ 293 314 void tr_torrentRates( tr_handle *, float *, float * ); 294 295 /***********************************************************************296 * tr_close297 ***********************************************************************298 * Frees memory allocated by tr_init.299 **********************************************************************/300 void tr_close( tr_handle * );301 315 302 316 … … 555 569 tr_piece; 556 570 571 typedef struct tr_tracker_info 572 { 573 char * address; 574 int port; 575 char * announce; 576 char * scrape; 577 } 578 tr_tracker_info; 579 557 580 struct tr_info 558 581 { … … 724 747 }; 725 748 726 struct tr_tracker_info727 {728 char * address;729 int port;730 char * announce;731 char * scrape;732 };733 734 749 struct tr_handle_status 735 750 {
Note: See TracChangeset
for help on using the changeset viewer.