diff options
Diffstat (limited to 'resource.h')
-rw-r--r-- | resource.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -4,11 +4,16 @@ #define RESOURCE_h struct client; +struct resource; -struct resource { +struct resource_ops { int (*get)(struct client *c, struct resource *r); - int (*update)(struct client *c, struct resource *r, const char *m); void (*close)(struct client *c, struct resource *r); + int (*update)(struct client *c, struct resource *r, const char *m); +}; + +struct resource { + const struct resource_ops *ops; void *data; }; |