| libnm Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Implemented Interfaces | Properties | ||||
#define NM_REMOTE_CONNECTION_DBUS_CONNECTION #define NM_REMOTE_CONNECTION_PATH #define NM_REMOTE_CONNECTION_UNSAVED #define NM_REMOTE_CONNECTION_VISIBLE struct NMRemoteConnection; NMRemoteConnectionClass; gboolean nm_remote_connection_commit_changes (NMRemoteConnection *connection,gboolean save_to_disk,GCancellable *cancellable,GError **error); void nm_remote_connection_commit_changes_async (NMRemoteConnection *connection,gboolean save_to_disk,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean nm_remote_connection_commit_changes_finish (NMRemoteConnection *connection,GAsyncResult *result,GError **error); gboolean nm_remote_connection_save (NMRemoteConnection *connection,GCancellable *cancellable,GError **error); void nm_remote_connection_save_async (NMRemoteConnection *connection,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean nm_remote_connection_save_finish (NMRemoteConnection *connection,GAsyncResult *result,GError **error); gboolean nm_remote_connection_delete (NMRemoteConnection *connection,GCancellable *cancellable,GError **error); void nm_remote_connection_delete_async (NMRemoteConnection *connection,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean nm_remote_connection_delete_finish (NMRemoteConnection *connection,GAsyncResult *result,GError **error); GVariant * nm_remote_connection_get_secrets (NMRemoteConnection *connection,const char *setting_name,GCancellable *cancellable,GError **error); void nm_remote_connection_get_secrets_async (NMRemoteConnection *connection,const char *setting_name,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); GVariant * nm_remote_connection_get_secrets_finish (NMRemoteConnection *connection,GAsyncResult *result,GError **error); gboolean nm_remote_connection_get_unsaved (NMRemoteConnection *connection); gboolean nm_remote_connection_get_visible (NMRemoteConnection *connection);
gboolean nm_remote_connection_commit_changes (NMRemoteConnection *connection,gboolean save_to_disk,GCancellable *cancellable,GError **error);
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.
|
the NMRemoteConnection |
|
whether to persist the changes to disk |
|
a GCancellable, or NULL
|
|
location for a GError, or NULL
|
Returns : |
TRUE on success, FALSE on error, in which case error will be set. |
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.
|
the NMRemoteConnection |
|
whether to save the changes to persistent storage |
|
a GCancellable, or NULL
|
|
callback to be called when the commit operation completes |
|
caller-specific data passed to callback
|
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().
|
the NMRemoteConnection |
|
the result passed to the GAsyncReadyCallback |
|
location for a GError, or NULL
|
Returns : |
TRUE on success, FALSE on error, in which case error will be set. |
gboolean nm_remote_connection_save (NMRemoteConnection *connection,GCancellable *cancellable,GError **error);
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.
|
the NMRemoteConnection |
|
a GCancellable, or NULL
|
|
location for a GError, or NULL
|
Returns : |
TRUE on success, FALSE on error, in which case error will be set. |
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.
|
the NMRemoteConnection |
|
a GCancellable, or NULL
|
|
callback to be called when the save operation completes |
|
caller-specific data passed to callback
|
gboolean nm_remote_connection_save_finish (NMRemoteConnection *connection,GAsyncResult *result,GError **error);
Gets the result of a call to nm_remote_connection_save_async().
|
the NMRemoteConnection |
|
the result passed to the GAsyncReadyCallback |
|
location for a GError, or NULL
|
Returns : |
TRUE on success, FALSE on error, in which case error will be set. |
gboolean nm_remote_connection_delete (NMRemoteConnection *connection,GCancellable *cancellable,GError **error);
Deletes the connection.
|
the NMRemoteConnection |
|
a GCancellable, or NULL
|
|
location for a GError, or NULL
|
Returns : |
TRUE on success, FALSE on error, in which case error will be set. |
void nm_remote_connection_delete_async (NMRemoteConnection *connection,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
Asynchronously deletes the connection.
|
the NMRemoteConnection |
|
a GCancellable, or NULL
|
|
callback to be called when the delete operation completes |
|
caller-specific data passed to callback
|
gboolean nm_remote_connection_delete_finish (NMRemoteConnection *connection,GAsyncResult *result,GError **error);
Gets the result of a call to nm_remote_connection_delete_async().
|
the NMRemoteConnection |
|
the result passed to the GAsyncReadyCallback |
|
location for a GError, or NULL
|
Returns : |
TRUE on success, FALSE on error, in which case error will be set. |
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.
|
the NMRemoteConnection |
|
the NMSetting object name to get secrets for |
|
a GCancellable, or NULL
|
|
location for a GError, or NULL
|
Returns : |
a GVariant of type NM_VARIANT_TYPE_CONNECTION containing
connection's secrets, or NULL on error. |
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.
|
the NMRemoteConnection |
|
the NMSetting object name to get secrets for |
|
a GCancellable, or NULL
|
|
callback to be called when the secret request completes |
|
caller-specific data passed to callback
|
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().
|
the NMRemoteConnection |
|
the result passed to the GAsyncReadyCallback |
|
location for a GError, or NULL
|
Returns : |
a GVariant of type NM_VARIANT_TYPE_CONNECTION
containing connection's secrets, or NULL on error. [transfer full]
|
gboolean nm_remote_connection_get_unsaved (NMRemoteConnection *connection);
|
the NMRemoteConnection |
Returns : |
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. |
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.)
|
the NMRemoteConnection |
Returns : |
TRUE if the remote connection is visible to the current
user, FALSE if not. |
"unsaved" property"unsaved" gboolean : Read
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.
Default value: FALSE
"visible" property"visible" gboolean : Read
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.)
Default value: FALSE