diff options
Diffstat (limited to 'src/storage.h')
-rw-r--r-- | src/storage.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/storage.h b/src/storage.h index 00826d8..54df8fa 100644 --- a/src/storage.h +++ b/src/storage.h @@ -19,10 +19,14 @@ struct tsnif_storage_header { }; enum { - TSNIF_STORAGE_OPT_CREATE = 0x1, - TSNIF_STORAGE_OPT_OPEN = 0x2, - TSNIF_STORAGE_OPT_READ = 0x4, - TSNIF_STORAGE_OPT_WRITE = 0x8, + TSNIF_STORAGE_OPT_READ = 0x1, + TSNIF_STORAGE_OPT_WRITE = 0x2, +}; + +enum { + TSNIF_STORAGE_READ_NEXT = 0x1, + TSNIF_STORAGE_READ_PREV = 0x2, + TSNIF_STORAGE_READ_EOF = 0x3, }; struct tsnif_storage_rec { @@ -36,7 +40,7 @@ int tsnif_storage_init(struct tsnif_storage_handle *h, int tsnif_storage_close(struct tsnif_storage_handle *h); int tsnif_storage_write(struct tsnif_storage_handle *h, struct tsnif_storage_rec *rec); -int tsnif_storage_read(struct tsnif_storage_handle *h, int idx, +int tsnif_storage_read(struct tsnif_storage_handle *h, int what, struct tsnif_storage_rec *rec); /* TODO make CONFIG option and ifdef this place */ |