register_async


Description:

public async bool register_async (Cancellable? cancellable) throws Error

Asynchronously registers the SecretAgentOld with the NetworkManager secret manager, indicating to NetworkManager that the agent is able to provide and save secrets for connections on behalf of its user.

Since 1.24, registration cannot fail and is idempotent. It has the same effect as setting nm_secret_agent_old_auto_register to true or enable.

Since 1.24, the asynchronous result indicates whether the instance is successfully registered. In any case, this call enables the agent and it will automatically try to register and handle secret requests. A failure of this function only indicates that currently the instance might not be ready (but since it will automatically try to recover, it might be ready in a moment afterwards). Use this function if you want to check and ensure that the agent is registered.

Parameters:

this

a SecretAgentOld

cancellable

a Cancellable, or null

callback

callback to call when the agent is registered

user_data

data for callback