#ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include "mini_db.h" typedef struct minidb { void *ptr; } MINIDB; /************************************************************/ /* the following function provides a mini database function */ /************************************************************/ /***********************************/ /* CREATE, LOAD and SAVE functions */ /***********************************/ /**********************************************************************/ /* create a new "database" having the given number of entries per row */ /**********************************************************************/ struct minidb *db_new(const char *db_name, int nb_fields) { return NULL; } /*****************************************************/ /* load the given "database" (gnome key) into memory */ /*****************************************************/ struct minidb *db_load_db(const char *db_name) { return NULL; } /****************************************************************************/ /* save the given allocated minidb (the minidb structure remains available) */ /****************************************************************************/ void db_save_db(struct minidb *mdb) { } /***********************************/ /* free the given allocated minidb */ /***********************************/ void free_loaded_db(struct minidb *mdb) { } /***********************************/ /* ADDING, REMOVING, UPDATING rows */ /***********************************/ /* add a new row to the database (without taking duplicate row into account) */ /* col is an array of "nb_fields" string */ void db_add_row(struct minidb *mdb, const char *col[]) { } /* add a new row to the database (taking duplicate row into account) */ /* if with_overwrite is not set and a row with the same key exist, the row is not added */ /* if with_overwrite is set and a row with the same key exist, the row is updated */ /* col is an array of "nb_fields" string */ void db_add_row_uniq(struct minidb *mdb, int with_overwrite,int which_uniq_column, const char *col[]) { } /* delete a row of the database using its "key" */ void db_del_row(struct minidb *mdb, int which_column, const char *value) { }