mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 02:18:42 +00:00
(trunk) add #include guards to prevent non-libtransmission files from #including implementation headers
This commit is contained in:
@@ -36,7 +36,6 @@
|
||||
|
||||
#include <libtransmission/transmission.h>
|
||||
#include <libtransmission/bencode.h>
|
||||
#include <libtransmission/platform.h>
|
||||
|
||||
#include "conf.h"
|
||||
#include "tr-prefs.h"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef JSON_PARSER_H
|
||||
#define JSON_PARSER_H
|
||||
|
||||
|
||||
@@ -10,10 +10,16 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_CLIENTS_H
|
||||
#define TR_CLIENTS_H
|
||||
|
||||
/**
|
||||
* @ingroup utils
|
||||
*/
|
||||
void tr_clientForId( char * buf,
|
||||
size_t buflen,
|
||||
const void * peer_id );
|
||||
void tr_clientForId( char * buf, size_t buflen, const void * peer_id );
|
||||
|
||||
#endif
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
#ifndef TR_PLATFORM_H
|
||||
#define TR_PLATFORM_H
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#if defined( WIN32 )
|
||||
#define TR_PATH_DELIMITER '\\'
|
||||
#define TR_PATH_DELIMITER_STR "\\"
|
||||
|
||||
@@ -20,11 +20,18 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#define TR_DHT_STOPPED 0
|
||||
#define TR_DHT_BROKEN 1
|
||||
#define TR_DHT_POOR 2
|
||||
#define TR_DHT_FIREWALLED 3
|
||||
#define TR_DHT_GOOD 4
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
TR_DHT_STOPPED = 0,
|
||||
TR_DHT_BROKEN = 1,
|
||||
TR_DHT_POOR = 2,
|
||||
TR_DHT_FIREWALLED = 3,
|
||||
TR_DHT_GOOD = 4
|
||||
};
|
||||
|
||||
int tr_dhtInit( tr_session *, const tr_address * );
|
||||
void tr_dhtUninit( tr_session * );
|
||||
|
||||
Reference in New Issue
Block a user