extend transferrer protocol to send progress bar total size updates

New protocol is not back-compat with old one, but it's never been
released so that's ok.
This commit is contained in:
Joey Hess 2020-12-11 12:39:00 -04:00
parent 94b323a8e8
commit 095cdc7e83
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 44 additions and 22 deletions

View file

@ -68,10 +68,11 @@ newMessageState = do
data SerializedOutput
= OutputMessage S.ByteString
| OutputError String
| StartProgressMeter (Maybe TotalSize)
| BeginProgressMeter (Maybe TotalSize)
| UpdateProgressMeter BytesProcessed
| UpdateProgressMeterTotalSize TotalSize
| EndProgressMeter
| StartPrompt
| BeginPrompt
| EndPrompt
| JSONObject L.ByteString
-- ^ This is always sent, it's up to the consumer to decide if it