gop-xml-sink-registry

gop-xml-sink-registry — API for plugging in custom deserialisers.

Synopsis




void        gop_xml_sink_registry_init      (GopXMLSink *default_sink);
void        gop_xml_sink_registry_register  (gchar const *type_name,
                                             GopXMLSink *sink);
const GopXMLSink* gop_xml_sink_registry_query
                                            (gchar const *type_name);
void        gop_xml_sink_registry_shutdown  (void);

Description

Application specific deserialisers not supported by the stock gopersist library can be registered using this API.

Details

gop_xml_sink_registry_init ()

void        gop_xml_sink_registry_init      (GopXMLSink *default_sink);

Initialise xml deserialiser subsystem. Called by gopersist_init(), no need to call as gopersist consumer.

default_sink : Fallback deserialiser for generic GObjects.

gop_xml_sink_registry_register ()

void        gop_xml_sink_registry_register  (gchar const *type_name,
                                             GopXMLSink *sink);

Register a GObject/XML deserialiser for a certain GType.

type_name : Name of handled type.
sink : Deserialiser implementation.

gop_xml_sink_registry_query ()

const GopXMLSink* gop_xml_sink_registry_query
                                            (gchar const *type_name);

Get deserialiser for a certain type. If no specific one is available the default one is returned.

type_name : Name of type to get sink for.
Returns : Deserialiser instance, owned by the sink registry.

gop_xml_sink_registry_shutdown ()

void        gop_xml_sink_registry_shutdown  (void);

Shutdown xml deserialiser subsystem. Called by gopersist_shutdown(), no need to call as gopersist consumer.