qments/include/drivers/unix_fs/unix_fs_driver.h

24 lines
702 B
C
Raw Permalink Normal View History

2023-06-15 01:44:02 +03:00
#ifndef UNIX_FS_DRIVER_H
#define UNIX_FS_DRIVER_H
#include "driver.h"
#define ID_CTRL_FILE "max_id"
#define TEXT_FILE_FMT "%s/%d.txt"
#define HEADER_FILE_FMT "%s/%d.header"
typedef struct {
char *path;
} UnixFsDriverData;
int unix_fs_driver_leave_comment(void *driver_data_ptr, const CommentHeader *header, const char *text);
2023-06-15 01:44:02 +03:00
int unix_fs_driver_get_header(void *driver_data_ptr, CommentHeader *header, int id);
int unix_fs_driver_get_text(void *driver_data_ptr, char *text, int id);
static const Driver unix_fs_driver = { unix_fs_driver_leave_comment, unix_fs_driver_get_header, unix_fs_driver_get_text };
int unix_fs_driver_get_max_id(void *driver_data_ptr);
2023-06-15 01:44:02 +03:00
#endif /* UNIX_FS_DRIVER_H */