Top |
#define | AS_TYPE_RELATION |
struct | AsRelationClass |
enum | AsCheckResult |
enum | AsRelationKind |
enum | AsRelationItemKind |
enum | AsRelationCompare |
enum | AsControlKind |
enum | AsDisplaySideKind |
enum | AsDisplayLengthKind |
enum | AsInternetKind |
enum | AsRelationError |
#define | AS_RELATION_ERROR |
AsPool | |
AsRelation | |
AsSystemInfo |
A component can have recommends- or requires relations on other components, system properties, hardware and other interfaces. This class contains a representation of those relations.
See also: AsComponent
const gchar *
as_relation_kind_to_string (AsRelationKind kind
);
Converts the enumerated value to a text representation.
Since: 0.12.0
AsRelationKind
as_relation_kind_from_string (const gchar *kind_str
);
Converts the text representation to an enumerated value.
Since: 0.12.0
const gchar *
as_relation_item_kind_to_string (AsRelationItemKind kind
);
Converts the enumerated value to a text representation.
Since: 0.12.0
AsRelationItemKind
as_relation_item_kind_from_string (const gchar *kind_str
);
Converts the text representation to an enumerated value.
Since: 0.12.0
AsRelationCompare
as_relation_compare_from_string (const gchar *compare_str
);
Converts the text representation to an enumerated value.
Since: 0.12.0
const gchar *
as_relation_compare_to_string (AsRelationCompare compare
);
Converts the enumerated value to an text representation. The enum is converted into a two-letter identifier ("eq", "ge", etc.) for use in the XML representation.
Since: 0.12.0
const gchar *
as_relation_compare_to_symbols_string (AsRelationCompare compare
);
Converts the enumerated value to an text representation. The enum is converted into an identifier consisting of two mathematical comparison operators ("==", ">=", etc.) for use in the YAML representation and user interfaces.
Since: 0.12.0
const gchar *
as_control_kind_to_string (AsControlKind kind
);
Converts the enumerated value to a text representation.
Since: 0.12.11
AsControlKind
as_control_kind_from_string (const gchar *kind_str
);
Converts the text representation to an enumerated value.
Since: 0.12.11
const gchar *
as_display_side_kind_to_string (AsDisplaySideKind kind
);
Converts the enumerated value to a text representation.
Since: 0.12.12
AsDisplaySideKind
as_display_side_kind_from_string (const gchar *kind_str
);
Converts the text representation to an enumerated value.
Since: 0.12.12
const gchar *
as_display_length_kind_to_string (AsDisplayLengthKind kind
);
Converts the enumerated value to a text representation.
Since: 0.12.12
AsDisplayLengthKind
as_display_length_kind_from_string (const gchar *kind_str
);
Converts the text representation to an enumerated value.
Since: 0.12.12
const gchar *
as_internet_kind_to_string (AsInternetKind kind
);
Converts the enumerated value to a text representation.
Since: 0.15.5
AsInternetKind
as_internet_kind_from_string (const gchar *kind_str
);
Converts the text representation to an enumerated value.
Since: 0.15.5
AsRelationKind
as_relation_get_kind (AsRelation *relation
);
The type (and thereby strength) of this AsRelation.
Since: 0.12.0
void as_relation_set_kind (AsRelation *relation
,AsRelationKind kind
);
Set the kind of this AsRelation.
Since: 0.12.0
AsRelationItemKind
as_relation_get_item_kind (AsRelation *relation
);
The kind of the item of this AsRelation.
Since: 0.12.0
void as_relation_set_item_kind (AsRelation *relation
,AsRelationItemKind kind
);
Set the kind of the item this AsRelation is about.
Since: 0.12.0
AsRelationCompare
as_relation_get_compare (AsRelation *relation
);
The version comparison type.
Since: 0.12.0
void as_relation_set_compare (AsRelation *relation
,AsRelationCompare compare
);
Set the version comparison type of this AsRelation.
Since: 0.12.0
const gchar *
as_relation_get_version (AsRelation *relation
);
Since: 0.12.0
void as_relation_set_version (AsRelation *relation
,const gchar *version
);
Sets the item version.
Since: 0.12.0
const gchar *
as_relation_get_value_str (AsRelation *relation
);
Since: 0.12.12
void as_relation_set_value_str (AsRelation *relation
,const gchar *value
);
Sets the item value as a string, if the given item type of this AsRelation permits string values.
Since: 0.12.12
void as_relation_set_value_int (AsRelation *relation
,gint value
);
Sets the item value as an integer, if the given item type of this AsRelation permits integer values.
Since: 0.12.12
AsControlKind
as_relation_get_value_control_kind (AsRelation *relation
);
Get the value of this AsRelation item as AsControlKind if the
type of this relation is AS_RELATION_ITEM_KIND_CONTROL
.
Otherwise return AS_CONTROL_KIND_UNKNOWN
Since: 0.12.11
void as_relation_set_value_control_kind (AsRelation *relation
,AsControlKind kind
);
Set relation item value from an AsControlKind.
Since: 0.12.12
AsDisplaySideKind
as_relation_get_display_side_kind (AsRelation *relation
);
Gets the display side kind, in case this item is of
kind AS_RELATION_ITEM_KIND_DISPLAY_LENGTH
Since: 0.12.12
void as_relation_set_display_side_kind (AsRelation *relation
,AsDisplaySideKind kind
);
Sets the display side kind, in case this item is of
kind AS_RELATION_ITEM_KIND_DISPLAY_LENGTH
Since: 0.12.12
gint
as_relation_get_value_px (AsRelation *relation
);
In case this AsRelation is of kind AS_RELATION_ITEM_KIND_DISPLAY_LENGTH
,
return the set logical pixel amount.
Since: 0.12.12
void as_relation_set_value_px (AsRelation *relation
,gint logical_px
);
Sets the item value as logical pixel count. This requires the relation
to be of item kind AS_RELATION_ITEM_KIND_DISPLAY_LENGTH
.
Since: 0.12.12
AsDisplayLengthKind
as_relation_get_value_display_length_kind
(AsRelation *relation
);
In case this AsRelation is of kind AS_RELATION_ITEM_KIND_DISPLAY_LENGTH
,
return the AsDisplayLengthKind.
The AsDisplayLengthKind classification of the current pixel value, or AS_DISPLAY_LENGTH_KIND_UNKNOWN
on error.
Since: 0.12.12
void as_relation_set_value_display_length_kind (AsRelation *relation
,AsDisplayLengthKind kind
);
Sets the item value as display length placeholder value. This requires the relation
to be of item kind AS_RELATION_ITEM_KIND_DISPLAY_LENGTH
.
Since: 0.12.12
AsInternetKind
as_relation_get_value_internet_kind (AsRelation *relation
);
Get the value of this AsRelation item as AsInternetKind if the
type of this relation is AS_RELATION_ITEM_KIND_INTERNET
.
Otherwise return AS_INTERNET_KIND_UNKNOWN
Since: 0.15.5
void as_relation_set_value_internet_kind (AsRelation *relation
,AsInternetKind kind
);
Set relation item value from an AsInternetKind.
Since: 0.15.5
guint
as_relation_get_value_internet_bandwidth
(AsRelation *relation
);
If this AsRelation is of kind AS_RELATION_ITEM_KIND_INTERNET
, return the
minimum bandwidth requirement of the component, if set.
If the relation is of a different kind, or the requirement isn’t set, this
returns 0
.
Since: 0.15.5
void as_relation_set_value_internet_bandwidth (AsRelation *relation
,guint bandwidth_mbitps
);
gboolean as_relation_version_compare (AsRelation *relation
,const gchar *version
,GError **error
);
Tests whether the version number of this AsRelation is fulfilled by
version
. Whether the given version is sufficient to fulfill the version
requirement of this AsRelation is determined by its comparison resraint.
relation |
an AsRelation instance. |
|
version |
a version number, e.g. |
|
error |
A GError or |
Since: 0.12.0
AsCheckResult as_relation_is_satisfied (AsRelation *relation
,AsSystemInfo *system_info
,AsPool *pool
,gchar **message
,GError **error
);
Test if this relation is satisfied on the current system or with the provided AsPool. If no AsSystemInfo is found, a temporary one will be created. If no AsPool is provided, any component relationships can not be validated and an error will be thrown.
relation |
a AsRelation instance. |
|
system_info |
an AsSystemInfo to use for system information. |
[nullable] |
pool |
an AsPool to find component dependencies in. |
[nullable] |
message |
receive a localized status message. |
[out][optional] |
error |
a GError. |
const gchar *
as_relation_get_value (AsRelation *relation
);
as_relation_get_value
is deprecated and should not be used in newly-written code.
Deprecated method. Use as_relation_get_value_str
instead.
Since: 0.12.0
void as_relation_set_value (AsRelation *relation
,const gchar *value
);
as_relation_set_value
is deprecated and should not be used in newly-written code.
Deprecated method. Use as_relation_set_value_str
instead.
Since: 0.12.0
Type of the item an AsRelation is for.
Unknown kind |
||
A component ID |
||
A hardware modalias |
||
An operating system kernel (like Linux) |
||
A system RAM requirement |
||
A device firmware requirement (used by fwupd) |
||
An input method for users to control software |
||
Display edge length |
||
A Computer Hardware ID (CHID) to depend on system hardware |
||
Internet connectivity (Since: 0.15.5) |
Kind of an input method for users to control software
Unknown kind |
||
Mouse/cursors/other pointing device |
||
Keyboard input |
||
Console / command-line interface |
||
Touch input |
||
Gamepad input (any game controller with wheels/buttons/joysticks) |
||
Control via voice recognition/activation |
||
Computer vision / visual object and sign detection |
||
Input via a television remote |
||
Graphics tablet input |
Different internet connectivity requirements or recommendations for an application.
Since: 0.15.5