NMSettingsSystem

NMSettingsSystem

Description

Details

enum NMSettingsSystemPermissions

typedef enum {
	NM_SETTINGS_SYSTEM_PERMISSION_NONE = 0x0,
	NM_SETTINGS_SYSTEM_PERMISSION_CONNECTION_MODIFY = 0x1,
	NM_SETTINGS_SYSTEM_PERMISSION_WIFI_SHARE_PROTECTED = 0x2,
	NM_SETTINGS_SYSTEM_PERMISSION_WIFI_SHARE_OPEN = 0x4,
	NM_SETTINGS_SYSTEM_PERMISSION_HOSTNAME_MODIFY = 0x8
} NMSettingsSystemPermissions;


NM_SETTINGS_SYSTEM_INTERFACE_HOSTNAME

#define NM_SETTINGS_SYSTEM_INTERFACE_HOSTNAME          "hostname"


NM_SETTINGS_SYSTEM_INTERFACE_CAN_MODIFY

#define NM_SETTINGS_SYSTEM_INTERFACE_CAN_MODIFY        "can-modify"


NM_SETTINGS_SYSTEM_INTERFACE_CHECK_PERMISSIONS

#define NM_SETTINGS_SYSTEM_INTERFACE_CHECK_PERMISSIONS "check-permissions"


enum NMSettingsSystemInterfaceProp

typedef enum {
	NM_SETTINGS_SYSTEM_INTERFACE_PROP_FIRST = 0x1000,

	NM_SETTINGS_SYSTEM_INTERFACE_PROP_HOSTNAME = NM_SETTINGS_SYSTEM_INTERFACE_PROP_FIRST,
	NM_SETTINGS_SYSTEM_INTERFACE_PROP_CAN_MODIFY
} NMSettingsSystemInterfaceProp;


NMSettingsSystemInterface

typedef struct {
	GTypeInterface g_iface;

	/* Methods */
	gboolean (*save_hostname) (NMSettingsSystemInterface *settings,
	                           const char *hostname,
	                           NMSettingsSystemSaveHostnameFunc callback,
	                           gpointer user_data);

	gboolean (*get_permissions) (NMSettingsSystemInterface *settings,
	                             NMSettingsSystemGetPermissionsFunc callback,
	                             gpointer user_data);

	/* Signals */
	void (*check_permissions) (NMSettingsSystemInterface *settings);

	/* Padding for future expansion */
	void (*_reserved1) (void);
	void (*_reserved2) (void);
	void (*_reserved3) (void);
	void (*_reserved4) (void);
	void (*_reserved5) (void);
	void (*_reserved6) (void);
} NMSettingsSystemInterface;


NMSettingsSystemSaveHostnameFunc ()

void                (*NMSettingsSystemSaveHostnameFunc) (NMSettingsSystemInterface *settings,
                                                         GError *error,
                                                         gpointer user_data);

settings :

error :

user_data :


NMSettingsSystemGetPermissionsFunc ()

void                (*NMSettingsSystemGetPermissionsFunc)
                                                        (NMSettingsSystemInterface *settings,
                                                         NMSettingsSystemPermissions permissions,
                                                         GError *error,
                                                         gpointer user_data);

settings :

permissions :

error :

user_data :


nm_settings_system_interface_save_hostname ()

gboolean            nm_settings_system_interface_save_hostname
                                                        (NMSettingsSystemInterface *settings,
                                                         const char *hostname,
                                                         NMSettingsSystemSaveHostnameFunc callback,
                                                         gpointer user_data);

Requests that the machine's persistent hostname be set to the specified value or cleared.

settings :

a object implementing NMSettingsSystemInterface

hostname :

the new persistent hostname to set, or NULL to clear any existing persistent hostname

callback :

callback to be called when the hostname operation completes

user_data :

caller-specific data passed to callback

Returns :

TRUE if the request was successful, FALSE if it failed

nm_settings_system_interface_get_permissions ()

gboolean            nm_settings_system_interface_get_permissions
                                                        (NMSettingsSystemInterface *settings,
                                                         NMSettingsSystemGetPermissionsFunc callback,
                                                         gpointer user_data);

Requests an indication of the operations the caller is permitted to perform including those that may require authorization.

settings :

a object implementing NMSettingsSystemInterface

callback :

callback to be called when the permissions operation completes

user_data :

caller-specific data passed to callback

Returns :

TRUE if the request was successful, FALSE if it failed