Alex 'AdUser' Z
8 years ago
2 changed files with 96 additions and 0 deletions
@ -0,0 +1,35 @@
|
||||
#ifndef HAS_IO_H |
||||
#define HAS_IO_H 1 |
||||
|
||||
/**
|
||||
* @file |
||||
* @brief This file contains definitions of internal i/o functions, used by database |
||||
*/ |
||||
|
||||
/**
|
||||
* @brief Read records from database |
||||
* @param db Database handle |
||||
* @param start First record number |
||||
* @param records Records count to read |
||||
* @param data Storage for records data (allocated) |
||||
* @retval <0 on error |
||||
* @retval 0 on no records read |
||||
* @retval >0 as records count actually read |
||||
* @note If at least one record read, contents of @a data pointer |
||||
* must be freed by user |
||||
*/ |
||||
int simdb_read(simdb_t *db, int start, int records, simdb_urec_t **data); |
||||
|
||||
/**
|
||||
* @brief Write records to database |
||||
* @param db Database handle |
||||
* @param start First record number |
||||
* @param records Records count to read |
||||
* @param data Pointer to records data |
||||
* @retval <0 on error |
||||
* @retval 0 on no records written |
||||
* @retval >0 as records count actually written |
||||
*/ |
||||
int simdb_write(simdb_t *db, int start, int records, simdb_urec_t *data); |
||||
|
||||
#endif |
Loading…
Reference in new issue