]> granicus.if.org Git - transmission/commitdiff
(trunk libT) Get rid of peer-mgr-private.h (from wereHamster)
authorCharles Kerr <charles@transmissionbt.com>
Tue, 13 Jan 2009 16:32:43 +0000 (16:32 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Tue, 13 Jan 2009 16:32:43 +0000 (16:32 +0000)
libtransmission/Makefile.am
libtransmission/peer-mgr-private.h [deleted file]
libtransmission/peer-mgr.c
libtransmission/peer-mgr.h
libtransmission/peer-msgs.c

index 167d3ef70ab801be11ef12fd7fc844a4524a1c58..4f869d3549e30f4b8b432b08d2d5bd888eda42ac 100644 (file)
@@ -80,7 +80,6 @@ noinst_HEADERS = \
     peer-common.h \
     peer-io.h \
     peer-mgr.h \
-    peer-mgr-private.h \
     peer-msgs.h \
     platform.h \
     port-forwarding.h \
diff --git a/libtransmission/peer-mgr-private.h b/libtransmission/peer-mgr-private.h
deleted file mode 100644 (file)
index c491127..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * This file Copyright (C) 2007-2009 Charles Kerr <charles@transmissionbt.com>
- *
- * This file is licensed by the GPL version 2.  Works owned by the
- * Transmission project are granted a special exemption to clause 2(b)
- * so that the bulk of its code can remain under the MIT license.
- * This exemption does not extend to derived works not owned by
- * the Transmission project.
- *
- * $Id$
- */
-
-#ifndef __TRANSMISSION__
-#error only libtransmission should #include this header.
-#endif
-
-#ifndef TR_PEER_MGR_PRIVATE_H
-#define TR_PEER_MGR_PRIVATE_H
-
-#include <inttypes.h> /* uint16_t */
-
-#ifdef WIN32
- #include <winsock2.h> /* struct in_addr */
-#endif
-
-#include "publish.h" /* tr_publisher_tag */
-
-struct tr_bandwidth;
-struct tr_bitfield;
-struct tr_peerIo;
-struct tr_peermsgs;
-
-enum
-{
-    ENCRYPTION_PREFERENCE_UNKNOWN,
-    ENCRYPTION_PREFERENCE_YES,
-    ENCRYPTION_PREFERENCE_NO
-};
-
-/**
- * State information about a connected peer.
- *
- * @see struct peer_atom
- * @see tr_peermsgs
- */
-typedef struct tr_peer
-{
-    tr_bool                  peerIsChoked;
-    tr_bool                  peerIsInterested;
-    tr_bool                  clientIsChoked;
-    tr_bool                  clientIsInterested;
-    tr_bool                  doPurge;
-
-    /* number of bad pieces they've contributed to */
-    uint8_t                  strikes;
-
-    uint8_t                  encryption_preference;
-    tr_port                  port;
-    tr_address               addr;
-    struct tr_peerIo       * io;
-
-    struct tr_bitfield     * blame;
-    struct tr_bitfield     * have;
-
-    /** how complete the peer's copy of the torrent is. [0.0...1.0] */
-    float                    progress;
-
-    /* the client name from the `v' string in LTEP's handshake dictionary */
-    char                   * client;
-
-    time_t                   chokeChangedAt;
-
-    struct tr_peermsgs     * msgs;
-    tr_publisher_tag         msgsTag;
-}
-tr_peer;
-
-double tr_peerGetPieceSpeed( const tr_peer    * peer,
-                             uint64_t           now,
-                             tr_direction       direction );
-
-#endif
index 19b7968d3b87257ff463c19339ba637da20b02a2..42617fcd66e816b4e0fec58f64312d7b74f12bdf 100644 (file)
@@ -32,7 +32,6 @@
 #include "net.h"
 #include "peer-io.h"
 #include "peer-mgr.h"
-#include "peer-mgr-private.h"
 #include "peer-msgs.h"
 #include "ptrarray.h"
 #include "stats.h" /* tr_statsAddUploaded, tr_statsAddDownloaded */
index f9d704344b0af0766b52ebc293b9e30ed39badb2..bbc4b92a86d2aa70d80cf1f8c09b8179a9772001 100644 (file)
@@ -24,6 +24,7 @@
 #endif
 
 #include "net.h"
+#include "publish.h" /* tr_publisher_tag */
 
 struct tr_peer_stat;
 struct tr_torrent;
@@ -46,6 +47,58 @@ typedef struct tr_pex
 }
 tr_pex;
 
+
+struct tr_bandwidth;
+struct tr_bitfield;
+struct tr_peerIo;
+struct tr_peermsgs;
+
+enum
+{
+    ENCRYPTION_PREFERENCE_UNKNOWN,
+    ENCRYPTION_PREFERENCE_YES,
+    ENCRYPTION_PREFERENCE_NO
+};
+
+/**
+ * State information about a connected peer.
+ *
+ * @see struct peer_atom
+ * @see tr_peermsgs
+ */
+typedef struct tr_peer
+{
+    tr_bool                  peerIsChoked;
+    tr_bool                  peerIsInterested;
+    tr_bool                  clientIsChoked;
+    tr_bool                  clientIsInterested;
+    tr_bool                  doPurge;
+
+    /* number of bad pieces they've contributed to */
+    uint8_t                  strikes;
+
+    uint8_t                  encryption_preference;
+    tr_port                  port;
+    tr_address               addr;
+    struct tr_peerIo       * io;
+
+    struct tr_bitfield     * blame;
+    struct tr_bitfield     * have;
+
+    /** how complete the peer's copy of the torrent is. [0.0...1.0] */
+    float                    progress;
+
+    /* the client name from the `v' string in LTEP's handshake dictionary */
+    char                   * client;
+
+    time_t                   chokeChangedAt;
+
+    struct tr_peermsgs     * msgs;
+    tr_publisher_tag         msgsTag;
+}
+tr_peer;
+
+
 int tr_pexCompare( const void * a, const void * b );
 
 tr_peerMgr* tr_peerMgrNew( tr_session * );
@@ -133,4 +186,8 @@ float* tr_peerMgrWebSpeeds( const tr_peerMgr  * manager,
                             const uint8_t     * torrentHash );
 
 
+double tr_peerGetPieceSpeed( const tr_peer    * peer,
+                             uint64_t           now,
+                             tr_direction       direction );
+
 #endif
index f0dca57acdd2e584d476eaf4255d20561c235e79..81ca8c4187ce4ff5b9e176667c597aec6c0d4e1c 100644 (file)
@@ -30,7 +30,6 @@
 #endif
 #include "peer-io.h"
 #include "peer-mgr.h"
-#include "peer-mgr-private.h"
 #include "peer-msgs.h"
 #include "platform.h" /* MAX_STACK_ARRAY_SIZE */
 #include "ratecontrol.h"