summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam T <sta.cs.vsu@gmail.com>2013-04-21 00:01:22 +0400
committerSam T <sta.cs.vsu@gmail.com>2013-04-21 00:01:22 +0400
commit3c32f381afea629e06e8f069e0a3fefc72c8732e (patch)
tree194a4ade1cf7dd4d747e39397a8170a6b253f749 /src
parent08bb327005c2f0dc517d0a74cf29e9f7f9b08e21 (diff)
~ Rename modules.
Diffstat (limited to 'src')
-rw-r--r--src/Network/BitTorrent.hs9
-rw-r--r--src/Network/BitTorrent/PeerID.hs (renamed from src/Network/Torrent/PeerID.hs)2
-rw-r--r--src/Network/BitTorrent/PeerWire.hs17
-rw-r--r--src/Network/BitTorrent/PeerWire/Block.hs (renamed from src/Network/Torrent/PeerWire/Block.hs)2
-rw-r--r--src/Network/BitTorrent/PeerWire/Handshake.hs (renamed from src/Network/Torrent/PeerWire/Handshake.hs)6
-rw-r--r--src/Network/BitTorrent/PeerWire/Message.hs (renamed from src/Network/Torrent/PeerWire/Message.hs)4
-rw-r--r--src/Network/BitTorrent/Tracker.hs (renamed from src/Network/Torrent/Tracker.hs)10
-rw-r--r--src/Network/BitTorrent/Tracker/Scrape.hs (renamed from src/Network/Torrent/Tracker/Scrape.hs)2
-rw-r--r--src/Network/Torrent.hs9
-rw-r--r--src/Network/Torrent/PeerWire.hs17
10 files changed, 40 insertions, 38 deletions
diff --git a/src/Network/BitTorrent.hs b/src/Network/BitTorrent.hs
new file mode 100644
index 00000000..9c1977d4
--- /dev/null
+++ b/src/Network/BitTorrent.hs
@@ -0,0 +1,9 @@
1module Network.BitTorrent
2 ( module Network.BitTorrent.PeerID
3 , module Network.BitTorrent.Tracker
4 , module Network.BitTorrent.PeerWire
5 ) where
6
7import Network.BitTorrent.PeerID
8import Network.BitTorrent.Tracker
9import Network.BitTorrent.PeerWire
diff --git a/src/Network/Torrent/PeerID.hs b/src/Network/BitTorrent/PeerID.hs
index 7d928f80..cef1fa58 100644
--- a/src/Network/Torrent/PeerID.hs
+++ b/src/Network/BitTorrent/PeerID.hs
@@ -12,7 +12,7 @@
12-- though this module exports some other goodies for custom generation. 12-- though this module exports some other goodies for custom generation.
13-- 13--
14{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving #-} 14{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving #-}
15module Network.Torrent.PeerID 15module Network.BitTorrent.PeerID
16 ( -- * Peer addr 16 ( -- * Peer addr
17 Peer(..) 17 Peer(..)
18 , peerSockAddr, connectToPeer 18 , peerSockAddr, connectToPeer
diff --git a/src/Network/BitTorrent/PeerWire.hs b/src/Network/BitTorrent/PeerWire.hs
new file mode 100644
index 00000000..768da5f2
--- /dev/null
+++ b/src/Network/BitTorrent/PeerWire.hs
@@ -0,0 +1,17 @@
1-- |
2-- Copyright : (c) Sam T. 2013
3-- License : MIT
4-- Maintainer : pxqr.sta@gmail.com
5-- Stability : experimental
6-- Portability : portable
7--
8{-# LANGUAGE DoAndIfThenElse #-}
9module Network.BitTorrent.PeerWire
10 ( module Network.BitTorrent.PeerWire.Block
11 , module Network.BitTorrent.PeerWire.Message
12 , module Network.BitTorrent.PeerWire.Handshake
13 ) where
14
15import Network.BitTorrent.PeerWire.Block
16import Network.BitTorrent.PeerWire.Message
17import Network.BitTorrent.PeerWire.Handshake
diff --git a/src/Network/Torrent/PeerWire/Block.hs b/src/Network/BitTorrent/PeerWire/Block.hs
index 056f6b18..33e3dead 100644
--- a/src/Network/Torrent/PeerWire/Block.hs
+++ b/src/Network/BitTorrent/PeerWire/Block.hs
@@ -1,4 +1,4 @@
1module Network.Torrent.PeerWire.Block 1module Network.BitTorrent.PeerWire.Block
2 ( BlockIx(..), Block(..) 2 ( BlockIx(..), Block(..)
3 , defaultBlockSize 3 , defaultBlockSize
4 , blockRange, ixRange, pieceIx 4 , blockRange, ixRange, pieceIx
diff --git a/src/Network/Torrent/PeerWire/Handshake.hs b/src/Network/BitTorrent/PeerWire/Handshake.hs
index 733d5785..6ce37887 100644
--- a/src/Network/Torrent/PeerWire/Handshake.hs
+++ b/src/Network/BitTorrent/PeerWire/Handshake.hs
@@ -6,7 +6,7 @@
6-- Portability : portable 6-- Portability : portable
7-- 7--
8{-# LANGUAGE OverloadedStrings #-} 8{-# LANGUAGE OverloadedStrings #-}
9module Network.Torrent.PeerWire.Handshake 9module Network.BitTorrent.PeerWire.Handshake
10 ( Handshake 10 ( Handshake
11 , handshakeMaxSize 11 , handshakeMaxSize
12 , defaultBTProtocol, defaultReserved, defaultHandshake 12 , defaultBTProtocol, defaultReserved, defaultHandshake
@@ -21,7 +21,9 @@ import Data.Serialize as S
21import Data.Torrent.InfoHash 21import Data.Torrent.InfoHash
22import Network 22import Network
23import Network.Socket.ByteString 23import Network.Socket.ByteString
24import Network.Torrent.PeerID 24
25import Network.BitTorrent.PeerID
26
25 27
26-- | In order to establish the connection between peers we should send 'Handshake' 28-- | In order to establish the connection between peers we should send 'Handshake'
27-- message. The 'Handshake' is a required message and must be the first message 29-- message. The 'Handshake' is a required message and must be the first message
diff --git a/src/Network/Torrent/PeerWire/Message.hs b/src/Network/BitTorrent/PeerWire/Message.hs
index e04038ff..1bcb2ee5 100644
--- a/src/Network/Torrent/PeerWire/Message.hs
+++ b/src/Network/BitTorrent/PeerWire/Message.hs
@@ -1,4 +1,4 @@
1module Network.Torrent.PeerWire.Message 1module Network.BitTorrent.PeerWire.Message
2 ( Message(..) 2 ( Message(..)
3 ) where 3 ) where
4 4
@@ -8,7 +8,7 @@ import qualified Data.ByteString as B
8 8
9import Data.Serialize 9import Data.Serialize
10 10
11import Network.Torrent.PeerWire.Block 11import Network.BitTorrent.PeerWire.Block
12 12
13 13
14-- TODO comment message constructors 14-- TODO comment message constructors
diff --git a/src/Network/Torrent/Tracker.hs b/src/Network/BitTorrent/Tracker.hs
index ffbdc949..3cafbe1d 100644
--- a/src/Network/Torrent/Tracker.hs
+++ b/src/Network/BitTorrent/Tracker.hs
@@ -8,8 +8,8 @@
8-- 8--
9{-# OPTIONS -fno-warn-orphans #-} 9{-# OPTIONS -fno-warn-orphans #-}
10{-# LANGUAGE OverloadedStrings #-} 10{-# LANGUAGE OverloadedStrings #-}
11module Network.Torrent.Tracker 11module Network.BitTorrent.Tracker
12 ( module Network.Torrent.Tracker.Scrape 12 ( module Network.BitTorrent.Tracker.Scrape
13 13
14 -- * Requests 14 -- * Requests
15 , Event(..), TRequest(..) 15 , Event(..), TRequest(..)
@@ -24,8 +24,6 @@ module Network.Torrent.Tracker
24 ) 24 )
25 where 25 where
26 26
27import Network.Torrent.Tracker.Scrape
28
29import Control.Applicative 27import Control.Applicative
30import Data.Char as Char 28import Data.Char as Char
31import Data.Word (Word32) 29import Data.Word (Word32)
@@ -44,7 +42,9 @@ import Network
44import Network.Socket 42import Network.Socket
45import Network.HTTP 43import Network.HTTP
46import Network.URI 44import Network.URI
47import Network.Torrent.PeerID 45
46import Network.BitTorrent.PeerID
47import Network.BitTorrent.Tracker.Scrape
48 48
49 49
50data Event = Started -- ^ For first request. 50data Event = Started -- ^ For first request.
diff --git a/src/Network/Torrent/Tracker/Scrape.hs b/src/Network/BitTorrent/Tracker/Scrape.hs
index f5ebbea4..49451a57 100644
--- a/src/Network/Torrent/Tracker/Scrape.hs
+++ b/src/Network/BitTorrent/Tracker/Scrape.hs
@@ -11,7 +11,7 @@
11-- scrape info for a particular torrent list. 11-- scrape info for a particular torrent list.
12-- 12--
13{-# LANGUAGE OverloadedStrings #-} 13{-# LANGUAGE OverloadedStrings #-}
14module Network.Torrent.Tracker.Scrape 14module Network.BitTorrent.Tracker.Scrape
15 ( ScrapeInfo(..), Scrape 15 ( ScrapeInfo(..), Scrape
16 , scrapeURL 16 , scrapeURL
17 17
diff --git a/src/Network/Torrent.hs b/src/Network/Torrent.hs
deleted file mode 100644
index a37bee41..00000000
--- a/src/Network/Torrent.hs
+++ /dev/null
@@ -1,9 +0,0 @@
1module Network.Torrent
2 ( module Network.Torrent.PeerID
3 , module Network.Torrent.Tracker
4 , module Network.Torrent.PeerWire
5 ) where
6
7import Network.Torrent.PeerID
8import Network.Torrent.Tracker
9import Network.Torrent.PeerWire
diff --git a/src/Network/Torrent/PeerWire.hs b/src/Network/Torrent/PeerWire.hs
deleted file mode 100644
index 887e56d5..00000000
--- a/src/Network/Torrent/PeerWire.hs
+++ /dev/null
@@ -1,17 +0,0 @@
1-- |
2-- Copyright : (c) Sam T. 2013
3-- License : MIT
4-- Maintainer : pxqr.sta@gmail.com
5-- Stability : experimental
6-- Portability : portable
7--
8{-# LANGUAGE DoAndIfThenElse #-}
9module Network.Torrent.PeerWire
10 ( module Network.Torrent.PeerWire.Block
11 , module Network.Torrent.PeerWire.Message
12 , module Network.Torrent.PeerWire.Handshake
13 ) where
14
15import Network.Torrent.PeerWire.Block
16import Network.Torrent.PeerWire.Message
17import Network.Torrent.PeerWire.Handshake