]> git.rkrishnan.org Git - functorrent.git/commitdiff
WIP: metainfo record
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Wed, 4 Feb 2015 15:40:51 +0000 (21:10 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Wed, 4 Feb 2015 15:40:51 +0000 (21:10 +0530)
src/Metainfo.hs

index b8240c53b8abfa44dda9e37ec1e3261034811746..452286372c7f2627b77864ce32958e3322396af9 100644 (file)
@@ -1 +1,15 @@
 module Metainfo where
+
+import qualified Bencode as Benc
+import Data.Time.Clock
+
+data Metainfo = MetaInfo { info :: Benc.BVal
+                         , announce :: String
+                         , announceList :: Maybe [[String]]
+                         , creationDate :: Maybe UTCTime
+                         , comment :: Maybe String
+                         , createdBy :: Maybe String
+                         , encoding :: Maybe String }
+              deriving (Eq)
+
+mkMetaInfo :: Benv.BVal -> MetaInfo