AsContext 3 APPSTREAM Library
AsContext Context of an AppStream metadata document

## Functions

AsContext * | as_context_new ()
AsFormatVersion | as_context_get_format_version ()
void | as_context_set_format_version ()
AsFormatStyle | as_context_get_style ()
void | as_context_set_style ()
gint | as_context_get_priority ()
void | as_context_set_priority ()
const gchar * | as_context_get_origin ()
void | as_context_set_origin ()
const gchar * | as_context_get_locale ()
void | as_context_set_locale ()
gboolean | as_context_has_media_baseurl ()
const gchar * | as_context_get_media_baseurl ()
void | as_context_set_media_baseurl ()
const gchar * | as_context_get_architecture ()
void | as_context_set_architecture ()
gboolean | as_context_get_all_locale_enabled ()
const gchar * | as_context_get_filename ()
void | as_context_set_filename ()

## Types and Values

#define | AS_TYPE_CONTEXT
struct | AsContextClass
| AsContext

## Object Hierarchy

        GObject
        ╰── AsContext

## Includes

    #include <appstream.h>

## Description

Contains information about the context of AppStream metadata, from the root node of the document. This is a private/internal class.

## Functions

### as_context_new ()

    AsContext *
    as_context_new (void);

Creates a new AsContext.

#### Returns

an AsContext.

[transfer full]

as_context_new

### as_context_get_format_version ()

    AsFormatVersion
    as_context_get_format_version (AsContext *ctx);

#### Parameters

ctx | a AsContext instance. |

#### Returns

The AppStream format version.

as_context_get_format_version

### as_context_set_format_version ()

    void
    as_context_set_format_version (AsContext *ctx,
                                   AsFormatVersion ver);

Sets the AppStream format version.

#### Parameters

ctx | a AsContext instance. |
ver | the new format version. |

as_context_set_format_version

### as_context_get_style ()

    AsFormatStyle
    as_context_get_style (AsContext *ctx);

#### Parameters

ctx | a AsContext instance. |

#### Returns

The document style.

as_context_get_style

### as_context_set_style ()

    void
    as_context_set_style (AsContext *ctx,
                          AsFormatStyle style);

Sets the AppStream document style.

#### Parameters

ctx | a AsContext instance. |
style | the new document style. |

as_context_set_style

### as_context_get_priority ()

    gint
    as_context_get_priority (AsContext *ctx);

#### Parameters

ctx | a AsContext instance. |

#### Returns

The data priority.

as_context_get_priority

### as_context_set_priority ()

    void
    as_context_set_priority (AsContext *ctx,
                             gint priority);

Sets the data priority.

#### Parameters

ctx | a AsContext instance. |
priority | the new priority. |

as_context_set_priority

### as_context_get_origin ()

    const gchar *
    as_context_get_origin (AsContext *ctx);

#### Parameters

ctx | a AsContext instance. |

#### Returns

The data origin.

as_context_get_origin

### as_context_set_origin ()

    void
    as_context_set_origin (AsContext *ctx,
                           const gchar *value);

Sets the data origin.

#### Parameters

ctx | a AsContext instance. |
value | the new value. |

as_context_set_origin

### as_context_get_locale ()

    const gchar *
    as_context_get_locale (AsContext *ctx);

#### Parameters

ctx | a AsContext instance. |

#### Returns

The active locale.

as_context_get_locale

### as_context_set_locale ()

    void
    as_context_set_locale (AsContext *ctx,
                           const gchar *value);

Sets the active locale.

#### Parameters

ctx | a AsContext instance. |
value | the new value. |

as_context_set_locale

### as_context_has_media_baseurl ()

    gboolean
    as_context_has_media_baseurl (AsContext *ctx);

#### Parameters

ctx | a AsContext instance. |

#### Returns

`TRUE` if a media base URL is set.

as_context_has_media_baseurl

### as_context_get_media_baseurl ()

    const gchar *
    as_context_get_media_baseurl (AsContext *ctx);

#### Parameters

ctx | a AsContext instance. |

#### Returns

The media base URL.

as_context_get_media_baseurl

### as_context_set_media_baseurl ()

    void
    as_context_set_media_baseurl (AsContext *ctx,
                                  const gchar *value);

Sets the media base URL.

#### Parameters

ctx | a AsContext instance. |
value | the new value. |

as_context_set_media_baseurl

### as_context_get_architecture ()

    const gchar *
    as_context_get_architecture (AsContext *ctx);

#### Parameters

ctx | a AsContext instance. |

#### Returns

The current architecture for the document.

as_context_get_architecture

### as_context_set_architecture ()

    void
    as_context_set_architecture (AsContext *ctx,
                                 const gchar *value);

Sets the current architecture for this document.

#### Parameters

ctx | a AsContext instance. |
value | the new value. |

as_context_set_architecture

### as_context_get_all_locale_enabled ()

    gboolean
    as_context_get_all_locale_enabled (AsContext *ctx);

#### Parameters

ctx | a AsContext instance. |

#### Returns

`TRUE` if all locale should be parsed.

as_context_get_all_locale_enabled

### as_context_get_filename ()

    const gchar *
    as_context_get_filename (AsContext *ctx);

#### Parameters

ctx | a AsContext instance. |

#### Returns

The name of the file the data originates from.

as_context_get_filename

### as_context_set_filename ()

    void
    as_context_set_filename (AsContext *ctx,
                             const gchar *fname);

Sets the file name we are loading data from.

#### Parameters

ctx | a AsContext instance. |
fname | the new file name. |

as_context_set_filename

## Types and Values

### AS_TYPE_CONTEXT

    #define AS_TYPE_CONTEXT (as_context_get_type ())

AS_TYPE_CONTEXT

### struct AsContextClass

    struct AsContextClass {
    	GObjectClass parent_class;
    };

AsContextClass

### AsContext

    typedef struct _AsContext AsContext;

AsContext