Changeset 9765


Ignore:
Timestamp:
Dec 15, 2009, 12:51:39 AM (12 years ago)
Author:
charles
Message:

(trunk) add #include guards to prevent non-libtransmission files from #including implementation headers

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/conf.c

    r9546 r9765  
    3737#include <libtransmission/transmission.h>
    3838#include <libtransmission/bencode.h>
    39 #include <libtransmission/platform.h>
    4039
    4140#include "conf.h"
  • trunk/libtransmission/JSON_parser.h

    r9485 r9765  
     1#ifndef __TRANSMISSION__
     2#error only libtransmission should #include this header.
     3#endif
     4
    15#ifndef JSON_PARSER_H
    26#define JSON_PARSER_H
  • trunk/libtransmission/clients.h

    r9671 r9765  
    1111 */
    1212
     13#ifndef __TRANSMISSION__
     14 #error only libtransmission should #include this header.
     15#endif
     16
     17#ifndef TR_CLIENTS_H
     18#define TR_CLIENTS_H
     19
    1320/**
    1421 * @ingroup utils
    1522 */
    16 void tr_clientForId( char       * buf,
    17                      size_t       buflen,
    18                      const void * peer_id );
     23void tr_clientForId( char * buf, size_t buflen, const void * peer_id );
    1924
     25#endif
  • trunk/libtransmission/platform.h

    r9671 r9765  
    1313#ifndef TR_PLATFORM_H
    1414#define TR_PLATFORM_H
     15
     16#ifndef __TRANSMISSION__
     17 #error only libtransmission should #include this header.
     18#endif
    1519
    1620#if defined( WIN32 )
  • trunk/libtransmission/tr-dht.h

    r9549 r9765  
    2121*/
    2222
    23 #define TR_DHT_STOPPED 0
    24 #define TR_DHT_BROKEN 1
    25 #define TR_DHT_POOR 2
    26 #define TR_DHT_FIREWALLED 3
    27 #define TR_DHT_GOOD 4
     23#ifndef __TRANSMISSION__
     24 #error only libtransmission should #include this header.
     25#endif
     26
     27enum
     28{
     29    TR_DHT_STOPPED      = 0,
     30    TR_DHT_BROKEN       = 1,
     31    TR_DHT_POOR         = 2,
     32    TR_DHT_FIREWALLED   = 3,
     33    TR_DHT_GOOD         = 4
     34};
    2835
    2936int  tr_dhtInit( tr_session *, const tr_address * );
Note: See TracChangeset for help on using the changeset viewer.