hamsterdb Static Functions

Defines

#define HAM_DEBUG_LEVEL_DEBUG   0
#define HAM_DEBUG_LEVEL_NORMAL   1
#define HAM_DEBUG_LEVEL_FATAL   3

Typedefs

typedef void HAM_CALLCONV(* ham_errhandler_fun )(int level, const char *message)

Functions

HAM_EXPORT void HAM_CALLCONV ham_set_errhandler (ham_errhandler_fun f)
HAM_EXPORT const char *HAM_CALLCONV ham_strerror (ham_status_t status)
HAM_EXPORT void HAM_CALLCONV ham_get_version (ham_u32_t *major, ham_u32_t *minor, ham_u32_t *revision)
HAM_EXPORT void HAM_CALLCONV ham_get_license (const char **licensee, const char **product)

Define Documentation

#define HAM_DEBUG_LEVEL_DEBUG   0

A debug message

Definition at line 328 of file hamsterdb.h.

#define HAM_DEBUG_LEVEL_FATAL   3

A fatal error message

Definition at line 334 of file hamsterdb.h.

#define HAM_DEBUG_LEVEL_NORMAL   1

A normal error message

Definition at line 331 of file hamsterdb.h.


Typedef Documentation

typedef void HAM_CALLCONV(* ham_errhandler_fun)(int level, const char *message)

A typedef for a custom error handler function

This error handler can be used in combination with ham_set_errhandler().

Parameters:
message The error message
level The error level:

See also:
error_levels

Definition at line 325 of file hamsterdb.h.


Function Documentation

HAM_EXPORT void HAM_CALLCONV ham_get_license ( const char **  licensee,
const char **  product 
)

Returns the name of the licensee and the name of the licensed product

Parameters:
licensee If not NULL, will point to the licensee name, or to an empty string "" for non-commercial versions
product If not NULL, will point to the product name

Referenced by ham::db::get_license().

HAM_EXPORT void HAM_CALLCONV ham_get_version ( ham_u32_t major,
ham_u32_t minor,
ham_u32_t revision 
)

Returns the version of the hamsterdb library

Parameters:
major If not NULL, will return the major version number
minor If not NULL, will return the minor version number
revision If not NULL, will return the revision version number

Referenced by ham::db::get_version().

HAM_EXPORT void HAM_CALLCONV ham_set_errhandler ( ham_errhandler_fun  f  ) 

Sets the global error handler

This handler will receive all debug messages that are emitted by hamsterdb. You can install the default handler by setting f to 0.

The default error handler prints all messages to stderr. To install a different logging facility, you can provide your own error handler.

Note that the callback function must have the same calling convention as the hamsterdb library.

Parameters:
f A pointer to the error handler function, or NULL to restore the default handler

Referenced by ham::db::set_errhandler().

HAM_EXPORT const char* HAM_CALLCONV ham_strerror ( ham_status_t  status  ) 

Translates a hamsterdb status code to a descriptive error string

Parameters:
status The hamsterdb status code
Returns:
A pointer to a descriptive error string

Referenced by ham::error::get_string().


Generated on Wed Apr 14 20:37:55 2010 for hamsterdb Embedded Database by  doxygen 1.6.1