diff options
author | Andrew Cady <d@jerkface.net> | 2018-06-22 17:39:47 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2018-06-22 17:41:03 -0400 |
commit | bf8e927dea99d52aeca758deb678d86eea72683a (patch) | |
tree | cb6a81a3c15c90aa51a0eb90c4fef3b4c335e98d | |
parent | 61f9b9b7c0f9ba3fd9f70520303214ad564ac882 (diff) |
disable setToxPolicy and therefore persue[sic] contact threads
-rw-r--r-- | Connection/Tox.hs | 8 | ||||
-rw-r--r-- | Connection/Tox/Threads.hs | 6 |
2 files changed, 12 insertions, 2 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 |
252 | setNoToxPolicy :: Parameters extra | ||
253 | -> TVar (Map.Map Key SessionState) | ||
254 | -> Key | ||
255 | -> Policy | ||
256 | -> IO () | ||
257 | setNoToxPolicy _ _ _ _ = return () | ||
252 | 258 | ||
253 | toxManager :: Parameters extra -> IO (Manager ToxProgress Key) | 259 | toxManager :: Parameters extra -> IO (Manager ToxProgress Key) |
254 | toxManager params = do | 260 | toxManager 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 |
diff --git a/Connection/Tox/Threads.hs b/Connection/Tox/Threads.hs index 6a7edeb4..f3c94fc1 100644 --- a/Connection/Tox/Threads.hs +++ b/Connection/Tox/Threads.hs | |||
@@ -10,7 +10,11 @@ | |||
10 | -- | 10 | -- |
11 | {-# LANGUAGE CPP #-} | 11 | {-# LANGUAGE CPP #-} |
12 | {-# LANGUAGE LambdaCase #-} | 12 | {-# LANGUAGE LambdaCase #-} |
13 | module Connection.Tox.Threads where | 13 | module Connection.Tox.Threads |
14 | ( PersueContactMethods(..) | ||
15 | , FreshenContactMethods(..) | ||
16 | , persueContact | ||
17 | ) where | ||
14 | 18 | ||
15 | import Connection | 19 | import Connection |
16 | -- import Connection.Tox | 20 | -- import Connection.Tox |