gop-xml-source-registry

gop-xml-source-registry — API for plugging in custom serialisers.

Synopsis




void        gop_xml_source_registry_init    (GopXMLSource *default_source);
void        gop_xml_source_registry_register
                                            (gchar const *type_name,
                                             GopXMLSource *source);
const GopXMLSource* gop_xml_source_registry_query
                                            (gchar const *type_name);
void        gop_xml_source_registry_shutdown
                                            (void);

Description

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

Details

gop_xml_source_registry_init ()

void        gop_xml_source_registry_init    (GopXMLSource *default_source);

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

default_source : Fallback serialiser for generic GObjects.

gop_xml_source_registry_register ()

void        gop_xml_source_registry_register
                                            (gchar const *type_name,
                                             GopXMLSource *source);

Register a GObject/XML serialiser for a certain GType.

type_name : Name of handled type.
source : Serialiser implementation.

gop_xml_source_registry_query ()

const GopXMLSource* gop_xml_source_registry_query
                                            (gchar const *type_name);

Get serialiser 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 : Serialiser instance, owned by the sink registry.

gop_xml_source_registry_shutdown ()

void        gop_xml_source_registry_shutdown
                                            (void);

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