summaryrefslogtreecommitdiff
path: root/resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'resource.h')
-rw-r--r--resource.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/resource.h b/resource.h
index 44d0d74..c3a1907 100644
--- a/resource.h
+++ b/resource.h
@@ -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;
};