Skip to content

Commit 26be56a

Browse files
authored
Moved Poll to net namespace.
1 parent 53237ad commit 26be56a

20 files changed

+38
-33
lines changed

src/dht/dht_server.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#include "torrent/object.h"
1515
#include "torrent/object_static_map.h"
1616
#include "torrent/object_stream.h"
17-
#include "torrent/poll.h"
1817
#include "torrent/net/fd.h"
18+
#include "torrent/net/poll.h"
1919
#include "torrent/net/socket_address.h"
2020
#include "torrent/net/network_config.h"
2121
#include "torrent/net/network_manager.h"

src/manager.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
#include "protocol/handshake_manager.h"
1111
#include "torrent/chunk_manager.h"
1212
#include "torrent/connection_manager.h"
13+
#include "torrent/throttle.h"
1314
#include "torrent/data/file_manager.h"
1415
#include "torrent/download/choke_group.h"
1516
#include "torrent/download/choke_queue.h"
1617
#include "torrent/download/download_manager.h"
1718
#include "torrent/download/resource_manager.h"
18-
#include "torrent/peer/client_list.h"
19-
#include "torrent/poll.h"
20-
#include "torrent/throttle.h"
2119
#include "torrent/net/network_config.h"
2220
#include "torrent/net/network_manager.h"
21+
#include "torrent/net/poll.h"
22+
#include "torrent/peer/client_list.h"
2323
#include "utils/instrumentation.h"
2424
#include "utils/thread_internal.h"
2525

src/net/curl_socket.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
#include <cassert>
66
#include <curl/multi.h>
7-
#include <torrent/poll.h>
8-
#include <torrent/exceptions.h>
97

108
#include "net/curl_stack.h"
9+
#include "torrent/net/poll.h"
10+
#include "torrent/exceptions.h"
1111

1212
namespace torrent::net {
1313

src/net/listen.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#include "manager.h"
66
#include "torrent/connection_manager.h"
77
#include "torrent/exceptions.h"
8-
#include "torrent/poll.h"
98
#include "torrent/net/fd.h"
9+
#include "torrent/net/poll.h"
1010
#include "torrent/net/socket_address.h"
1111
#include "torrent/utils/log.h"
1212

src/net/socket_base.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <cassert>
66
#include <sys/socket.h>
77

8-
#include "torrent/poll.h"
8+
#include "torrent/net/poll.h"
99

1010
namespace torrent {
1111

src/net/udns_resolver.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#include "net/udns/udns.h"
1111
#include "torrent/common.h"
1212
#include "torrent/exceptions.h"
13+
#include "torrent/net/poll.h"
1314
#include "torrent/net/socket_address.h"
14-
#include "torrent/poll.h"
1515
#include "torrent/utils/log.h"
1616
#include "torrent/utils/thread.h"
1717

src/protocol/handshake.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
#include "torrent/download_info.h"
1414
#include "torrent/error.h"
1515
#include "torrent/exceptions.h"
16-
#include "torrent/poll.h"
1716
#include "torrent/throttle.h"
1817
#include "torrent/net/fd.h"
1918
#include "torrent/net/network_config.h"
2019
#include "torrent/net/network_manager.h"
20+
#include "torrent/net/poll.h"
2121
#include "torrent/utils/log.h"
2222
#include "utils/diffie_hellman.h"
2323
#include "utils/sha1.h"

src/protocol/peer_connection_base.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
#include "protocol/peer_chunks.h"
1010
#include "protocol/protocol_base.h"
1111
#include "protocol/request_list.h"
12-
#include "torrent/poll.h"
13-
#include "torrent/peer/peer.h"
12+
#include "torrent/net/poll.h"
1413
#include "torrent/peer/choke_status.h"
14+
#include "torrent/peer/peer.h"
1515

1616
namespace torrent {
1717

src/torrent/Makefile.am

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ libtorrent_torrent_la_SOURCES = \
4848
net/network_config.h \
4949
net/network_manager.cc \
5050
net/network_manager.h \
51+
net/poll.h \
52+
net/poll_epoll.cc \
53+
net/poll_kqueue.cc \
5154
net/resolver.cc \
5255
net/resolver.h \
5356
net/socket_address.cc \
@@ -135,9 +138,6 @@ libtorrent_torrent_la_SOURCES = \
135138
object_stream.h \
136139
path.cc \
137140
path.h \
138-
poll.h \
139-
poll_epoll.cc \
140-
poll_kqueue.cc \
141141
rate.cc \
142142
rate.h \
143143
throttle.cc \
@@ -179,6 +179,7 @@ libtorrent_torrent_net_include_HEADERS = \
179179
net/http_stack.h \
180180
net/network_config.h \
181181
net/network_manager.h \
182+
net/poll.h \
182183
net/resolver.h \
183184
net/socket_address.h \
184185
net/socket_address_key.h \
@@ -237,7 +238,6 @@ libtorrent_torrent_include_HEADERS = \
237238
object_static_map.h \
238239
object_stream.h \
239240
path.h \
240-
poll.h \
241241
rate.h \
242242
throttle.h \
243243
torrent.h

src/torrent/common.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ class PeerConnectionBase;
6868
class PeerInfo;
6969
class PeerList;
7070
class Piece;
71-
class Poll;
7271
class ProtocolExtension;
7372
class Rate;
7473
class ResourceManager;
@@ -79,22 +78,29 @@ class TrackerList;
7978
class TransferList;
8079

8180
namespace net {
81+
8282
class HttpGet;
8383
class HttpStack;
8484
class NetworkConfig;
8585
class NetworkManager;
86+
class Poll;
8687
class Resolver;
88+
8789
} // namespace net
8890

8991
namespace tracker {
92+
9093
class DhtController;
9194
class Tracker;
95+
9296
} // namespace tracker
9397

9498
namespace utils {
99+
95100
class Scheduler;
96101
class SchedulerEntry;
97102
class Thread;
103+
98104
} // namespace utils
99105

100106
} // namespace torrent
@@ -132,7 +138,7 @@ void callback(void* target, std::function<void ()>&& fn);
132138
void cancel_callback(void* target);
133139
void cancel_callback_and_wait(void* target);
134140

135-
Poll* poll() LIBTORRENT_EXPORT;
141+
net::Poll* poll() LIBTORRENT_EXPORT;
136142
net::Resolver* resolver() LIBTORRENT_EXPORT;
137143
utils::Scheduler* scheduler() LIBTORRENT_EXPORT;
138144

0 commit comments

Comments
 (0)