gda-quark-list

gda-quark-list — Quark lists (lists of KEY=VALUE's)

Functions

Types and Values

Description

Parameter lists are used primary in the parsing and creation of connection strings.

Functions

gda_quark_list_get_type ()

GType
gda_quark_list_get_type (void);


gda_quark_list_new ()

GdaQuarkList *
gda_quark_list_new (void);

Creates a new GdaQuarkList, which is a set of key->value pairs, very similar to GLib's GHashTable, but with the only purpose to make easier the parsing and creation of data source connection strings.

Returns

the newly created GdaQuarkList.


gda_quark_list_new_from_string ()

GdaQuarkList *
gda_quark_list_new_from_string (const gchar *string);

Creates a new GdaQuarkList given a connection string.

Parameters

string

a connection string.

 

Returns

the newly created GdaQuarkList.


gda_quark_list_copy ()

GdaQuarkList *
gda_quark_list_copy (GdaQuarkList *qlist);

Creates a new GdaQuarkList from an existing one.

Parameters

qlist

quark_list to get a copy from.

 

Returns

a newly allocated GdaQuarkList with a copy of the data in qlist .


gda_quark_list_free ()

void
gda_quark_list_free (GdaQuarkList *qlist);

Releases all memory occupied by the given GdaQuarkList.

Parameters

qlist

a GdaQuarkList.

 

gda_quark_list_add_from_string ()

void
gda_quark_list_add_from_string (GdaQuarkList *qlist,
                                const gchar *string,
                                gboolean cleanup);

Adds new key->value pairs from the given string . If cleanup is set to TRUE, the previous contents will be discarded before adding the new pairs.

Parameters

qlist

a GdaQuarkList.

 

string

a connection string.

 

cleanup

whether to cleanup the previous content or not.

 

gda_quark_list_find ()

const gchar *
gda_quark_list_find (GdaQuarkList *qlist,
                     const gchar *name);

Searches for the value identified by name in the given GdaQuarkList.

Parameters

qlist

a GdaQuarkList.

 

name

the name of the value to search for.

 

Returns

the value associated with the given key if found, or NULL if not found.


gda_quark_list_remove ()

void
gda_quark_list_remove (GdaQuarkList *qlist,
                       const gchar *name);

Removes an entry from the GdaQuarkList, given its name.

Parameters

qlist

a GdaQuarkList structure.

 

name

an entry name.

 

gda_quark_list_clear ()

void
gda_quark_list_clear (GdaQuarkList *qlist);

Removes all strings in the given GdaQuarkList.

Parameters

qlist

a GdaQuarkList.

 

Types and Values

GdaQuarkList

typedef struct _GdaQuarkList GdaQuarkList;


GDA_TYPE_QUARK_LIST

#define GDA_TYPE_QUARK_LIST (gda_quark_list_get_type())