+ void (*handle_request)(struct client *cl, char *url, struct path_info *pi);
+};
+
+#ifdef HAVE_UBUS
+struct dispatch_ubus {
+ struct ubus_request req;
+
+ struct uloop_timeout timeout;
+ struct json_tokener *jstok;
+ struct json_object *jsobj;
+ struct json_object *jsobj_cur;
+ int post_len;
+
+ const char *sid;
+ uint32_t obj;
+ const char *func;
+
+ struct blob_buf buf;
+ bool req_pending;
+ bool array;
+ int array_idx;
+};
+#endif
+
+struct dispatch {
+ int (*data_send)(struct client *cl, const char *data, int len);
+ void (*data_done)(struct client *cl);
+ void (*write_cb)(struct client *cl);
+ void (*close_fds)(struct client *cl);
+ void (*free)(struct client *cl);
+
+ void *req_data;
+ void (*req_free)(struct client *cl);
+
+ bool data_blocked;
+
+ union {
+ struct {
+ struct blob_attr **hdr;
+ int fd;
+ } file;
+ struct dispatch_proc proc;
+#ifdef HAVE_UBUS
+ struct dispatch_ubus ubus;
+#endif
+ };