### Class

# Shell NetworkAgent

#### Description

    final class Shell.NetworkAgent : NM.SecretAgentOld
      implements Gio.AsyncInitable, Gio.Initable {
      /* No available fields */
    }

No description available.

#### Ancestors

- NMSecretAgentOld
- GObject

#### Implements

- GAsyncInitable
- GInitable

#### Instance methods

###### shell_network_agent_add_vpn_secret

No description available.

###### shell_network_agent_respond

No description available.

###### shell_network_agent_search_vpn_plugin

No description available.

###### shell_network_agent_search_vpn_plugin_finish

No description available.

###### shell_network_agent_set_password

No description available.

##### Methods inherited from NMSecretAgentOld (16)

###### nm_secret_agent_old_delete_secrets

Asynchronously asks the agent to delete all saved secrets belonging to `connection`.

###### nm_secret_agent_old_destroy

Since 1.24, the instance will already register a D-Bus object on the D-Bus connection during initialization. That object will stay registered until `self` gets unrefed (destroyed) or this function is called. This function performs the necessary cleanup to tear down the instance. Afterwards, the function can not longer be used. This is optional, but necessary to ensure unregistering the D-Bus object at a define point, when other users might still have a reference on `self`.

###### nm_secret_agent_old_enable

This has the same effect as setting `NM_SECRET_AGENT_OLD_AUTO_REGISTER` property.

###### nm_secret_agent_old_get_context_busy_watcher

Returns a `GObject` that stays alive as long as there are pending requests in the `GDBusConnection`. Such requests keep the `GMainContext` alive, and thus you may want to keep iterating the context as long until a weak reference indicates that this object is gone. This is useful because even when you destroy the instance right away (and all the internally pending requests get cancelled), any pending `g_dbus_connection_call()` requests will still invoke the result on the `GMainContext`. Hence, this allows you to know how long you must iterate the context to know that all remains are cleaned up.

###### nm_secret_agent_old_get_dbus_connection

No description available.

###### nm_secret_agent_old_get_dbus_name_owner

No description available.

###### nm_secret_agent_old_get_main_context

No description available.

###### nm_secret_agent_old_get_registered

Note that the secret agent transparently registers and re-registers as the D-Bus name owner appears. Hence, this property is not really useful. Also, to be graceful against races during registration, the instance will already accept requests while being in the process of registering. If you need to avoid races and want to wait until `self` is registered, call nm_secret_agent_old_register_async(). If that function completes with success, you know the instance is registered.

###### nm_secret_agent_old_get_secrets

Asynchronously retrieves secrets belonging to `connection` for the setting `setting_name`. `flags` indicate specific behavior that the secret agent should use when performing the request, for example returning only existing secrets without user interaction, or requesting entirely new secrets from the user.

###### nm_secret_agent_old_register

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.

###### nm_secret_agent_old_register_async

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.

###### nm_secret_agent_old_register_finish

Gets the result of a call to nm_secret_agent_old_register_async().

###### nm_secret_agent_old_save_secrets

Asynchronously ensures that all secrets inside `connection` are stored to disk.

###### nm_secret_agent_old_unregister

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.

###### nm_secret_agent_old_unregister_async

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.

###### nm_secret_agent_old_unregister_finish

Gets the result of a call to nm_secret_agent_old_unregister_async().

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GAsyncInitable (3)

###### g_async_initable_init_async

Starts asynchronous initialization of the object implementing the interface. This must be done before any real use of the object after initial construction. If the object also implements `GInitable` you can optionally call `g_initable_init()` instead.

###### g_async_initable_init_finish

Finishes asynchronous initialization and returns the result. See g_async_initable_init_async().

###### g_async_initable_new_finish

Finishes the async construction for the various g_async_initable_new calls, returning the created object or `NULL` on error.

##### Methods inherited from GInitable (1)

###### g_initable_init

Initializes the object implementing the interface.

#### Properties

###### Shell.NetworkAgent:force-always-ask

No description available.

##### Properties inherited from NMSecretAgentOld (5)

###### NM.SecretAgentOld:auto-register

If `TRUE` (the default), the agent will always be registered when NetworkManager is running; if NetworkManager exits and restarts, the agent will re-register itself automatically.

###### NM.SecretAgentOld:capabilities

A bitfield of %NMSecretAgentCapabilities.

###### NM.SecretAgentOld:dbus-connection

The `GDBusConnection` used by the instance. You may either set this as construct-only property, or otherwise `NMSecretAgentOld` will choose a connection via `g_bus_get()` during initialization.

###### NM.SecretAgentOld:identifier

Identifies this agent; only one agent in each user session may use the same identifier. Identifier formatting follows the same rules as D-Bus bus names with the exception that the ‘:’ character is not allowed. The valid set of characters is “[A-Z][a-z][0-9]_-.” and the identifier is limited in length to 255 characters with a minimum of 3 characters. An example valid identifier is ‘org.gnome.nm-applet’ (without quotes).

###### NM.SecretAgentOld:registered

`TRUE` if the agent is registered with NetworkManager, `FALSE` if not.

#### Signals

###### Shell.NetworkAgent::cancel-request

No description available.

###### Shell.NetworkAgent::new-request

No description available.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct ShellNetworkAgentClass {
      NMSecretAgentOldClass parent_class;

    }

No description available.

###### Class members

`parent_class: NMSecretAgentOldClass`

  No description available.