Created
April 1, 2018 12:37
-
-
Save monday8am/7eda7e7873147f6315473105d0345557 to your computer and use it in GitHub Desktop.
Delivery state described in Swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum DeliveryState: StateType { | |
case notStarted | |
case settingUp(appId: AppId, | |
serviceId: ServiceId, | |
description: ServiceDescription? = null) | |
case going(progres: DeliveryProgress) | |
case idle(reason: Idle) | |
case failed(error: Error) | |
case finished(status: ServiceStatus) | |
enum Idle { | |
case waitingForConnection | |
case waitingForServerResponse | |
case waitingForNetworkConnection | |
case waitingForReconnect (deviceId: DeviceId) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment