AsSuggested

AsSuggested — Suggestions for other software suggested by a component.

Functions

Types and Values

Includes

#include <appstream.h>

Description

This class provides a list of other component-ids suggested by a software component, as well as an origin of the suggestion (manually suggested by the upstream project, or automatically determined by heuristics).

Functions

as_suggested_kind_from_string ()

AsSuggestedKind
as_suggested_kind_from_string (const gchar *kind_str);

Converts the text representation to an enumerated value.

Parameters

kind_str

the string.

 

Returns

a AsSuggestedKind or AS_SUGGESTED_KIND_UNKNOWN for unknown


as_suggested_kind_to_string ()

const gchar *
as_suggested_kind_to_string (AsSuggestedKind kind);

Converts the enumerated value to an text representation.

Parameters

kind

the AsSuggestedKind.

 

Returns

string version of kind


as_suggested_new ()

AsSuggested *
as_suggested_new (void);

Creates a new AsSuggested.

Returns

a new AsSuggested.

[transfer full]


as_suggested_get_kind ()

AsSuggestedKind
as_suggested_get_kind (AsSuggested *suggested);

Gets the suggested kind.

Parameters

suggested

a AsSuggested instance.

 

Returns

the AsSuggestedKind


as_suggested_set_kind ()

void
as_suggested_set_kind (AsSuggested *suggested,
                       AsSuggestedKind kind);

Sets the suggested kind.

Parameters

suggested

a AsSuggested instance.

 

kind

the AsSuggestedKind, e.g. AS_SUGGESTED_KIND_HEURISTIC.

 

as_suggested_get_ids ()

GPtrArray *
as_suggested_get_ids (AsSuggested *suggested);

Get a list of components id that generated the suggestion

Parameters

suggested

a AsSuggested instance.

 

Returns

an array of components id.

[transfer none][element-type utf8]


as_suggested_add_id ()

void
as_suggested_add_id (AsSuggested *suggested,
                     const gchar *cid);

Add a component id to this suggested object.

Parameters

suggested

a AsSuggested instance.

 

cid

The component id to add

 

as_suggested_is_valid ()

gboolean
as_suggested_is_valid (AsSuggested *suggested);

Check if the essential properties of this suggestion are populated with useful data.

Parameters

suggested

a AsSuggested instance.

 

Returns

TRUE if we have useful data.

Types and Values

AS_TYPE_SUGGESTED

#define AS_TYPE_SUGGESTED (as_suggested_get_type ())

struct AsSuggestedClass

struct AsSuggestedClass {
	GObjectClass		parent_class;
};

enum AsSuggestedKind

The suggested type.

Members

AS_SUGGESTED_KIND_UNKNOWN

Unknown suggested kind

 

AS_SUGGESTED_KIND_UPSTREAM

Suggestions provided by the upstream project.

 

AS_SUGGESTED_KIND_HEURISTIC

Suggestions provided by automatic heuristics.

 

AsSuggested

typedef struct _AsSuggested AsSuggested;