Method

AppStreamSystemInfoget_device_name_for_modalias

Declaration [src]

gchar*
as_system_info_get_device_name_for_modalias (
  AsSystemInfo* sysinfo,
  const gchar* modalias,
  gboolean allow_fallback,
  GError** error
)

Description [src]

Return a human readable device name for the given modalias. Will return the modalias again if no device name could be found, and returns NULL on error. If allow_fallback is set to FALSE, this function will return NULL and error AS_SYSTEM_INFO_ERROR_NOT_FOUND in case no suitable description could be found.

Parameters

modalias const gchar*
 

The modalias value to resolve (may contain wildcards).

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
allow_fallback gboolean
 

Fall back to low-quality data if no better information is available.

error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gchar*
 

A human-readable device name, or NULL on error.

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