Gjsify LogoGjsify Logo

Hierarchy

  • SecretAgentOldGetSecretsFunc

Callable

  • 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: Creating a secrets dictionary 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);

    Parameters

    • agent: SecretAgentOld

      the secret agent object

    • connection: NM.Connection

      the connection for which secrets were requested, note that this object will be unrefed after the callback has returned, use g_object_ref()/g_object_unref() if you want to use this object after the callback has returned

    • secrets: GLib.Variant

      the #GVariant of type %NM_VARIANT_TYPE_CONNECTION containing the requested secrets (as created by nm_connection_to_dbus() for example). Each key in secrets should be the name of a #NMSetting object (like "802-11-wireless-security") and each value should be an %NM_VARIANT_TYPE_SETTING variant. The sub-dicts map string:value, where the string is the setting property name (like "psk") and the value is the secret

    • error: GLib.Error

      if the secrets request failed, give a descriptive error here

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method