qments/include/drivers/unix_fs/unix_fs_driver.h

23 lines
636 B
C
Raw 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, CommentHeader *header, char *text);
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 };
#endif /* UNIX_FS_DRIVER_H */