Top |
#define | NM_REMOTE_CONNECTION_DBUS_CONNECTION |
#define | NM_REMOTE_CONNECTION_PATH |
#define | NM_REMOTE_CONNECTION_UNSAVED |
#define | NM_REMOTE_CONNECTION_FLAGS |
#define | NM_REMOTE_CONNECTION_FILENAME |
#define | NM_REMOTE_CONNECTION_VISIBLE |
NMRemoteConnection |
A NMRemoteConnection represents a connection that is exported via NetworkManager D-Bus interface.
void nm_remote_connection_update2 (NMRemoteConnection *connection
,GVariant *settings
,NMSettingsUpdate2Flags flags
,GVariant *args
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously calls the Update2()
D-Bus method.
connection |
||
settings |
optional connection to update the settings. |
[allow-none] |
flags |
update-flags |
|
args |
optional arguments. |
[allow-none] |
cancellable |
a GCancellable, or |
|
callback |
callback to be called when the commit operation completes |
|
user_data |
caller-specific data passed to |
Since: 1.12
GVariant * nm_remote_connection_update2_finish (NMRemoteConnection *connection
,GAsyncResult *result
,GError **error
);
Gets the result of a call to nm_remote_connection_commit_changes_async()
.
Since: 1.12
gboolean nm_remote_connection_commit_changes (NMRemoteConnection *connection
,gboolean save_to_disk
,GCancellable *cancellable
,GError **error
);
nm_remote_connection_commit_changes
has been deprecated since version 1.22 and should not be used in newly-written code.
Use nm_remote_connection_commit_changes_async()
or GDBusConnection.
Send any local changes to the settings and properties of connection
to
NetworkManager. If save_to_disk
is TRUE
, the updated connection will be saved to
disk; if FALSE
, then only the in-memory representation will be changed.
connection |
||
save_to_disk |
whether to persist the changes to disk |
|
cancellable |
a GCancellable, or |
|
error |
void nm_remote_connection_commit_changes_async (NMRemoteConnection *connection
,gboolean save_to_disk
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously sends any local changes to the settings and properties of
connection
to NetworkManager. If save
is TRUE
, the updated connection will
be saved to disk; if FALSE
, then only the in-memory representation will be
changed.
connection |
||
save_to_disk |
whether to save the changes to persistent storage |
|
cancellable |
a GCancellable, or |
|
callback |
callback to be called when the commit operation completes |
|
user_data |
caller-specific data passed to |
gboolean nm_remote_connection_commit_changes_finish (NMRemoteConnection *connection
,GAsyncResult *result
,GError **error
);
Gets the result of a call to nm_remote_connection_commit_changes_async()
.
gboolean nm_remote_connection_save (NMRemoteConnection *connection
,GCancellable *cancellable
,GError **error
);
nm_remote_connection_save
has been deprecated since version 1.22 and should not be used in newly-written code.
Use nm_remote_connection_save_async()
or GDBusConnection.
Saves the connection to disk if the connection has changes that have not yet been written to disk, or if the connection has never been saved.
void nm_remote_connection_save_async (NMRemoteConnection *connection
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Saves the connection to disk if the connection has changes that have not yet been written to disk, or if the connection has never been saved.
connection |
||
cancellable |
a GCancellable, or |
|
callback |
callback to be called when the save operation completes |
|
user_data |
caller-specific data passed to |
gboolean nm_remote_connection_save_finish (NMRemoteConnection *connection
,GAsyncResult *result
,GError **error
);
Gets the result of a call to nm_remote_connection_save_async()
.
gboolean nm_remote_connection_delete (NMRemoteConnection *connection
,GCancellable *cancellable
,GError **error
);
nm_remote_connection_delete
has been deprecated since version 1.22 and should not be used in newly-written code.
Use nm_remote_connection_delete_async()
or GDBusConnection.
Deletes the connection.
void nm_remote_connection_delete_async (NMRemoteConnection *connection
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously deletes the connection.
connection |
||
cancellable |
a GCancellable, or |
|
callback |
callback to be called when the delete operation completes |
|
user_data |
caller-specific data passed to |
gboolean nm_remote_connection_delete_finish (NMRemoteConnection *connection
,GAsyncResult *result
,GError **error
);
Gets the result of a call to nm_remote_connection_delete_async()
.
GVariant * nm_remote_connection_get_secrets (NMRemoteConnection *connection
,const char *setting_name
,GCancellable *cancellable
,GError **error
);
Request the connection's secrets. Note that this is a blocking D-Bus call, not a simple property accessor.
connection |
||
setting_name |
the NMSetting object name to get secrets for |
|
cancellable |
a GCancellable, or |
|
error |
a GVariant of type NM_VARIANT_TYPE_CONNECTION
containing
connection
's secrets, or NULL
on error.
Warning: NMClient contains a cache of objects on D-Bus. This cache gets updated with D-Bus signals when iterating the GMainContext. This function performs a (pseudo) blocking D-Bus call. Aside blocking, the result will not be in sync and not be ordered with the content of the NMClient cache. This function used to be deprecated between 1.22 and 1.38 releases.
[transfer full]
void nm_remote_connection_get_secrets_async (NMRemoteConnection *connection
,const char *setting_name
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously requests the connection's secrets.
connection |
||
setting_name |
the NMSetting object name to get secrets for |
|
cancellable |
a GCancellable, or |
|
callback |
callback to be called when the secret request completes |
|
user_data |
caller-specific data passed to |
GVariant * nm_remote_connection_get_secrets_finish (NMRemoteConnection *connection
,GAsyncResult *result
,GError **error
);
Gets the result of a call to nm_remote_connection_get_secrets_async()
.
gboolean
nm_remote_connection_get_unsaved (NMRemoteConnection *connection
);
NMSettingsConnectionFlags
nm_remote_connection_get_flags (NMRemoteConnection *connection
);
Since: 1.12
const char *
nm_remote_connection_get_filename (NMRemoteConnection *connection
);
Since: 1.12
gboolean
nm_remote_connection_get_visible (NMRemoteConnection *connection
);
Checks if the connection is visible to the current user. If the
connection is not visible then it is essentially useless; it will
not contain any settings, and operations such as
nm_remote_connection_save()
and nm_remote_connection_delete()
will
always fail. (NMRemoteSettings will not normally return
non-visible connections to callers, but it is possible for a
connection's visibility to change after you already have a
reference to it.)
“filename”
property “filename” char *
File that stores the connection in case the connection is file-backed.
Owner: NMRemoteConnection
Flags: Read
Default value: NULL
Since: 1.12
“flags”
property“flags” guint
The flags of the connection as unsigned integer. The values correspond to the NMSettingsConnectionFlags enum.
Owner: NMRemoteConnection
Flags: Read
Default value: 0
Since: 1.12
“unsaved”
property“unsaved” gboolean
TRUE
if the remote connection contains changes that have not been saved
to disk, FALSE
if the connection is the same as its on-disk representation.
Owner: NMRemoteConnection
Flags: Read
Default value: FALSE
“visible”
property“visible” gboolean
TRUE
if the remote connection is visible to the current user, FALSE
if
not. If the connection is not visible then it is essentially useless; it
will not contain any settings, and operations such as
nm_remote_connection_save()
and nm_remote_connection_delete()
will always
fail. (NMRemoteSettings will not normally return non-visible connections
to callers, but it is possible for a connection's visibility to change
after you already have a reference to it.)
Owner: NMRemoteConnection
Flags: Read
Default value: FALSE