#include <file_internals.h>
Specialised dba_file implementations can just use a struct _dba_file or a larger structure with a struct _dba_file as the first element.
On creation of a dba_file instance, the fun_* methods need to be set with the functions used to delete, read and write.
Data Fields | |
| char * | name |
| Name of the file. | |
| FILE * | fd |
| FILE structure used to read or write to the file. | |
| int | close_on_exit |
| Set to true if fd should be closed when dba_file_delete() is called. | |
| int | idx |
| Index of the last message read from the file. | |
| dba_encoding | type |
| File encoding. | |
| dba_file_delete_fun | fun_delete |
| Function to use to delete this dba_file. | |
| dba_file_read_fun | fun_read |
| Function to use to read a message. | |
| dba_file_write_fun | fun_write |
| Function to use to write an encoded message. | |
1.5.2