summaryrefslogtreecommitdiff
path: root/Connection/Tox.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Connection/Tox.hs')
-rw-r--r--Connection/Tox.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Connection/Tox.hs b/Connection/Tox.hs
index 1cbbdaee..56777e99 100644
--- a/Connection/Tox.hs
+++ b/Connection/Tox.hs
@@ -249,12 +249,18 @@ stringToKey_ s = let (xs,ys) = break (==':') s
249 else do me <- readMaybe xs 249 else do me <- readMaybe xs
250 them <- readMaybe (drop 1 ys) 250 them <- readMaybe (drop 1 ys)
251 return $ Key me them 251 return $ Key me them
252setNoToxPolicy :: Parameters extra
253 -> TVar (Map.Map Key SessionState)
254 -> Key
255 -> Policy
256 -> IO ()
257setNoToxPolicy _ _ _ _ = return ()
252 258
253toxManager :: Parameters extra -> IO (Manager ToxProgress Key) 259toxManager :: Parameters extra -> IO (Manager ToxProgress Key)
254toxManager params = do 260toxManager params = do
255 conmap <- newTVarIO Map.empty 261 conmap <- newTVarIO Map.empty
256 return Manager 262 return Manager
257 { setPolicy = setToxPolicy params conmap -- k -> Policy -> IO () 263 { setPolicy = setNoToxPolicy params conmap
258 , connections = fmap sessionStatus <$> readTVar conmap -- STM (Map k (Connection status)) 264 , connections = fmap sessionStatus <$> readTVar conmap -- STM (Map k (Connection status))
259 , stringToKey = stringToKey_ -- String -> Maybe k 265 , stringToKey = stringToKey_ -- String -> Maybe k
260 , showProgress = show -- status -> String 266 , showProgress = show -- status -> String