source: trunk/libtransmission/tr-lpd.h @ 12545

Last change on this file since 12545 was 12204, checked in by jordan, 11 years ago

(trunk) #4138 "use stdbool.h instead of tr_bool" -- done.

  • Property svn:keywords set to Date Rev Author Id
File size: 2.0 KB
Line 
1/*
2Copyright (c) 2010 by Johannes Lieder
3
4Permission is hereby granted, free of charge, to any person obtaining a copy
5of this software and associated documentation files (the "Software"), to deal
6in the Software without restriction, including without limitation the rights
7to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8copies of the Software, and to permit persons to whom the Software is
9furnished to do so, subject to the following conditions:
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20THE SOFTWARE.
21*/
22
23#ifndef __TRANSMISSION__
24 #error only libtransmission should #include this header.
25#endif
26
27#ifndef _TR_LPD_H
28#define _TR_LPD_H
29
30/* $Id: tr-lpd.h 12204 2011-03-22 15:19:54Z jordan $ */
31
32int  tr_lpdInit( tr_session*, tr_address* );
33void tr_lpdUninit( tr_session* );
34bool tr_lpdEnabled( const tr_session* );
35bool tr_lpdSendAnnounce( const tr_torrent* );
36
37/**
38* @defgroup Preproc Helper macros
39* @{
40*
41* @def lengthof
42* @brief returns the static length of a C array type
43* @note A lower case macro name is tolerable here since this definition of lengthof()
44* is intimately related to sizeof semantics.
45* Meaningful return values are only guaranteed for true array types. */
46#define lengthof( arr ) ( sizeof( *(arr) ) > 0 ? sizeof( arr ) / sizeof( *(arr) ) : 0 )
47
48/**
49* @def STATIC_ASSERT
50* @brief This helper allows to perform static checks at compile time */
51#define STATIC_ASSERT( x ) { const char static_check[( (x) ? 1 : -1 )] UNUSED; }
52
53/**
54* @} */
55
56#endif /* _TR_LPD_H */
57
Note: See TracBrowser for help on using the repository browser.