source: trunk/libtransmission/bandwidth.h @ 7151

Last change on this file since 7151 was 7151, checked in by charles, 12 years ago

(libT) add #ifdefs to ensure that client apps don't #include private libtransmission headers.

File size: 1.5 KB
Line 
1/*
2 * This file Copyright (C) 2008 Charles Kerr <charles@rebelbase.com>
3 *
4 * This file is licensed by the GPL version 2.  Works owned by the
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.
7 * This exemption does not extend to derived works not owned by
8 * the Transmission project.
9 *
10 * $Id:$
11 */
12
13#ifndef __TRANSMISSION__
14#error only libtransmission should #include this header.
15#endif
16
17#ifndef TR_BANDWIDTH_H
18#define TR_BANDWIDTH_H
19
20typedef struct tr_bandwidth tr_bandwidth;
21
22/**
23***
24**/
25
26tr_bandwidth* tr_bandwidthNew           ( tr_session          * session );
27
28void          tr_bandwidthFree          ( tr_bandwidth        * bandwidth );
29
30/**
31***
32**/
33
34void          tr_bandwidthSetLimited    ( tr_bandwidth        * bandwidth,
35                                          size_t                byteCount );
36
37void          tr_bandwidthSetUnlimited  ( tr_bandwidth        * bandwidth );
38
39size_t        tr_bandwidthClamp         ( const tr_bandwidth  * bandwidth,
40                                          size_t                byteCount );
41
42/**
43***
44**/
45
46double        tr_bandwidthGetRawSpeed   ( const tr_bandwidth  * bandwidth );
47
48double        tr_bandwidthGetPieceSpeed ( const tr_bandwidth  * bandwidth );
49
50void          tr_bandwidthUsed          ( tr_bandwidth        * bandwidth,
51                                          size_t                byteCount,
52                                          int                   isPieceData );
53
54#endif
Note: See TracBrowser for help on using the repository browser.