ServerSwitchUIProtocol
public protocol ServerSwitchUIProtocol
Server Switch UI Protocol
-
Returns an instance of the class conforming to
ServerSwitchUIProtocolprotocolDeclaration
Swift
static func instance() -> ServerSwitchUIProtocol? -
Prompt the user to confirm adding a new server or switching to another server.
Remark
The UI class conforming to this protocol does not have to take care of dismissing itself once user responds.
Declaration
Swift
func promptForConfirmation(targetServer server: Server, certificate: TLSCertificate?, mode: ConfirmServerMode, completion: @escaping (_ confirmed: Bool) -> Void)Parameters
serverThe server to be switched to.
certificateThe server’s certificate.
modeSpecifies if the confirmation is for adding new server or switching to another server.
completionCompletion block to be called with the user’s confirmation response.
-
notifyServerSwitchNotNeededToServer(_:completion:)Default implementationNotifies the user that the server switch cannot be done since the server is already configured.
Default Implementation
Declaration
Swift
func notifyServerSwitchNotNeededToServer(_ server: Server, completion: @escaping () -> Void) -
Dismiss any UI presented by the
promptForConfirmation(targetServer:certificate:mode:completion:)ornotifyServerSwitchNotNeeded(completion:)methods .Declaration
Swift
func dismiss()
ServerSwitchUIProtocol Protocol Reference