summaryrefslogtreecommitdiff
path: root/Announcer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Announcer.hs')
-rw-r--r--Announcer.hs23
1 files changed, 23 insertions, 0 deletions
diff --git a/Announcer.hs b/Announcer.hs
new file mode 100644
index 00000000..2d2c2197
--- /dev/null
+++ b/Announcer.hs
@@ -0,0 +1,23 @@
1{-# LANGUAGE ExistentialQuantification #-}
2module Announcer where
3
4import Network.Kademlia.Search
5
6data Announcer = Announcer
7
8forkAnnouncer :: IO Announcer
9forkAnnouncer = return Announcer
10
11stopAnnouncer :: Announcer -> IO ()
12stopAnnouncer _ = return ()
13
14data AnnounceMethod ni r info = forall nid addr tok. AnnounceMethod
15 { aSearch :: Search nid addr tok ni r
16 , aPublish :: info -> Maybe ni -> IO (Maybe r)
17 }
18
19schedule :: Announcer -> AnnounceMethod ni r info -> info -> IO ()
20schedule _ _ _ = return ()
21
22cancel :: Announcer -> AnnounceMethod ni r info -> info -> IO ()
23cancel _ _ _ = return ()