|
hamsterdb Embedded Database
2.1.1
|
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 HAM_DEBUG_LEVEL_DEBUG 0 |
A debug message
Definition at line 380 of file hamsterdb.h.
| #define HAM_DEBUG_LEVEL_FATAL 3 |
A fatal error message
Definition at line 386 of file hamsterdb.h.
| #define HAM_DEBUG_LEVEL_NORMAL 1 |
A normal error message
Definition at line 383 of file hamsterdb.h.
| 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().
| message | The error message |
| level | The error level:
|
Definition at line 377 of file hamsterdb.h.
| 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
| 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 hamsterdb::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
| 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 hamsterdb::db::get_version().
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.
| f | A pointer to the error handler function, or NULL to restore the default handler |
Referenced by hamsterdb::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
| status | The hamsterdb status code |
Referenced by error(), and hamsterdb::error::get_string().
1.7.6.1