contact | forum | legal | impressum | privacy

hamsterdb API Documentation

 

hamsterdb Static Functions


Typedefs

typedef const char * message

Functions

typedef void (HAM_CALLCONV *ham_errhandler_fun)(int level
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)

Typedef Documentation

typedef const char* message

Definition at line 249 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 point to the major version number
minor If not NULL, will point to the minor version number
revision If not NULL, will point to 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().

typedef void ( HAM_CALLCONV *  ham_errhandler_fun  ) 

A typedef for a custom error handler function

Parameters:
message The error message
level The error level:
  • 0 a debug message
  • 1 a normal error message
  • 2 reserved
  • 3 a fatal error message

 
 

The hamsterdb API

 

Help us!

Found an information that is missing on this page? Please send a mail.