libresman

view src/resman.h @ 1:469ce01809bc

rudimentary imgthumbs "example program". doesn't use libresman yet
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 31 Jan 2014 03:17:24 +0200
parents 61d7ff6da54b
children bd9b4ff19c93
line source
1 #ifndef RESOURCE_MANAGER_H_
2 #define RESOURCE_MANAGER_H_
4 struct resman;
6 int resman_init(struct resman *rman);
7 void resman_destroy(struct resman *rman);
9 /* The load callback will be called to load a data file. It may be called in the
10 * context of a different loading thread.
11 */
12 /*void resman_set_load_func(struct resman *rman, resman_load_func_t func, void *cls);*/
14 /* The "done" callback will be called in the context of the main thread, whenever a
15 * file was sucessfully loaded, or an error occured.
16 * It's first argument (status) is set to whatever the load function returned, and its
17 * closure pointer is the closure ...
18 */
19 /*void resman_set_done_func(struct resman *rman, resman_done_func_t func);*/
22 int resman_lookup(struct resman *rman, const char *fname, void *cls);
23 void resman_wait(struct resman *rman, int id);
25 int resman_poll(struct resman *rman);
27 void resman_set_res_data(struct resman *rman, int res_id, void *data);
28 void *resman_get_res_data(struct resman *rman, int res_id);
31 #endif /* RESOURCE_MANAGER_H_ */