render_multi.h
changeset 13 ee426f453cf5
parent 11 082bfaf38cf0
child 16 50995bbe442a
--- a/render_multi.h	Fri Jun 06 23:37:45 2008 +0300
+++ b/render_multi.h	Sat Jun 07 05:05:18 2008 +0300
@@ -1,6 +1,10 @@
 #ifndef RENDER_MULTI_H
 #define RENDER_MULTI_H
 
+#include <event2/util.h>
+#include <event2/buffer.h>
+
+#include "render.h"
 #include "remote_pool.h"
 
 /*
@@ -18,8 +22,8 @@
  * The behaviour of the callbacks is mostly the same as for render_remote.h
  */
 struct render_multi *render_multi (
-        render_t *render_ctx,               // what to render
-        struct remote_pool *render_pool,    // what render pool to use
+        struct render *render_ctx,               // what to render
+        struct remote_pool *pool_info,    // what render pool to use
         void (*cb_sent)(void *arg),
         void (*cb_data)(struct evbuffer *buf, void *arg),
         void (*cb_done)(void *arg),
@@ -27,4 +31,24 @@
         void *cb_arg
 );
 
+/*
+ * Cancel the given request. No more callbacks will be called, buffered data is
+ * discarded and the remote render processes will cancel ASAP.
+ */
+void render_multi_cancel (struct render_multi *ctx);
+
+/*
+ * Doesn't actually do anything yet
+ */
+int render_multi_set_recv (struct render_multi *ctx, size_t recv_threshold, size_t unread_buffer);
+
+/*
+ * Call cb_data with the current set of buffered input data immediately,
+ * regardless of whether or not the buffer contains any data, or any new
+ * data has been received.
+ *
+ * Only call this after cb_sent and before cb_done/cb_fail.
+ */
+int render_multi_shake (struct render_multi *ctx);
+
 #endif /* RENDER_MULTI_H */