Top |
gboolean | (*XbBuilderSourceNodeFunc) () |
GInputStream * | (*XbBuilderSourceAdapterFunc) () |
XbBuilderSource * | xb_builder_source_new () |
gboolean | xb_builder_source_load_file () |
gboolean | xb_builder_source_load_xml () |
gboolean | xb_builder_source_load_bytes () |
void | xb_builder_source_set_info () |
void | xb_builder_source_set_prefix () |
void | xb_builder_source_add_fixup () |
void | xb_builder_source_add_adapter () |
void | xb_builder_source_add_simple_adapter () |
#define | XB_TYPE_BUILDER_SOURCE |
struct | XbBuilderSourceClass |
enum | XbBuilderSourceFlags |
XbBuilderSource |
gboolean (*XbBuilderSourceNodeFunc) (XbBuilderSource *self
,XbBuilderNode *bn
,gpointer user_data
,GError **error
);
GInputStream * (*XbBuilderSourceAdapterFunc) (XbBuilderSource *self
,XbBuilderSourceCtx *ctx
,gpointer user_data
,GCancellable *cancellable
,GError **error
);
XbBuilderSource *
xb_builder_source_new (void
);
Creates a new builder source.
Since: 0.1.1
gboolean xb_builder_source_load_file (XbBuilderSource *self
,GFile *file
,XbBuilderSourceFlags flags
,GCancellable *cancellable
,GError **error
);
Loads an optionally compressed XML file to build a XbSilo.
self |
||
file |
a GFile |
|
flags |
some XbBuilderSourceFlags, e.g. |
|
cancellable |
a GCancellable, or |
|
error |
the GError, or |
Since: 0.1.1
gboolean xb_builder_source_load_xml (XbBuilderSource *self
,const gchar *xml
,XbBuilderSourceFlags flags
,GError **error
);
Loads XML data and begins to build a XbSilo.
self |
||
xml |
XML data |
|
flags |
some XbBuilderSourceFlags, e.g. |
|
error |
the GError, or |
Since: 0.1.1
gboolean xb_builder_source_load_bytes (XbBuilderSource *self
,GBytes *bytes
,XbBuilderSourceFlags flags
,GError **error
);
Loads XML data and begins to build a XbSilo.
self |
||
bytes |
a GBytes |
|
flags |
some XbBuilderSourceFlags, e.g. |
|
error |
the GError, or |
Since: 0.1.2
void xb_builder_source_set_info (XbBuilderSource *self
,XbBuilderNode *info
);
Sets an optional information metadata node on the root node.
Since: 0.1.0
void xb_builder_source_set_prefix (XbBuilderSource *self
,const gchar *prefix
);
Sets an optional prefix on the root node. This makes any nodes added using this source reside under a common shared parent node.
Since: 0.1.0
void xb_builder_source_add_fixup (XbBuilderSource *self
,XbBuilderFixup *fixup
);
Adds a function that will get run on every XbBuilderNode compile creates with this source.
Since: 0.1.3
void xb_builder_source_add_adapter (XbBuilderSource *self
,const gchar *content_types
,XbBuilderSourceAdapterFunc func
,gpointer user_data
,GDestroyNotify user_data_free
);
Adds a function that can be used to convert streams loaded with
xb_builder_source_load_xml()
.
This will decompress multiple layers of content, for instance decompressing a gzip stream into a
different content type that can then be parsed. Use xb_builder_source_add_simple_adapter()
when
this recursive behaviour is not desired.
self |
||
content_types |
mimetypes, e.g. |
|
func |
a callback, or |
|
user_data |
user pointer to pass to |
|
user_data_free |
a function which gets called to free |
Since: 0.1.7
void xb_builder_source_add_simple_adapter (XbBuilderSource *self
,const gchar *content_types
,XbBuilderSourceAdapterFunc func
,gpointer user_data
,GDestroyNotify user_data_free
);
Adds a function that can be used to convert streams loaded with
xb_builder_source_load_xml()
.
This function is similar to xb_builder_source_add_adapter()
but is limited to one "layer" of
content, for instance handling application/xml or a single simple type added using
xb_builder_source_add_adapter()
.
self |
||
content_types |
mimetypes, e.g. |
|
func |
a callback, or |
|
user_data |
user pointer to pass to |
|
user_data_free |
a function which gets called to free |
Since: 0.1.15