GdaXmlDatabase

Name

GdaXmlDatabase -- 

Synopsis



struct      GdaXmlDatabasePrivate;
GdaXmlDatabase* gda_xml_database_new        (void);
GdaXmlDatabase* gda_xml_database_new_from_uri
                                            (const gchar *uri);
const gchar* gda_xml_database_get_uri       (GdaXmlDatabase *xmldb);
void        gda_xml_database_set_uri        (GdaXmlDatabase *xmldb,
                                             const gchar *uri);
void        gda_xml_database_changed        (GdaXmlDatabase *xmldb);
void        gda_xml_database_reload         (GdaXmlDatabase *xmldb);
gboolean    gda_xml_database_save           (GdaXmlDatabase *xmldb,
                                             const gchar *uri);
GList*      gda_xml_database_get_tables     (GdaXmlDatabase *xmldb);
void        gda_xml_database_free_table_list
                                            (GList *list);
GdaTable*   gda_xml_database_find_table     (GdaXmlDatabase *xmldb,
                                             const gchar *name);
GdaTable*   gda_xml_database_new_table      (GdaXmlDatabase *xmldb,
                                             const gchar *name);
GdaTable*   gda_xml_database_new_table_from_node
                                            (GdaXmlDatabase *xmldb,
                                             xmlNodePtr xmlnode);

Description

Details

struct GdaXmlDatabasePrivate

struct GdaXmlDatabasePrivate;


gda_xml_database_new ()

GdaXmlDatabase* gda_xml_database_new        (void);

Creates a new GdaXmlDatabase object, which can be used to describe a database which will then be loaded by a provider to create its defined structure


gda_xml_database_new_from_uri ()

GdaXmlDatabase* gda_xml_database_new_from_uri
                                            (const gchar *uri);


gda_xml_database_get_uri ()

const gchar* gda_xml_database_get_uri       (GdaXmlDatabase *xmldb);

Return the URI associated with the given XML database. This URI will be used when saving the XML database (gda_xml_database_save) and no URI is given.


gda_xml_database_set_uri ()

void        gda_xml_database_set_uri        (GdaXmlDatabase *xmldb,
                                             const gchar *uri);


gda_xml_database_changed ()

void        gda_xml_database_changed        (GdaXmlDatabase *xmldb);

Emit the "changed" signal for the given XML database


gda_xml_database_reload ()

void        gda_xml_database_reload         (GdaXmlDatabase *xmldb);

Reload the given XML database from its original place, discarding all changes that may have happened.


gda_xml_database_save ()

gboolean    gda_xml_database_save           (GdaXmlDatabase *xmldb,
                                             const gchar *uri);

Save the given XML database to disk.


gda_xml_database_get_tables ()

GList*      gda_xml_database_get_tables     (GdaXmlDatabase *xmldb);

Return a list of all table names present in the given database. You must free the returned GList when you no longer need it, by using the gda_xml_database_free_table_list function.


gda_xml_database_free_table_list ()

void        gda_xml_database_free_table_list
                                            (GList *list);

Free a GList of strings returned by gda_xml_database_get_tables.


gda_xml_database_find_table ()

GdaTable*   gda_xml_database_find_table     (GdaXmlDatabase *xmldb,
                                             const gchar *name);

Searches the given XML database for a table named name, and returns a pointer to it.


gda_xml_database_new_table ()

GdaTable*   gda_xml_database_new_table      (GdaXmlDatabase *xmldb,
                                             const gchar *name);

Create a new empty table in the given XML database.


gda_xml_database_new_table_from_node ()

GdaTable*   gda_xml_database_new_table_from_node
                                            (GdaXmlDatabase *xmldb,
                                             xmlNodePtr xmlnode);

Add a table to the given XML database by parsong the given XML node pointer, which usually is obtained from an already loaded xmlDocPtr.