Top |
XbBuilder * | xb_builder_new () |
void | xb_builder_append_guid () |
void | xb_builder_import_source () |
void | xb_builder_import_node () |
XbSilo * | xb_builder_compile () |
XbSilo * | xb_builder_ensure () |
void | xb_builder_add_locale () |
void | xb_builder_add_fixup () |
void | xb_builder_set_profile_flags () |
XbBuilder *
xb_builder_new (void
);
Creates a new builder.
The XbSilo returned by the methods of this XbBuilder will use the thread-default main context at the time of calling this function for its future signal emissions.
Since: 0.1.0
void xb_builder_append_guid (XbBuilder *self
,const gchar *guid
);
Adds the GUID to the internal correctness hash.
Since: 0.1.0
void xb_builder_import_source (XbBuilder *self
,XbBuilderSource *source
);
Adds a XbBuilderSource to the XbBuilder.
Since: 0.1.0
void xb_builder_import_node (XbBuilder *self
,XbBuilderNode *bn
);
Adds a node tree to the builder.
If you are manually adding dynamic data sourced from a non-static source then you MUST use
xb_builder_append_guid()
with the appropriate GUID value, e.g. the file name and mtime.
If no appropriate value is available, the caller can use something like:
g_autofree gchar *tmp = xb_builder_node_export(bn, XB_NODE_EXPORT_FLAG_NONE, NULL); xb_builder_append_guid(builder, tmp);
Failure to include an appropriate GUID value would allow an out-of-data silo to be used.
Since: 0.1.0
XbSilo * xb_builder_compile (XbBuilder *self
,XbBuilderCompileFlags flags
,GCancellable *cancellable
,GError **error
);
Compiles a XbSilo.
self |
a XbSilo |
|
flags |
some XbBuilderCompileFlags, e.g. |
|
cancellable |
a GCancellable, or |
|
error |
the GError, or |
Since: 0.1.0
XbSilo * xb_builder_ensure (XbBuilder *self
,GFile *file
,XbBuilderCompileFlags flags
,GCancellable *cancellable
,GError **error
);
Ensures file
is up to date, and returns a compiled XbSilo.
If silo
is being used by a query (e.g. in another thread) then all node
data is immediately invalid.
The returned XbSilo will use the thread-default main context at the time of calling this function for its future signal emissions.
self |
a XbSilo |
|
file |
a GFile |
|
flags |
some XbBuilderCompileFlags, e.g. |
|
cancellable |
a GCancellable, or |
|
error |
the GError, or |
Since: 0.1.0
void xb_builder_add_locale (XbBuilder *self
,const gchar *locale
);
Adds a locale to the builder. Locales added first will be prioritised over locales added later.
Since: 0.1.0
void xb_builder_add_fixup (XbBuilder *self
,XbBuilderFixup *fixup
);
Adds a function that will get run on every XbBuilderNode compile creates for the silo. This is run after all the XbBuilderSource fixups have been run.
Since: 0.1.3
void xb_builder_set_profile_flags (XbBuilder *self
,XbSiloProfileFlags profile_flags
);
Enables or disables the collection of profiling data.
Since: 0.1.1