Description
Contains information about the context of AppStream metadata, from the
root node of the document.
Instances of AsContext may be shared between AsComponent instances.
You usually do not want to use this directly, but use the more convenient
AsMetadata instead.
See also: AsComponent, AsMetadata
Functions
as_format_version_to_string ()
const gchar *
as_format_version_to_string (AsFormatVersion version
);
Converts the enumerated value to an text representation.
Returns
string version of version
Since: 0.10
as_format_version_from_string ()
AsFormatVersion
as_format_version_from_string (const gchar *version_str
);
Converts the text representation to an enumerated value.
Returns
a AsFormatVersion. For unknown, the highest version
number is assumed.
Since: 0.10
as_context_get_format_version ()
AsFormatVersion
as_context_get_format_version (AsContext *ctx
);
Returns
The AppStream format version.
as_context_set_format_version ()
void
as_context_set_format_version (AsContext *ctx
,
AsFormatVersion ver
);
Sets the AppStream format version.
as_context_get_priority ()
gint
as_context_get_priority (AsContext *ctx
);
Returns
The data priority.
as_context_set_priority ()
void
as_context_set_priority (AsContext *ctx
,
gint priority
);
Sets the data priority.
as_context_get_origin ()
const gchar *
as_context_get_origin (AsContext *ctx
);
as_context_set_origin ()
void
as_context_set_origin (AsContext *ctx
,
const gchar *value
);
Sets the data origin.
as_context_get_locale ()
const gchar *
as_context_get_locale (AsContext *ctx
);
Returns
The active locale.
as_context_set_locale ()
void
as_context_set_locale (AsContext *ctx
,
const gchar *value
);
Sets the active locale.
as_context_has_media_baseurl ()
gboolean
as_context_has_media_baseurl (AsContext *ctx
);
Returns
TRUE
if a media base URL is set.
as_context_get_media_baseurl ()
const gchar *
as_context_get_media_baseurl (AsContext *ctx
);
Returns
The media base URL.
as_context_set_media_baseurl ()
void
as_context_set_media_baseurl (AsContext *ctx
,
const gchar *value
);
Sets the media base URL.
as_context_get_locale_all_enabled ()
gboolean
as_context_get_locale_all_enabled (AsContext *ctx
);
Returns
TRUE
if all locale should be parsed.
as_context_get_filename ()
const gchar *
as_context_get_filename (AsContext *ctx
);
Returns
The name of the file the data originates from.
as_context_set_filename ()
void
as_context_set_filename (AsContext *ctx
,
const gchar *fname
);
Sets the file name we are loading data from.
Types and Values
AS_TYPE_CONTEXT
#define AS_TYPE_CONTEXT (as_context_get_type ())
struct AsContextClass
struct AsContextClass {
GObjectClass parent_class;
};
enum AsFormatVersion
Format version / API level of the AppStream metadata.
AS_FORMAT_VERSION_CURRENT
#define AS_FORMAT_VERSION_CURRENT AS_FORMAT_VERSION_V0_14
AsContext
typedef struct _AsContext AsContext;