Meta
Object Hierarchy:
Description:
[ CCode ( has_type_id = false ) ]
public struct Meta
The Meta structure should be included as the first member of a Buffer
metadata structure.
The structure defines the API of the metadata and should be accessible to all elements using the metadata.
A metadata API is registered with api_type_register which takes a
name for the metadata API and some tags associated with the metadata. With
api_type_has_tag one can check if a certain metadata API contains a given tag.
Multiple implementations of a metadata API can be registered. To implement a metadata API,
register should be used. This function takes all parameters needed to create,
free and transform metadata along with the size of the metadata. The function returns a
MetaInfo structure that contains the information for the implementation of the API.
A specific implementation can be retrieved by name with get_info.
See Buffer for how the metadata can be added, retrieved and removed from buffers.
Content:
Static methods:
- public static unowned string[] api_type_get_tags (Type api)
- public static bool api_type_has_tag (Type api, Quark tag)
Check if api was registered with tag.
- public static Type api_type_register (string api, string[] tags)
Register and return a GType for the api and associate it
with tags.
- public static unowned MetaInfo? get_info (string impl)
Lookup a previously registered meta info structure by its
implementation name impl.
- public static unowned MetaInfo? register (Type api, string impl, size_t size, MetaInitFunction init_func, MetaFreeFunction free_func, MetaTransformFunction transform_func)
Register a new Meta implementation.
- public static unowned MetaInfo? register_custom (string name, string[] tags, owned CustomMetaTransformFunction? transform_func)
Register a new custom Meta implementation,
backed by an opaque structure holding a Structure.
Methods:
Fields: