Top | ![]() |
![]() |
![]() |
![]() |
gboolean | (*NMKeyfileReadHandler) () |
NMConnection * | nm_keyfile_read () |
gboolean | (*NMKeyfileWriteHandler) () |
GKeyFile * | nm_keyfile_write () |
void | nm_keyfile_handler_data_fail_with_error () |
void | nm_keyfile_handler_data_get_context () |
void | nm_keyfile_handler_data_warn_get () |
GEnum ├── NMKeyfileHandlerType ╰── NMKeyfileWarnSeverity GFlags ╰── NMKeyfileHandlerFlags
gboolean (*NMKeyfileReadHandler) (GKeyFile *keyfile
,NMConnection *connection
,NMKeyfileHandlerType handler_type
,NMKeyfileHandlerData *handler_data
,void *user_data
);
Hook to nm_keyfile_read()
.
The callee may abort the reading by setting an error via nm_keyfile_handler_data_fail_with_error()
.
keyfile |
the GKeyFile that is currently read |
|
connection |
the NMConnection that is being constructed. |
|
handler_type |
the |
|
handler_data |
the NMKeyfileHandlerData. What you can do with it
depends on the |
|
user_data |
the user-data argument to |
the callee should return TRUE, if the event was handled and/or recognized.
Otherwise, a default action will be performed that depends on the type
.
For NM_KEYFILE_HANDLER_TYPE_WARN
type, the default action is doing nothing.
Since: 1.30
NMConnection * nm_keyfile_read (GKeyFile *keyfile
,const char *base_dir
,NMKeyfileHandlerFlags handler_flags
,NMKeyfileReadHandler handler
,void *user_data
,GError **error
);
gboolean (*NMKeyfileWriteHandler) (NMConnection *connection
,GKeyFile *keyfile
,NMKeyfileHandlerType handler_type
,NMKeyfileHandlerData *handler_data
,void *user_data
);
This is a hook to tweak the serialization.
Handler for certain properties or events that are not entirely contained
within the keyfile or that might be serialized differently. The type
and
handler_data
arguments tell which kind of argument we have at hand.
Currently only the type NM_KEYFILE_HANDLER_TYPE_WRITE_CERT
is supported.
The callee may call nm_keyfile_handler_data_fail_with_error()
to abort
the writing with error.
connection |
the NMConnection that is currently written. |
|
keyfile |
the GKeyFile that is currently constructed. |
|
handler_type |
the |
|
handler_data |
the NMKeyfileHandlerData. What you can do with it
depends on the |
|
user_data |
the user-data argument to |
the callee should return TRUE
if the event was handled. If the
event was unhandled, a default action will be performed that depends on
the handler_type
.
Since: 1.30
GKeyFile * nm_keyfile_write (NMConnection *connection
,NMKeyfileHandlerFlags handler_flags
,NMKeyfileWriteHandler handler
,void *user_data
,GError **error
);
void nm_keyfile_handler_data_fail_with_error (NMKeyfileHandlerData *handler_data
,GError *src
);
void nm_keyfile_handler_data_get_context (const NMKeyfileHandlerData *handler_data
,const char **out_kf_group_name
,const char **out_kf_key_name
,NMSetting **out_cur_setting
,const char **out_cur_property_name
);
void nm_keyfile_handler_data_warn_get (const NMKeyfileHandlerData *handler_data
,const char **out_message
,NMKeyfileWarnSeverity *out_severity
);
Flags for customizing nm_keyfile_read()
and nm_keyfile_write()
.
Currently no flags are implemented.
Since: 1.30
The type of the callback for NMKeyfileReadHandler
and NMKeyfileWriteHandler
.
Depending on the type, you can interpret NMKeyfileHandlerData
.
Since: 1.30
The severity level of NM_KEYFILE_HANDLER_TYPE_WARN
events.
Since: 1.30
typedef struct _NMKeyfileHandlerData NMKeyfileHandlerData;
Opaque type with parameters for the callback. The actual content
depends on the NMKeyfileHandlerType
.
Since: 1.30