(libT) add #ifdefs to ensure that client apps don't #include private libtransmission headers.
This commit is contained in:
parent
dfd731c9a4
commit
a1cd6d85dc
|
@ -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 */
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id:$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_BANDWIDTH_H
|
||||
#define TR_BANDWIDTH_H
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_BLOCKLIST_H
|
||||
#define TR_BLOCKLIST_H
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -22,6 +22,10 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#include "net.h"
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_HANDSHAKE_H
|
||||
#define TR_HANDSHAKE_H
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_LIST_H
|
||||
#define TR_LIST_H
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_NATPMP_H
|
||||
#define TR_NATPMP_H 1
|
||||
|
||||
|
|
|
@ -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_
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_PEER_H
|
||||
#define TR_PEER_H
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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_
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef _TR_PUBLISHER_H_
|
||||
#define _TR_PUBLISHER_H_
|
||||
|
||||
|
|
|
@ -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_
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_RESUME_H
|
||||
#define TR_RESUME_H
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_STATS_H
|
||||
#define TR_STATS_H
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef _TR_TRACKER_H_
|
||||
#define _TR_TRACKER_H_
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_UPNP_H
|
||||
#define TR_UPNP_H 1
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_VERIFY_H
|
||||
#define TR_VERIFY_H 1
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef __TRANSMISSION__
|
||||
#error only libtransmission should #include this header.
|
||||
#endif
|
||||
|
||||
#ifndef TR_WEBSEED_H
|
||||
#define TR_WEBSEED_H
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
#import "ExpandedPathToPathTransformer.h"
|
||||
#import "ExpandedPathToIconTransformer.h"
|
||||
#import "SpeedLimitToTurtleIconTransformer.h"
|
||||
#import "metainfo.h"
|
||||
#import "utils.h"
|
||||
|
||||
#import "UKKQueue.h"
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
#import "DragOverlayWindow.h"
|
||||
#import "DragOverlayView.h"
|
||||
#import "NSStringAdditions.h"
|
||||
#import "metainfo.h"
|
||||
|
||||
@implementation DragOverlayWindow
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#import "FileListNode.h"
|
||||
#import "NSApplicationAdditions.h"
|
||||
#import "NSStringAdditions.h"
|
||||
#import "metainfo.h"
|
||||
#import "utils.h" //tr_httpIsValidURL
|
||||
|
||||
@interface Torrent (Private)
|
||||
|
|
Loading…
Reference in New Issue