Top | ![]() |
![]() |
![]() |
![]() |
gboolean | autoconnect | Read / Write / Construct |
gchar * | id | Read / Write |
gchar * | master | Read / Write |
GSList_gchararray_ * | permissions | Read / Write |
gboolean | read-only | Read / Write / Construct |
GSList_gchararray_ * | secondaries | Read / Write |
gchar * | slave-type | Read / Write |
guint64 | timestamp | Read / Write / Construct |
gchar * | type | Read / Write |
gchar * | uuid | Read / Write |
gchar * | zone | Read / Write / Construct |
#define | NM_SETTING_CONNECTION_SETTING_NAME |
enum | NMSettingConnectionError |
#define | NM_SETTING_CONNECTION_ERROR |
#define | NM_SETTING_CONNECTION_ID |
#define | NM_SETTING_CONNECTION_UUID |
#define | NM_SETTING_CONNECTION_TYPE |
#define | NM_SETTING_CONNECTION_AUTOCONNECT |
#define | NM_SETTING_CONNECTION_TIMESTAMP |
#define | NM_SETTING_CONNECTION_READ_ONLY |
#define | NM_SETTING_CONNECTION_PERMISSIONS |
#define | NM_SETTING_CONNECTION_ZONE |
#define | NM_SETTING_CONNECTION_MASTER |
#define | NM_SETTING_CONNECTION_SLAVE_TYPE |
#define | NM_SETTING_CONNECTION_SECONDARIES |
NMSettingConnection |
The NMSettingConnection object is a NMSetting subclass that describes properties that apply to all NMConnection objects, regardless of what type of network connection they describe. Each NMConnection object must contain a NMSettingConnection setting.
GQuark
nm_setting_connection_error_quark (void
);
Registers an error quark for NMSettingConnection if necessary.
NMSetting *
nm_setting_connection_new (void
);
Creates a new NMSettingConnection object with default values.
const char *
nm_setting_connection_get_id (NMSettingConnection *setting
);
Returns the “id” property of the connection.
const char *
nm_setting_connection_get_uuid (NMSettingConnection *setting
);
Returns the “uuid” property of the connection.
const char *
nm_setting_connection_get_connection_type
(NMSettingConnection *setting
);
Returns the “type” property of the connection.
gboolean
nm_setting_connection_get_autoconnect (NMSettingConnection *setting
);
Returns the “autoconnect” property of the connection.
guint64
nm_setting_connection_get_timestamp (NMSettingConnection *setting
);
Returns the “timestamp” property of the connection.
gboolean
nm_setting_connection_get_read_only (NMSettingConnection *setting
);
Returns the “read-only” property of the connection.
guint32
nm_setting_connection_get_num_permissions
(NMSettingConnection *setting
);
Returns the number of entires in the “permissions” property of this setting.
gboolean nm_setting_connection_get_permission (NMSettingConnection *setting
,guint32 idx
,const char **out_ptype
,const char **out_pitem
,const char **out_detail
);
Retrieve one of the entries of the “permissions” property of this setting.
setting |
||
idx |
the zero-based index of the permissions entry |
|
out_ptype |
on return, the permission type (at this time, always "user") |
|
out_pitem |
on return, the permission item (formatted accoring to |
|
out_detail |
on return, the permission detail (at this time, always |
const char *
nm_setting_connection_get_zone (NMSettingConnection *setting
);
Returns the “zone” property of the connection.
gboolean nm_setting_connection_permissions_user_allowed (NMSettingConnection *setting
,const char *uname
);
Checks whether the given username is allowed to view/access this connection.
gboolean nm_setting_connection_add_permission (NMSettingConnection *setting
,const char *ptype
,const char *pitem
,const char *detail
);
Adds a permission to the connection's permission list. At this time, only
the "user" permission type is supported, and pitem
must be a username. See
“permissions”: for more details.
void nm_setting_connection_remove_permission (NMSettingConnection *setting
,guint32 idx
);
Removes the permission at index idx
from the connection.
const char *
nm_setting_connection_get_master (NMSettingConnection *setting
);
Returns the “master” property of the connection.
gboolean nm_setting_connection_is_slave_type (NMSettingConnection *setting
,const char *type
);
setting |
||
type |
the setting name (ie NM_SETTING_BOND_SETTING_NAME) to be matched
against |
const char *
nm_setting_connection_get_slave_type (NMSettingConnection *setting
);
Returns the “slave-type” property of the connection.
guint32
nm_setting_connection_get_num_secondaries
(NMSettingConnection *setting
);
Since 0.9.8
const char * nm_setting_connection_get_secondary (NMSettingConnection *setting
,guint32 idx
);
Since 0.9.8
gboolean nm_setting_connection_add_secondary (NMSettingConnection *setting
,const char *sec_uuid
);
Adds a new secondary connetion UUID to the setting.
Since 0.9.8
void nm_setting_connection_remove_secondary (NMSettingConnection *setting
,guint32 idx
);
Removes the secondary coonnection UUID at index idx
.
Since 0.9.8
Describes errors that may result from operations involving a NMSettingConnection.
unknown or unclassified error |
||
the property's value is invalid |
||
a required property is not present |
||
the NMSetting object referenced by the setting name contained in the “type” property was not present in the NMConnection |
||
ip configuration is not allowed to be present. |
#define NM_SETTING_CONNECTION_ERROR nm_setting_connection_error_quark ()
“autoconnect”
property “autoconnect” gboolean
Whether or not the connection should be automatically connected by
NetworkManager when the resources for the connection are available.
TRUE
to automatically activate the connection, FALSE
to require manual
intervention to activate the connection. Defaults to TRUE
.
Flags: Read / Write / Construct
Default value: TRUE
“id”
property “id” gchar *
A human readable unique idenfier for the connection, like "Work WiFi" or "T-Mobile 3G".
Flags: Read / Write
Default value: NULL
“master”
property “master” gchar *
Interface name of the master device or UUID of the master connection.
Flags: Read / Write
Default value: NULL
“permissions”
property “permissions” GSList_gchararray_ *
An array of strings defining what access a given user has to this connection. If this is NULL or empty, all users are allowed to access this connection. Otherwise a user is allowed to access this connection if and only if they are in this list. Each entry is of the form "[type]:[id]:[reserved]", for example:
user:dcbw:blah
At this time only the 'user' [type] is allowed. Any other values are ignored and reserved for future use. [id] is the username that this permission refers to, which may not contain the ':' character. Any [reserved] information present must be ignored and is reserved for future use. All of [type], [id], and [reserved] must be valid UTF-8.
Flags: Read / Write
“read-only”
property “read-only” gboolean
TRUE
if the connection can be modified using the providing settings
service's D-Bus interface with the right privileges, or FALSE
if the connection is read-only and cannot be modified.
Flags: Read / Write / Construct
Default value: FALSE
“secondaries”
property “secondaries” GSList_gchararray_ *
List of connection UUIDs that should be activated when the base connection itself is activated.
Flags: Read / Write
Since 0.9.8
“slave-type”
property “slave-type” gchar *
Setting name describing the type of slave device (ie NM_SETTING_BOND_SETTING_NAME) or NULL if this connection is not a slave.
Flags: Read / Write
Default value: NULL
“timestamp”
property “timestamp” guint64
The time, in seconds since the Unix Epoch, that the connection was last _successfully_ fully activated.
Flags: Read / Write / Construct
Default value: 0
“type”
property “type” gchar *
The general hardware type of the device used for the network connection, contains the name of the NMSetting object that describes that hardware type's parameters. For example, for WiFi devices, the name of the NMSettingWireless setting.
Flags: Read / Write
Default value: NULL
“uuid”
property “uuid” gchar *
A universally unique idenfier for the connection, for example generated with libuuid. Should be assigned when the connection is created, and never changed as long as the connection still applies to the same network. For example, should not be changed when the “id” or NMSettingIP4Config changes, but might need to be re-created when the WiFi SSID, mobile broadband network provider, or “type” changes.
The UUID must be in the format '2815492f-7e56-435e-b2e9-246bd7cdc664'
(ie, contains only hexadecimal characters and '-'). A suitable UUID may
be generated by nm_utils_uuid_generate()
or
nm_utils_uuid_generate_from_string()
.
Flags: Read / Write
Default value: NULL
“zone”
property “zone” gchar *
The trust level of a the connection. Free form case-insensitive string (for example "Home", "Work", "Public"). NULL or unspecified zone means the connection will be placed in the default zone as defined by the firewall.
Flags: Read / Write / Construct
Default value: NULL