]> git.bts.cx Git - benzene.git/blob - src/bz/resources/resource.h
Initial version
[benzene.git] / src / bz / resources / resource.h
1 #ifndef BZ_RESOURCES_RESOURCE_H
2 #define BZ_RESOURCES_RESOURCE_H
3
4 #include <bz/memory/arena.h>
5 #include <bz/types/common.h>
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 typedef struct BZResource BZResource;
12 typedef BZResource * BZResourceID;
13
14 extern BZResourceID bzResourcesOpenResource(const char *type, const char *identifierFmt, ...);
15 extern void bzResourcesCloseResource(BZResourceID resource);
16
17 // FIXME, these should really be resource handles or something.
18 extern size_t bzResourcesFileLength(BZResourceID resource);
19 extern size_t bzResourcesTell(BZResourceID resource);
20 extern size_t bzResourcesSeek(BZResourceID resource, size_t position);
21 extern size_t bzResourcesReadBytes(BZResourceID resource, void *outputBuffer, size_t numBytes);
22
23 #ifdef __cplusplus
24 }
25 #endif
26
27 #endif