summaryrefslogtreecommitdiff
path: root/Assistant/Types/NetMessager.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-03 16:00:38 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-03 16:01:09 -0400
commitefa88a0f1589a82a91a06ed3a3cbd5f4106aabb4 (patch)
tree013133783caef5e5f693b2734024935fd494551b /Assistant/Types/NetMessager.hs
parent2798e659c701a3c6122930ece994411b3ec8b266 (diff)
XMPP pairing notifications are now sent
Rest of pairing process still to do.
Diffstat (limited to 'Assistant/Types/NetMessager.hs')
-rw-r--r--Assistant/Types/NetMessager.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/Assistant/Types/NetMessager.hs b/Assistant/Types/NetMessager.hs
index 6bc9ec34a..79342b666 100644
--- a/Assistant/Types/NetMessager.hs
+++ b/Assistant/Types/NetMessager.hs
@@ -8,7 +8,9 @@
module Assistant.Types.NetMessager where
import Common.Annex
+import Assistant.Pairing
+import Data.Text (Text)
import Control.Concurrent.STM
import Control.Concurrent.MSampleVar
@@ -18,12 +20,11 @@ data NetMessage
= NotifyPush [UUID]
-- requests other clients to inform us of their presence
| QueryPresence
+ -- notification about a stage in the pairing process,
+ -- involving another client identified by the Text, and a UUID.
+ | PairingNotification PairStage Text UUID
+ deriving (Show)
-{- Controls for the XMPP client.
- -
- - It can be fed XMPP messages to send.
- -
- - It can also be sent a signal when it should restart for some reason. -}
data NetMessagerControl = NetMessagerControl
{ netMessages :: TChan (NetMessage)
, netMessagerRestart :: MSampleVar ()