Update Event
Represents an update event within the ShieldCert SDK. This sealed class has specific update event types as subclasses.
internal fun updateEventHandlingExample() {
val updateEvent: UpdateEvent = UpdateEvent.Ok(listOf(/* ... Entry objects ... */))
when (updateEvent) {
UpdateEvent.Started -> println("Update process has started.")
UpdateEvent.Downloading -> println("Downloading certificate information...")
is UpdateEvent.Ok -> println("Update successful. Received ${updateEvent.data.size} entries.")
UpdateEvent.NetworkError -> println("A network error occurred during the update.")
is UpdateEvent.InvalidResponse -> println("Received an invalid response from the server: ${updateEvent.exception.message}")
}
}Content copied to clipboard
Inheritors
Types
Link copied to clipboard
Update in progress.
Link copied to clipboard
The update request returned invalid responsea from the server.
Link copied to clipboard
There was an error in network communication with the server.
Link copied to clipboard
Update succeeded. Everything is ok.
Link copied to clipboard
Update started.