diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Data/Torrent.hs | 52 |
1 files changed, 21 insertions, 31 deletions
diff --git a/src/Data/Torrent.hs b/src/Data/Torrent.hs index 98d6f94e..ba71d334 100644 --- a/src/Data/Torrent.hs +++ b/src/Data/Torrent.hs | |||
@@ -38,23 +38,6 @@ module Data.Torrent | |||
38 | , longHex | 38 | , longHex |
39 | , shortHex | 39 | , shortHex |
40 | 40 | ||
41 | -- * Magnet | ||
42 | -- $magnet-link | ||
43 | , Magnet(..) | ||
44 | , nullMagnet | ||
45 | , simpleMagnet | ||
46 | , detailedMagnet | ||
47 | , parseMagnet | ||
48 | , renderMagnet | ||
49 | |||
50 | -- ** URN | ||
51 | , URN (..) | ||
52 | , NamespaceId | ||
53 | , btih | ||
54 | , infohashURN | ||
55 | , parseURN | ||
56 | , renderURN | ||
57 | |||
58 | -- * File layout | 41 | -- * File layout |
59 | -- ** FileInfo | 42 | -- ** FileInfo |
60 | , FileOffset | 43 | , FileOffset |
@@ -66,10 +49,10 @@ module Data.Torrent | |||
66 | 49 | ||
67 | -- ** Layout info | 50 | -- ** Layout info |
68 | , LayoutInfo (..) | 51 | , LayoutInfo (..) |
69 | , joinFilePath | ||
70 | , singleFile | 52 | , singleFile |
71 | , multiFile | 53 | , multiFile |
72 | , rootDirName | 54 | , rootDirName |
55 | , joinFilePath | ||
73 | , isSingleFile | 56 | , isSingleFile |
74 | , isMultiFile | 57 | , isMultiFile |
75 | , suggestedName | 58 | , suggestedName |
@@ -104,11 +87,9 @@ module Data.Torrent | |||
104 | -- ** Piece control | 87 | -- ** Piece control |
105 | , HashList (..) | 88 | , HashList (..) |
106 | , PieceInfo (..) | 89 | , PieceInfo (..) |
107 | , pieceCount | ||
108 | |||
109 | -- ** Lens | ||
110 | , pieceLength | 90 | , pieceLength |
111 | , pieceHashes | 91 | , pieceHashes |
92 | , pieceCount | ||
112 | 93 | ||
113 | -- ** Validation | 94 | -- ** Validation |
114 | , pieceHash | 95 | , pieceHash |
@@ -116,13 +97,11 @@ module Data.Torrent | |||
116 | 97 | ||
117 | -- * Info dictionary | 98 | -- * Info dictionary |
118 | , InfoDict (..) | 99 | , InfoDict (..) |
119 | , infoDictionary | ||
120 | |||
121 | -- ** Lenses | ||
122 | , infohash | 100 | , infohash |
123 | , layoutInfo | 101 | , layoutInfo |
124 | , pieceInfo | 102 | , pieceInfo |
125 | , isPrivate | 103 | , isPrivate |
104 | , infoDictionary | ||
126 | 105 | ||
127 | -- * Torrent file | 106 | -- * Torrent file |
128 | , Torrent(..) | 107 | , Torrent(..) |
@@ -139,19 +118,30 @@ module Data.Torrent | |||
139 | , publisherURL | 118 | , publisherURL |
140 | , signature | 119 | , signature |
141 | 120 | ||
142 | -- * Construction | 121 | -- ** Utils |
143 | , nullTorrent | 122 | , nullTorrent |
144 | |||
145 | -- * Mime types | ||
146 | , typeTorrent | 123 | , typeTorrent |
147 | |||
148 | -- * File paths | ||
149 | , torrentExt | 124 | , torrentExt |
150 | , isTorrentPath | 125 | , isTorrentPath |
151 | |||
152 | -- * IO | ||
153 | , fromFile | 126 | , fromFile |
154 | , toFile | 127 | , toFile |
128 | |||
129 | -- * Magnet | ||
130 | -- $magnet-link | ||
131 | , Magnet(..) | ||
132 | , nullMagnet | ||
133 | , simpleMagnet | ||
134 | , detailedMagnet | ||
135 | , parseMagnet | ||
136 | , renderMagnet | ||
137 | |||
138 | -- ** URN | ||
139 | , URN (..) | ||
140 | , NamespaceId | ||
141 | , btih | ||
142 | , infohashURN | ||
143 | , parseURN | ||
144 | , renderURN | ||
155 | ) where | 145 | ) where |
156 | 146 | ||
157 | import Prelude hiding (sum) | 147 | import Prelude hiding (sum) |