libresman

diff src/resman.h @ 11:bebc065a941f

doesn't work yet
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 07 Feb 2014 07:50:02 +0200
parents 4d18498a0078
children fe0dbdfbe403
line diff
     1.1 --- a/src/resman.h	Wed Feb 05 02:01:49 2014 +0200
     1.2 +++ b/src/resman.h	Fri Feb 07 07:50:02 2014 +0200
     1.3 @@ -5,9 +5,9 @@
     1.4   * done callback: second-stage callback, called in the context of the
     1.5   *                user thread, after the load callback returns
     1.6   */
     1.7 -typedef int (*resman_load_func)(const char *fname, void *data, void *closure);
     1.8 -typedef int (*resman_done_func)(int result, void *data, void *closure);
     1.9 -typedef void (*resman_destroy_func)(void *data, void *closure);
    1.10 +typedef int (*resman_load_func)(const char *fname, int id, void *closure);
    1.11 +typedef int (*resman_done_func)(int id, void *closure);
    1.12 +typedef void (*resman_destroy_func)(int id, void *closure);
    1.13  
    1.14  struct resman;
    1.15  
    1.16 @@ -30,10 +30,12 @@
    1.17  
    1.18  int resman_poll(struct resman *rman);
    1.19  
    1.20 +const char *resman_get_res_name(struct resman *rman, int res_id);
    1.21 +
    1.22  void resman_set_res_data(struct resman *rman, int res_id, void *data);
    1.23  void *resman_get_res_data(struct resman *rman, int res_id);
    1.24  
    1.25 -int resman_get_res_error(struct resman *rman, int res_id);
    1.26 +int resman_get_res_result(struct resman *rman, int res_id);
    1.27  
    1.28  #ifdef __cplusplus
    1.29  }