- struct afb_arg (*get)(void *data, const char *name);
- void (*iterate)(void *data, int (*iterator)(void *closure, struct afb_arg arg), void *closure);
- void (*fail)(void *data, const char *status, const char *info);
- void (*success)(void *data, struct json_object *obj, const char *info);
- int (*session_create)(void *data);
- int (*session_check)(void *data, int refresh);
- void (*session_close)(void *data);
+ struct json_object *(*json)(void *closure);
+ struct afb_arg (*get)(void *closure, const char *name);
+
+ void (*success)(void *closure, struct json_object *obj, const char *info);
+ void (*fail)(void *closure, const char *status, const char *info);
+
+ const char *(*raw)(void *closure, size_t *size);
+ void (*send)(void *closure, const char *buffer, size_t size);
+
+ void *(*context_get)(void *closure);
+ void (*context_set)(void *closure, void *value, void (*free_value)(void*));
+
+ void (*addref)(void *closure);
+ void (*unref)(void *closure);