Top |
GQuark | as_system_info_error_quark () |
AsSystemInfo * | as_system_info_new () |
const gchar * | as_system_info_get_os_id () |
const gchar * | as_system_info_get_os_cid () |
const gchar * | as_system_info_get_os_name () |
const gchar * | as_system_info_get_os_version () |
const gchar * | as_system_info_get_os_homepage () |
const gchar * | as_system_info_get_kernel_name () |
const gchar * | as_system_info_get_kernel_version () |
gulong | as_system_info_get_memory_total () |
GPtrArray * | as_system_info_get_modaliases () |
const gchar * | as_system_info_modalias_to_syspath () |
gboolean | as_system_info_has_device_matching_modalias () |
gchar * | as_system_info_get_device_name_for_modalias () |
AsCheckResult | as_system_info_has_input_control () |
void | as_system_info_set_input_control () |
gulong | as_system_info_get_display_length () |
void | as_system_info_set_display_length () |
gchar * | as_get_current_distro_component_id () |
#define | AS_TYPE_SYSTEM_INFO |
struct | AsSystemInfoClass |
enum | AsSystemInfoError |
#define | AS_SYSTEM_INFO_ERROR |
AsSystemInfo |
This class reads information about the current operating system and device that AppStream is running on. It can also be used by GUI toolkits to set data that we can not automatically determine in a toolkit-independent way, such as screen dimensions.
AppStream uses this information to verify component relations (as set in requires/recommends/supports etc. tags).
See also: AsComponent
AsSystemInfo *
as_system_info_new (void
);
Creates a new AsSystemInfo.
Since: 0.10
const gchar *
as_system_info_get_os_id (AsSystemInfo *sysinfo
);
Get the ID of the current operating system.
const gchar *
as_system_info_get_os_cid (AsSystemInfo *sysinfo
);
Get the AppStream component ID of the current operating system.
const gchar *
as_system_info_get_os_name (AsSystemInfo *sysinfo
);
Get the humen-readable name of the current operating system.
const gchar *
as_system_info_get_os_version (AsSystemInfo *sysinfo
);
Get the version string of the current operating system.
const gchar *
as_system_info_get_os_homepage (AsSystemInfo *sysinfo
);
Get the homepage URL of the current operating system.
const gchar *
as_system_info_get_kernel_name (AsSystemInfo *sysinfo
);
Get the name of the current kernel, e.g. "Linux"
const gchar *
as_system_info_get_kernel_version (AsSystemInfo *sysinfo
);
Get the version of the current kernel, e.g. "6.2.0-2"
gulong
as_system_info_get_memory_total (AsSystemInfo *sysinfo
);
Get the current total amount of physical memory in MiB.
GPtrArray *
as_system_info_get_modaliases (AsSystemInfo *sysinfo
);
Get a list of modaliases for all the hardware on this system that has them.
const gchar * as_system_info_modalias_to_syspath (AsSystemInfo *sysinfo
,const gchar *modalias
);
Receive a path in /sys for the devices with the given modalias.
gboolean as_system_info_has_device_matching_modalias (AsSystemInfo *sysinfo
,const gchar *modalias_glob
);
Check if there is a device on this system that matches the given modalias glob.
sysinfo |
a AsSystemInfo instance. |
|
modalias_glob |
the modalias value to to look for, may contain wildcards. |
gchar * as_system_info_get_device_name_for_modalias (AsSystemInfo *sysinfo
,const gchar *modalias
,gboolean allow_fallback
,GError **error
);
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.
sysinfo |
a AsSystemInfo instance. |
|
modalias |
the modalias value to resolve (may contain wildcards). |
|
allow_fallback |
fall back to low-quality data if no better information is available |
|
error |
a GError |
AsCheckResult as_system_info_has_input_control (AsSystemInfo *sysinfo
,AsControlKind kind
,GError **error
);
Test if the current system has a specific user input control method.
Returns AS_CHECK_RESULT_UNKNOWN
if we could not test for an input control method,
AS_CHECK_RESULT_ERROR
on error and AS_CHECK_RESULT_FALSE
if the control was not found.
void as_system_info_set_input_control (AsSystemInfo *sysinfo
,AsControlKind kind
,gboolean found
);
Explicitly mark a user input control as present or not present on this system.
sysinfo |
a AsSystemInfo instance. |
|
kind |
the AsControlKind to set. |
|
found |
|
gulong as_system_info_get_display_length (AsSystemInfo *sysinfo
,AsDisplaySideKind side
);
Get the current display length for the given side kind. If the display size is unknown, this function will return 0.
void as_system_info_set_display_length (AsSystemInfo *sysinfo
,AsDisplaySideKind side
,gulong value_dip
);
Set the current display length for the given side kind. The size needs to be in device-independent pixels, see the AppStream documentation for more information: https://freedesktop.org/software/appstream/docs/chap-Metadata.htmltag-relations-display_length
sysinfo |
a AsSystemInfo instance. |
|
side |
the AsDisplaySideKind to select. |
|
value_dip |
the length value in device-independt pixels. |
gchar *
as_get_current_distro_component_id (void
);
Returns the component-ID of the current distribution based on contents
of the /etc/os-release
file.
This function is a shorthand for as_distro_details_get_cid