| libnm-glib Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | Signals | ||||
enum NMRemoteSettingsError; #define NM_TYPE_REMOTE_SETTINGS_ERROR #define NM_REMOTE_SETTINGS_ERROR GQuark nm_remote_settings_error_quark (void); #define NM_REMOTE_SETTINGS_BUS #define NM_REMOTE_SETTINGS_SERVICE_RUNNING #define NM_REMOTE_SETTINGS_HOSTNAME #define NM_REMOTE_SETTINGS_CAN_MODIFY #define NM_REMOTE_SETTINGS_NEW_CONNECTION #define NM_REMOTE_SETTINGS_CONNECTIONS_READ void (*NMRemoteSettingsAddConnectionFunc) (NMRemoteSettings *settings,NMRemoteConnection *connection,GError *error,gpointer user_data); void (*NMRemoteSettingsSaveHostnameFunc) (NMRemoteSettings *settings,GError *error,gpointer user_data); struct NMRemoteSettings; struct NMRemoteSettingsClass; GType nm_remote_settings_get_type (void); NMRemoteSettings * nm_remote_settings_new (DBusGConnection *bus); GSList * nm_remote_settings_list_connections (NMRemoteSettings *settings); NMRemoteConnection * nm_remote_settings_get_connection_by_path (NMRemoteSettings *settings,const char *path); gboolean nm_remote_settings_add_connection (NMRemoteSettings *settings,NMConnection *connection,NMRemoteSettingsAddConnectionFunc callback,gpointer user_data); gboolean nm_remote_settings_save_hostname (NMRemoteSettings *settings,const char *hostname,NMRemoteSettingsSaveHostnameFunc callback,gpointer user_data);
"bus" DBusGConnection* : Read / Write / Construct Only "can-modify" gboolean : Read "hostname" gchar* : Read "service-running" gboolean : Read
typedef enum {
NM_REMOTE_SETTINGS_ERROR_UNKNOWN = 0,
NM_REMOTE_SETTINGS_ERROR_CONNECTION_REMOVED,
NM_REMOTE_SETTINGS_ERROR_CONNECTION_UNAVAILABLE,
} NMRemoteSettingsError;
Describes errors that may result from operations involving a NMRemoteSettings.
| unknown or unclassified error | |
| the NMRemoteConnection object was removed before it was completely initialized | |
| the NMRemoteConnection object is not visible or otherwise unreadable |
#define NM_TYPE_REMOTE_SETTINGS_ERROR (nm_remote_settings_error_get_type ())
GQuark nm_remote_settings_error_quark (void);
Registers an error quark for NMRemoteSettings if necessary.
Returns : |
the error quark used for NMRemoteSettings errors. |
void (*NMRemoteSettingsAddConnectionFunc) (NMRemoteSettings *settings,NMRemoteConnection *connection,GError *error,gpointer user_data);
void (*NMRemoteSettingsSaveHostnameFunc) (NMRemoteSettings *settings,GError *error,gpointer user_data);
struct NMRemoteSettingsClass {
GObjectClass parent;
/* Signals */
void (*new_connection) (NMRemoteSettings *settings,
NMRemoteConnection *connection);
void (*connections_read) (NMRemoteSettings *settings);
/* Padding for future expansion */
void (*_reserved1) (void);
void (*_reserved2) (void);
void (*_reserved3) (void);
void (*_reserved4) (void);
void (*_reserved5) (void);
void (*_reserved6) (void);
};
NMRemoteSettings * nm_remote_settings_new (DBusGConnection *bus);
Creates a new object representing the remote settings service.
|
a valid and connected D-Bus connection. [allow-none] |
Returns : |
the new remote settings object on success, or NULL on failure |
GSList * nm_remote_settings_list_connections (NMRemoteSettings *settings);
|
the NMRemoteSettings
|
Returns : |
all connections in the remote settings service, represented as
NMRemoteConnection instances. [transfer container][element-type NMClient.RemoteConnection]
|
NMRemoteConnection * nm_remote_settings_get_connection_by_path (NMRemoteSettings *settings,const char *path);
Returns the NMRemoteConnection representing the connection at path.
|
the NMRemoteSettings
|
|
the D-Bus object path of the remote connection |
Returns : |
the remote connection object on success, or NULL if the object was not known. [transfer none] |
gboolean nm_remote_settings_add_connection (NMRemoteSettings *settings,NMConnection *connection,NMRemoteSettingsAddConnectionFunc callback,gpointer user_data);
Requests that the remote settings service add the given settings to a new connection.
|
the NMRemoteSettings
|
|
the connection to add. Note that this object's settings will be added, not the object itself |
|
callback to be called when the add operation completes. [scope async] |
|
caller-specific data passed to callback
|
Returns : |
TRUE if the request was successful, FALSE if it failed |
gboolean nm_remote_settings_save_hostname (NMRemoteSettings *settings,const char *hostname,NMRemoteSettingsSaveHostnameFunc callback,gpointer user_data);
Requests that the machine's persistent hostname be set to the specified value or cleared.
|
the NMRemoteSettings
|
|
the new persistent hostname to set, or NULL to clear any existing persistent hostname |
|
callback to be called when the hostname operation completes. [scope async] |
|
caller-specific data passed to callback
|
Returns : |
TRUE if the request was successful, FALSE if it failed |
"can-modify" property"can-modify" gboolean : Read
Can modify anything (hostname, connections, etc).
Default value: FALSE
"service-running" property"service-running" gboolean : Read
Is service running.
Default value: FALSE
"connections-read" signalvoid user_function (NMRemoteSettings *nmremotesettings,
gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |
"new-connection" signalvoid user_function (NMRemoteSettings *nmremotesettings,
GObject *arg1,
gpointer user_data) : Run First
|
the object which received the signal. |
|
user data set when the signal handler was connected. |