From 7466500782b89ea4d1aa038b8243268e8e261821 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 8 Nov 2012 14:02:37 -0400 Subject: hooked up XMPP git push send/receive (but not yet control flow) --- Assistant/Types/NetMessager.hs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'Assistant/Types') 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 () -- cgit v1.2.3