loop_prompt_sync


Description:

public bool loop_prompt_sync (Source source, CredentialsPrompterPromptFlags flags, CredentialsPrompterLoopPromptFunc func, Cancellable? cancellable = null) throws Error

Runs a credentials prompt loop for source, as long as the func doesn't indicate that the provided credentials can be used to successfully authenticate against source<!-- -->'s server, or that the func returns false.

The loop is also teminated when a used cancels the credentials prompt or the cancellable is cancelled, though not sooner than the credentials prompt dialog is closed.

Note: The function doesn't return until the loop is terminated, either successfully or unsuccessfully. The function can be called from any thread, though a dedicated thread is preferred.

Parameters:

this

an CredentialsPrompter

source

an Source to be prompted credentials for

flags

a bit-or of CredentialsPrompterPromptFlags initial flags

func

an CredentialsPrompterLoopPromptFunc user function to call to check provided credentials

cancellable

an optional Cancellable, or null

user_data

user data to pass to func

Returns:

true, when the credentials were provided successfully and they can be used to authenticate the source; false otherwise.