summaryrefslogtreecommitdiff
path: root/Assistant/Types
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-08 14:02:37 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-08 14:04:41 -0400
commit7466500782b89ea4d1aa038b8243268e8e261821 (patch)
tree85520e237c97f6974ea548f99315e3b04ef8f139 /Assistant/Types
parent722c13fa8543dd0e1d086b276cb67c872c3f97fe (diff)
hooked up XMPP git push send/receive (but not yet control flow)
Diffstat (limited to 'Assistant/Types')
-rw-r--r--Assistant/Types/NetMessager.hs19
1 files changed, 11 insertions, 8 deletions
diff --git a/Assistant/Types/NetMessager.hs b/Assistant/Types/NetMessager.hs
index aa0585590..163468744 100644
--- a/Assistant/Types/NetMessager.hs
+++ b/Assistant/Types/NetMessager.hs
@@ -22,20 +22,23 @@ data NetMessage
-- requests other clients to inform us of their presence
| QueryPresence
-- notification about a stage in the pairing process,
- -- involving a client identified by the Text, and a UUID.
- | PairingNotification PairStage Text UUID
+ -- involving a client, and a UUID.
+ | PairingNotification PairStage ClientID UUID
-- request that a git push be sent over the out of band network
- | PushRequest
- -- indicates that a PushRequest has been seen and a push is starting
- | StartingPush
+ | PushRequest ClientID
+ -- indicates that a push is starting
+ | StartingPush ClientID
-- a chunk of output of git receive-pack
- | ReceivePackOutput ByteString
+ | ReceivePackOutput ClientID ByteString
-- a chuck of output of git send-pack
- | SendPackOutput ByteString
+ | SendPackOutput ClientID ByteString
-- sent when git receive-pack exits, with its exit code
- | ReceivePackDone ExitCode
+ | ReceivePackDone ClientID ExitCode
deriving (Show)
+{- Something used to identify a specific client to send the message to. -}
+type ClientID = Text
+
data NetMessagerControl = NetMessagerControl
{ netMessages :: TChan (NetMessage)
, netMessagerRestart :: MSampleVar ()