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 | |
---|
20 | typedef struct tr_bandwidth tr_bandwidth; |
---|
21 | |
---|
22 | /** |
---|
23 | *** |
---|
24 | **/ |
---|
25 | |
---|
26 | tr_bandwidth* tr_bandwidthNew ( tr_session * session ); |
---|
27 | |
---|
28 | void tr_bandwidthFree ( tr_bandwidth * bandwidth ); |
---|
29 | |
---|
30 | /** |
---|
31 | *** |
---|
32 | **/ |
---|
33 | |
---|
34 | void tr_bandwidthSetLimited ( tr_bandwidth * bandwidth, |
---|
35 | size_t byteCount ); |
---|
36 | |
---|
37 | void tr_bandwidthSetUnlimited ( tr_bandwidth * bandwidth ); |
---|
38 | |
---|
39 | size_t tr_bandwidthClamp ( const tr_bandwidth * bandwidth, |
---|
40 | size_t byteCount ); |
---|
41 | |
---|
42 | /** |
---|
43 | *** |
---|
44 | **/ |
---|
45 | |
---|
46 | double tr_bandwidthGetRawSpeed ( const tr_bandwidth * bandwidth ); |
---|
47 | |
---|
48 | double tr_bandwidthGetPieceSpeed ( const tr_bandwidth * bandwidth ); |
---|
49 | |
---|
50 | void 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.