NMClient contains a cache of the objects of NetworkManager's D-Bus API.
It uses MainContext and DBusConnection for that and registers to D-Bus signals.
That means, when iterating the associated MainContext, D-Bus signals gets processed and the
Client instance updates and emits Object signals.
- public async ActiveConnection activate_connection_async (Connection? connection, Device? device, string? specific_object, Cancellable? cancellable) throws Error
Asynchronously starts a connection to a particular network using the
configuration settings from connection
and the network device device
.
- public async ActiveConnection add_and_activate_connection2 (Connection? @partial, Device device, string? specific_object, Variant options, Cancellable? cancellable, out Variant out_result) throws Error
Adds a new connection using the given details (if any) as a template,
automatically filling in missing settings with the capabilities of the given device and specific object.
- public async ActiveConnection add_and_activate_connection_async (Connection? @partial, Device device, string? specific_object, Cancellable? cancellable) throws Error
Adds a new connection using the given details (if any) as a template,
automatically filling in missing settings with the capabilities of the given device and specific object.
- public async RemoteConnection add_connection2 (Variant settings, SettingsAddConnection2Flags flags, Variant? args, bool ignore_out_result, Cancellable? cancellable, out Variant out_result) throws Error
Call AddConnection2
D-Bus API asynchronously.
- public async RemoteConnection add_connection_async (Connection connection, bool save_to_disk, Cancellable? cancellable) throws Error
Requests that the remote settings service add the given settings to a
new connection.
- public ConnectivityState check_connectivity (Cancellable? cancellable = null) throws Error
Updates the network connectivity state and returns the (new) current
state.
- public async ConnectivityState check_connectivity_async (Cancellable? cancellable) throws Error
Asynchronously updates the network connectivity state and invokes
callback
when complete.
- public async bool checkpoint_adjust_rollback_timeout (string checkpoint_path, uint32 add_timeout, Cancellable? cancellable) throws Error
Resets the timeout for the checkpoint with path checkpoint_path
to timeout_add
.
- public async Checkpoint checkpoint_create (GenericArray<Device> devices, uint32 rollback_timeout, CheckpointCreateFlags flags, Cancellable? cancellable) throws Error
Creates a checkpoint of the current networking configuration for given
interfaces.
- public async bool checkpoint_destroy (string checkpoint_path, Cancellable? cancellable) throws Error
Destroys an existing checkpoint without performing a rollback.
- public async HashTable<string,uint32> checkpoint_rollback (string checkpoint_path, Cancellable? cancellable) throws Error
Performs the rollback of a checkpoint before the timeout is reached.
- public bool connectivity_check_get_available ()
Determine whether connectivity checking is available.
- public bool connectivity_check_get_enabled ()
Determine whether connectivity checking is enabled.
- public unowned string connectivity_check_get_uri ()
Get the URI that will be queried to determine if there is internet
connectivity.
- public void connectivity_check_set_enabled (bool enabled)
Enable or disable connectivity checking.
- public async Variant dbus_call (string object_path, string interface_name, string method_name, Variant? parameters, VariantType? reply_type, int timeout_msec, Cancellable? cancellable) throws Error
Call call on the current name owner with
the specified arguments.
- public async bool dbus_set_property (string object_path, string interface_name, string property_name, Variant value, int timeout_msec, Cancellable? cancellable) throws Error
Like dbus_call
but calls "Set" on the standard "org.
- public bool deactivate_connection (ActiveConnection active, Cancellable? cancellable = null) throws Error
- public async bool deactivate_connection_async (ActiveConnection active, Cancellable? cancellable) throws Error
- public unowned ActiveConnection get_activating_connection ()
- public unowned GenericArray<ActiveConnection> get_active_connections ()
Gets the active connections.
- public unowned GenericArray<Device> get_all_devices ()
Gets both real devices and device placeholders (eg, software devices
which do not currently exist, but could be created automatically by NetworkManager if one of their NMDevice:
NMClient:ActivatableConnections
s was activated).
- public unowned uint32[] get_capabilities ()
- public unowned GenericArray<Checkpoint> get_checkpoints ()
Gets all the active checkpoints.
- public unowned RemoteConnection get_connection_by_id (string id)
Returns the first matching
nmremoteconnection matching a given id
.
- public unowned RemoteConnection get_connection_by_path (string path)
Returns the nmremoteconnection
representing the connection at path
.
- public unowned RemoteConnection get_connection_by_uuid (string uuid)
Returns the nmremoteconnection
identified by uuid
.
- public unowned GenericArray<RemoteConnection> get_connections ()
- public ConnectivityState get_connectivity ()
Gets the current network connectivity state.
- public unowned Object get_context_busy_watcher ()
- public unowned DBusConnection get_dbus_connection ()
Gets the gdbusconnection of the
instance.
- public unowned string get_dbus_name_owner ()
- public unowned Device get_device_by_iface (string iface)
- public unowned Device get_device_by_path (string object_path)
- public unowned GenericArray<Device> get_devices ()
Gets all the known network devices.
- public unowned GenericArray<DnsEntry> get_dns_configuration ()
Gets the current DNS configuration
- public unowned string get_dns_mode ()
Gets the current DNS processing mode.
- public unowned string get_dns_rc_manager ()
Gets the current DNS resolv.
- public ClientInstanceFlags get_instance_flags ()
- public bool get_logging (string? level, string? domains) throws Error
Gets NetworkManager current logging level and domains.
- public unowned MainContext get_main_context ()
The Client instance is permanently
associated with the current thread default MainContext, referenced the time when the instance was created.
- public Metered get_metered ()
- public bool get_nm_running ()
Determines whether the daemon is running.
- public unowned Object get_object_by_path (string dbus_path)
- public ClientPermissionResult get_permission_result (ClientPermission permission)
Requests the result of a specific permission, which indicates whether
the client can or cannot perform the action the permission represents
- public Ternary get_permissions_state ()
- public unowned ActiveConnection get_primary_connection ()
- public RadioFlags get_radio_flags ()
Get radio flags.
- public bool get_startup ()
Tests whether the daemon is still in the process of activating
connections at startup.
- public State get_state ()
Gets the current daemon state.
- public unowned string get_version ()
Gets NetworkManager version.
- public bool load_connections (string[] filenames, out string failures, Cancellable? cancellable = null) throws Error
Requests that the remote settings service load or reload the given
files, adding or updating the connections described within.
- public async bool load_connections_async (string[] filenames, Cancellable? cancellable, out string[] failures) throws Error
Requests that the remote settings service asynchronously load or
reload the given files, adding or updating the connections described within.
- public bool networking_get_enabled ()
Whether networking is enabled or disabled.
- public bool networking_set_enabled (bool enabled) throws Error
Enables or disables networking.
- public async bool reload (ManagerReloadFlags flags, Cancellable? cancellable) throws Error
Reload NetworkManager's configuration and perform certain updates,
like flushing caches or rewriting external state to disk.
- public bool reload_connections (Cancellable? cancellable = null) throws Error
Requests that the remote settings service reload all connection files
from disk, adding, updating, and removing connections until the in-memory state matches the on-disk state.
- public async bool reload_connections_async (Cancellable? cancellable) throws Error
Requests that the remote settings service begin reloading all
connection files from disk, adding, updating, and removing connections until the in-memory state matches the on-disk state.
- public bool save_hostname (string? hostname, Cancellable? cancellable = null) throws Error
Requests that the machine's persistent hostname be set to the
specified value or cleared.
- public async bool save_hostname_async (string? hostname, Cancellable? cancellable) throws Error
Requests that the machine's persistent hostname be set to the
specified value or cleared.
- public bool set_logging (string? level, string? domains) throws Error
Sets NetworkManager logging level and/or domains.
- public bool wimax_get_enabled ()
Determines whether WiMAX is enabled.
- public bool wimax_hardware_get_enabled ()
Determines whether the WiMAX hardware is enabled.
- public void wimax_set_enabled (bool enabled)
Enables or disables WiMAX devices.
- public bool wireless_get_enabled ()
Determines whether the wireless is enabled.
- public bool wireless_hardware_get_enabled ()
Determines whether the wireless hardware is enabled.
- public void wireless_set_enabled (bool enabled)
Enables or disables wireless devices.
- public bool wwan_get_enabled ()
Determines whether WWAN is enabled.
- public bool wwan_hardware_get_enabled ()
Determines whether the WWAN hardware is enabled.
- public void wwan_set_enabled (bool enabled)
Enables or disables WWAN devices.