NM.KeyfileHandlerData

Fields

None

Methods

fail_with_error (src)

get_context ()

warn_get ()

Details

class NM.KeyfileHandlerData

Opaque type with parameters for the callback. The actual content depends on the NM.KeyfileHandlerType.

New in version 1.30.

fail_with_error(src)
Parameters:

src (GLib.Error) – error to move into the return location

Set the error for the handler. This lets the operation fail with the provided error. You may only set the error once.

src must be non-None.

Note that src is no longer valid after this call. If you want to keep using the same GLib.Error, you need to set it to None after calling this function on it.

New in version 1.30.

get_context()
Returns:

out_kf_group_name:

if the event is in the context of a keyfile group, the group name.

out_kf_key_name:

if the event is in the context of a keyfile value, the key name.

out_cur_setting:

if the event happens while handling a particular NM.Setting instance.

out_cur_property_name:

the property name if applicable.

Return type:

(out_kf_group_name: str or None, out_kf_key_name: str or None, out_cur_setting: NM.Setting or None, out_cur_property_name: str or None)

Get context information of the current event. This function can be called on all events, but the context information may be unset.

New in version 1.30.

warn_get()
Returns:

out_message:

the warning message.

out_severity:

the NM.KeyfileWarnSeverity warning severity.

Return type:

(out_message: str, out_severity: NM.KeyfileWarnSeverity)

New in version 1.30.