more gtk-doc stuff

This commit is contained in:
brianb
2004-04-13 01:27:57 +00:00
parent 1295d079ae
commit 222bbcdd01
3 changed files with 47 additions and 0 deletions

View File

@@ -4,6 +4,8 @@ Mon Apr 12 09:56:23 EDT 2004 Brian Bruns <brian@bruns.com>
* src/libmdb/backend.c: free backends on exit (Jeff Smith)
* src/libmdb/index.c: missing function mdb_swap_n()
* src/libmdb/file.c:
* src/libmdb/mem.c:
* src/libmdb/stats.c:
* configure.in:
* doc/reference/libmdb/Makefile.am:
* doc/reference/libmdb/libmdb-sections.txt:

View File

@@ -24,21 +24,39 @@
#include "dmalloc.h"
#endif
/**
* mdb_init:
*
* Initializes the LibMDB library. This function should be called exactly once
* by calling program and prior to any other function.
*
**/
void mdb_init()
{
mdb_init_backends();
}
/**
* mdb_exit:
*
* Cleans up the LibMDB library. This function should be called exactly once
* by the calling program prior to exiting (or prior to final use of LibMDB
* functions).
*
**/
void mdb_exit()
{
mdb_remove_backends();
}
/* private function */
MdbStatistics *mdb_alloc_stats(MdbHandle *mdb)
{
mdb->stats = g_malloc0(sizeof(MdbStatistics));
return mdb->stats;
/* private function */
}
/* private function */
void
mdb_free_stats(MdbHandle *mdb)
{

View File

@@ -23,6 +23,18 @@
#include "dmalloc.h"
#endif
/**
* mdb_stats_on:
* @mdb: Handle to the (open) MDB file to collect stats on.
*
* Begins collection of statistics on an MDBHandle.
*
* Statistics in LibMDB will track the number of reads from the MDB file. The
* collection of statistics is started and stopped with the mdb_stats_on and
* mdb_stats_off functions. Collected statistics are accessed by reading the
* MdbStatistics structure or calling mdb_dump_stats.
*
*/
void
mdb_stats_on(MdbHandle *mdb)
{
@@ -31,6 +43,15 @@ mdb_stats_on(MdbHandle *mdb)
mdb->stats->collect = TRUE;
}
/**
* mdb_stats_off:
* @mdb: pointer to handle of MDB file with active stats collection.
*
* Turns off statistics collection.
*
* If mdb_stats_off is not called, statistics will be turned off when handle
* is freed using mdb_free_handle.
**/
void
mdb_stats_off(MdbHandle *mdb)
{
@@ -38,6 +59,12 @@ mdb_stats_off(MdbHandle *mdb)
mdb->stats->collect = FALSE;
}
/**
* mdb_dump_stats:
* @mdb: pointer to handle of MDB file with active stats collection.
*
* Dumps current statistics to stdout.
**/
void
mdb_dump_stats(MdbHandle *mdb)
{