| Top |
| gboolean | auto-register | Read / Write / Construct |
| NMSecretAgentCapabilities | capabilities | Read / Write / Construct |
| gchar * | identifier | Read / Write / Construct Only |
| gboolean | registered | Read |
| #define | NM_SECRET_AGENT_OLD_IDENTIFIER |
| #define | NM_SECRET_AGENT_OLD_AUTO_REGISTER |
| #define | NM_SECRET_AGENT_OLD_REGISTERED |
| #define | NM_SECRET_AGENT_OLD_CAPABILITIES |
| NMSecretAgentOld |
void (*NMSecretAgentOldGetSecretsFunc) (NMSecretAgentOld *agent,NMConnection *connection,GVariant *secrets,GError *error,gpointer user_data);
Called as a result of a request by NM to retrieve secrets. When the NMSecretAgentOld subclass has finished retrieving secrets and is ready to return them, or to return an error, this function should be called with those secrets or the error.
To easily create the dictionary to return the Wi-Fi PSK, you could do something like this:
Example 1. Creating a secrets dictionary
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
NMConnection *secrets; NMSettingWirelessSecurity *s_wsec; GVariant *secrets_dict; secrets = nm_simple_connection_new (); s_wsec = (NMSettingWirelessSecurity *) nm_setting_wireless_security_new (); g_object_set (G_OBJECT (s_wsec), NM_SETTING_WIRELESS_SECURITY_PSK, "my really cool PSK", NULL); nm_connection_add_setting (secrets, NM_SETTING (s_wsec)); secrets_dict = nm_connection_to_dbus (secrets, NM_CONNECTION_SERIALIZE_ALL); (call the NMSecretAgentOldGetSecretsFunc with secrets_dict) g_object_unref (secrets); g_variant_unref (secrets_dict); |
agent |
the secret agent object |
|
connection |
the connection for which secrets were requested,
note that this object will be unrefed after the callback has returned, use
|
[transfer none] |
secrets |
the GVariant of type |
|
error |
if the secrets request failed, give a descriptive error here |
|
user_data |
caller-specific data to be passed to the function |
void (*NMSecretAgentOldSaveSecretsFunc) (NMSecretAgentOld *agent,NMConnection *connection,GError *error,gpointer user_data);
Called as a result of a request by NM to save secrets. When the NMSecretAgentOld subclass has finished saving the secrets, this function should be called.
agent |
the secret agent object |
|
connection |
the connection for which secrets were to be saved,
note that this object will be unrefed after the callback has returned, use
|
[transfer none] |
error |
if the saving secrets failed, give a descriptive error here |
|
user_data |
caller-specific data to be passed to the function |
void (*NMSecretAgentOldDeleteSecretsFunc) (NMSecretAgentOld *agent,NMConnection *connection,GError *error,gpointer user_data);
Called as a result of a request by NM to delete secrets. When the NMSecretAgentOld subclass has finished deleting the secrets, this function should be called.
agent |
the secret agent object |
|
connection |
the connection for which secrets were to be deleted,
note that this object will be unrefed after the callback has returned, use
|
[transfer none] |
error |
if the deleting secrets failed, give a descriptive error here |
|
user_data |
caller-specific data to be passed to the function |
gboolean nm_secret_agent_old_register (NMSecretAgentOld *self,GCancellable *cancellable,GError **error);
Registers the NMSecretAgentOld 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.
It is a programmer error to attempt to register an agent that is already registered, or in the process of registering.
void nm_secret_agent_old_register_async (NMSecretAgentOld *self,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Asynchronously registers the NMSecretAgentOld 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.
It is a programmer error to attempt to register an agent that is already registered, or in the process of registering.
self |
||
cancellable |
a GCancellable, or |
|
callback |
callback to call when the agent is registered |
|
user_data |
data for |
gboolean nm_secret_agent_old_register_finish (NMSecretAgentOld *self,GAsyncResult *result,GError **error);
Gets the result of a call to nm_secret_agent_old_register_async().
gboolean nm_secret_agent_old_unregister (NMSecretAgentOld *self,GCancellable *cancellable,GError **error);
Unregisters the NMSecretAgentOld with the NetworkManager secret manager, indicating to NetworkManager that the agent will no longer provide or store secrets on behalf of this user.
void nm_secret_agent_old_unregister_async (NMSecretAgentOld *self,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Asynchronously unregisters the NMSecretAgentOld with the NetworkManager secret manager, indicating to NetworkManager that the agent will no longer provide or store secrets on behalf of this user.
self |
||
cancellable |
a GCancellable, or |
|
callback |
callback to call when the agent is unregistered |
|
user_data |
data for |
gboolean nm_secret_agent_old_unregister_finish (NMSecretAgentOld *self,GAsyncResult *result,GError **error);
Gets the result of a call to nm_secret_agent_old_unregister_async().
gboolean
nm_secret_agent_old_get_registered (NMSecretAgentOld *self);