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

This commit is contained in:
Charles Kerr 2008-11-24 20:17:36 +00:00
parent dfd731c9a4
commit a1cd6d85dc
37 changed files with 130 additions and 7 deletions

View File

@ -31,7 +31,6 @@
#include <libtransmission/transmission.h>
#include <libtransmission/bencode.h>
#include <libtransmission/makemeta.h>
#include <libtransmission/metainfo.h> /* tr_metainfoFree */
#include <libtransmission/tr-getopt.h>
#include <libtransmission/utils.h> /* tr_wait */
#include <libtransmission/web.h> /* tr_webRun */

View File

@ -22,7 +22,6 @@
#include <libtransmission/transmission.h>
#include <libtransmission/bencode.h>
#include <libtransmission/rpcimpl.h>
#include <libtransmission/tr-getopt.h>
#include <libtransmission/utils.h>
#include <libtransmission/version.h>

View File

@ -10,6 +10,10 @@
* $Id:$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_BANDWIDTH_H
#define TR_BANDWIDTH_H

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_BLOCKLIST_H
#define TR_BLOCKLIST_H

View File

@ -25,6 +25,10 @@
#ifndef TR_COMPLETION_H
#define TR_COMPLETION_H
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#include "transmission.h"
struct tr_bitfield;

View File

@ -13,6 +13,10 @@
#ifndef TR_ENCRYPTION_H
#define TR_ENCRYPTION_H
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#include <inttypes.h>
#include "utils.h" /* TR_GNUC_NULL_TERMINATED */

View File

@ -22,6 +22,10 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_FAST_RESUME_H
#define TR_FAST_RESUME_H

View File

@ -22,6 +22,10 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#include "net.h"
/***********************************************************************

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_HANDSHAKE_H
#define TR_HANDSHAKE_H

View File

@ -22,6 +22,10 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_IO_H
#define TR_IO_H 1

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_LIST_H
#define TR_LIST_H

View File

@ -22,6 +22,10 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_METAINFO_H
#define TR_METAINFO_H 1
@ -37,8 +41,6 @@ int tr_metainfoParse( const tr_handle * handle,
tr_info * info,
const struct tr_benc * benc );
void tr_metainfoFree( tr_info * inf );
void tr_metainfoRemoveSaved( const tr_handle * handle,
const tr_info * info );

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_NATPMP_H
#define TR_NATPMP_H 1

View File

@ -22,6 +22,10 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef _TR_NET_H_
#define _TR_NET_H_

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_PEER_H
#define TR_PEER_H

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_PEER_IO_H
#define TR_PEER_IO_H

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_PEER_MGR_PRIVATE_H
#define TR_PEER_MGR_PRIVATE_H

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_PEER_MGR_H
#define TR_PEER_MGR_H

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_PEER_MSGS_H
#define TR_PEER_MSGS_H

View File

@ -22,6 +22,10 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef SHARED_H
#define SHARED_H 1

View File

@ -22,6 +22,10 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef _TR_PTR_ARRAY_H_
#define _TR_PTR_ARRAY_H_

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef _TR_PUBLISHER_H_
#define _TR_PUBLISHER_H_

View File

@ -22,6 +22,10 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef _TR_RATECONTROL_H_
#define _TR_RATECONTROL_H_

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_RESUME_H
#define TR_RESUME_H

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_RPC_SERVER_H
#define TR_RPC_SERVER_H

View File

@ -22,6 +22,10 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_INTERNAL_H
#define TR_INTERNAL_H 1

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_STATS_H
#define TR_STATS_H

View File

@ -22,6 +22,10 @@
* DEALINGS IN THE SOFTWARE.
*****************************************************************************/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_TORRENT_H
#define TR_TORRENT_H 1

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef _TR_TRACKER_H_
#define _TR_TRACKER_H_

View File

@ -806,6 +806,11 @@ int tr_torrentParse( const tr_session * session,
const tr_ctor * ctor,
tr_info * setme_info_or_NULL );
/** @brief free a metainfo
@see tr_torrentParse */
void tr_metainfoFree( tr_info * inf );
/** Instantiate a single torrent.
@return 0 on success,
TR_EINVALID if the torrent couldn't be parsed, or

View File

@ -10,7 +10,12 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_EVENT_H
#define TR_EVENT_H
#include <stddef.h> /* size_t */
#include <inttypes.h> /* uint64_t */

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_UPNP_H
#define TR_UPNP_H 1

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_VERIFY_H
#define TR_VERIFY_H 1

View File

@ -10,6 +10,10 @@
* $Id$
*/
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#ifndef TR_WEBSEED_H
#define TR_WEBSEED_H

View File

@ -48,7 +48,6 @@
#import "ExpandedPathToPathTransformer.h"
#import "ExpandedPathToIconTransformer.h"
#import "SpeedLimitToTurtleIconTransformer.h"
#import "metainfo.h"
#import "utils.h"
#import "UKKQueue.h"

View File

@ -25,7 +25,6 @@
#import "DragOverlayWindow.h"
#import "DragOverlayView.h"
#import "NSStringAdditions.h"
#import "metainfo.h"
@implementation DragOverlayWindow

View File

@ -27,7 +27,6 @@
#import "FileListNode.h"
#import "NSApplicationAdditions.h"
#import "NSStringAdditions.h"
#import "metainfo.h"
#import "utils.h" //tr_httpIsValidURL
@interface Torrent (Private)