NM.SettingUser

g GObject.Object GObject.Object NM.Setting NM.Setting GObject.Object->NM.Setting NM.SettingUser NM.SettingUser NM.Setting->NM.SettingUser

Subclasses:

None

Methods

Inherited:

NM.Setting (21), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

check_key (key)

class

check_val (val)

class

new ()

get_data (key)

get_keys ()

set_data (key, val)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

NM.Setting (1)

Name

Type

Flags

Short Description

data

GLib.HashTable

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class NM.SettingUser(**kwargs)
Bases:

NM.Setting

Abstract:

No

Structure:

NM.SettingUserClass

General User Profile Settings

New in version 1.8.

classmethod check_key(key)
Parameters:

key (str) – the key to check

Raises:

GLib.Error

Returns:

True if key is a valid user data key.

Return type:

bool

Checks whether key is a valid user data key. This means, key is not None, not too large and valid ASCII. Also, only digits and numbers are allowed with a few special characters. The key must contain at least one ‘.’ and look like a fully qualified DNS name.

New in version 1.8.

classmethod check_val(val)
Parameters:

val (str) – the value to check

Raises:

GLib.Error

Returns:

True if val is a valid user data value.

Return type:

bool

Checks whether val is a valid user data value. This means, value is not None, not too large and valid UTF-8.

New in version 1.8.

classmethod new()
Returns:

the new empty NM.SettingUser object

Return type:

NM.Setting

Creates a new NM.SettingUser object with default values.

New in version 1.8.

get_data(key)
Parameters:

key (str) – the key to lookup

Returns:

the value associated with key or None if no such value exists.

Return type:

str

New in version 1.8.

get_keys()
Returns:

a None-terminated array containing each key from the table.

Return type:

[str]

New in version 1.8.

set_data(key, val)
Parameters:
  • key (str) – the key to set

  • val (str or None) – the value to set or None to clear a key.

Raises:

GLib.Error

Returns:

True if the operation was successful. The operation can fail if key or val are not valid strings according to NM.SettingUser.check_key() and NM.SettingUser.check_val().

Return type:

bool

New in version 1.8.

Property Details

NM.SettingUser.props.data
Name:

data

Type:

GLib.HashTable

Default Value:

None

Flags:

READABLE, WRITABLE

A dictionary of key/value pairs with user data. This data is ignored by NetworkManager and can be used at the users discretion. The keys only support a strict ascii format, but the values can be arbitrary UTF8 strings up to a certain length.

New in version 1.8.