Method

FwupdPluginConfigget_value

Declaration [src]

gchar*
fu_config_get_value (
  FuConfig* self,
  const gchar* section,
  const gchar* key,
  const gchar* value_default
)

Description [src]

Return the value of a key, falling back to the default value if missing.

NOTE: this function will return an empty string for key=.

Available since:1.9.1

Parameters

section const gchar*
 

A settings section.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
key const gchar*
 

A settings key.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.
value_default const gchar*
 

A settings value default.

 The argument can be NULL.
 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.

Return value

Returns: gchar*
 

Key value.

 The caller of the method takes ownership of the data, and is responsible for freeing it.
 The string is a NUL terminated UTF-8 string.