Backend
Object Hierarchy:
Description:
[
CCode ( type_id =
"e_backend_get_type ()" ) ]
[
Version ( since =
"3.4" ) ]
public abstract class Backend :
Object
Contains only private data that should be read and manipulated using the functions below.
Content:
Properties:
Creation methods:
Methods:
- public virtual SourceAuthenticationResult authenticate_sync (NamedParameters credentials, string out_certificate_pem, TlsCertificateFlags out_certificate_errors, Cancellable? cancellable = null) throws Error
Authenticate synchronously
- public async bool credentials_required (SourceCredentialsReason reason, string certificate_pem, TlsCertificateFlags certificate_errors, Error? op_error, Cancellable? cancellable) throws Error
- public bool credentials_required_sync (SourceCredentialsReason reason, string certificate_pem, TlsCertificateFlags certificate_errors, Error? op_error, Cancellable? cancellable = null) throws Error
Synchronously lets the clients know that the backned requires
credentials to be properly opened.
- public void ensure_online_state_updated (Cancellable? cancellable = null)
Makes sure that the "online" property is updated, that is, if there is
any destination reachability test pending, it'll be done immediately and the only state will be updated as well.
- public void ensure_source_status_connected ()
Makes sure that the associated ESource:
EBackend:connection-statuss is connected.
- public virtual bool get_destination_address (out string host, out uint16 port)
Provides destination server host name and port to which the backend
connects.
- public unowned NetworkMonitor get_network_monitor ()
Returns a
NetworkMonitor used to check whether the backend can access the
remote server.
- public bool get_online ()
Returns the online state of this:
true if this is online, false if
offline.
- public unowned Source get_source ()
Returns the
Source to which this is paired.
- public void* get_user_prompter ()
Gets an instance of
UserPrompter, associated with this this.
- public bool is_destination_reachable (Cancellable? cancellable = null) throws Error
- public virtual void prepare_shutdown ()
Let's the this know that it'll be
shut down shortly, no client connects to it anymore.
- public SocketConnectable? ref_connectable ()
Returns the socket endpoint for the network service to which
this is a client, or null if this
does not use network sockets.
- public MainContext ref_main_context ()
Returns the
MainContext on which event sources for this are to be attached.
- public void schedule_authenticate (NamedParameters? credentials)
Schedules a new authenticate session, cancelling any previously run.
- public void schedule_credentials_required (SourceCredentialsReason reason, string certificate_pem, TlsCertificateFlags certificate_errors, Error? op_error, Cancellable? cancellable, string? who_calls)
Asynchronously invokes
credentials_required, but installs its own callback which only prints
a runtime warning on the console when the call fails.
- public void set_connectable (SocketConnectable connectable)
Sets the socket endpoint for the network service to which
this is a client.
- public void set_online (bool online)
Sets the online state of this:
true if this is online, FALSE if offline.
- public async TrustPromptResponse trust_prompt (NamedParameters parameters, Cancellable? cancellable) throws Error
Initiates a user trust prompt with given parameters.
- public TrustPromptResponse trust_prompt_sync (NamedParameters parameters, Cancellable? cancellable = null) throws Error
Asks a user a trust prompt with given parameters, and
returns what user responded.
Inherited Members:
All known members inherited from class GLib.Object