]> git.tue.mpg.de Git - paraslash.git/commitdiff
Add execute mechanism to receiver nodes.
authorAndre Noll <maan@systemlinux.org>
Tue, 26 Jun 2012 22:39:37 +0000 (00:39 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 18 Nov 2012 19:28:28 +0000 (20:28 +0100)
Currently, receiver nodes have not much information to offer which could
be interesting for their child buffer tree nodes. This is about to change
with the introduction of the afh receiver and the para_play executable.
For example, para_play needs to query the number of chunks of the current
audio file from the afh receiver in order to display playback progress.

This patch adds only the new function pointer to struct receiver. The afh
receiver will be the first user of this.

audiod.c
dccp_recv.c
http_recv.c
recv.c
recv.h
recv_common.c
udp_recv.c

index 03705089ff528f37aaf31a26ddf604ad884b1862..791432ceedc3156b477802d2e64edb45446cdc45 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -16,8 +16,8 @@
 #include "list.h"
 #include "sched.h"
 #include "ggo.h"
-#include "recv.h"
 #include "buffer_tree.h"
+#include "recv.h"
 #include "filter.h"
 #include "grab_client.h"
 #include "client.cmdline.h"
index ff9b347b6bf8fb52cfdb473d74126c839fcc110f..69bc186126c2447e5f5d68306a070bd0953a2b1d 100644 (file)
 #include "list.h"
 #include "sched.h"
 #include "ggo.h"
+#include "buffer_tree.h"
 #include "recv.h"
 #include "string.h"
 #include "net.h"
 #include "fd.h"
-#include "buffer_tree.h"
 
 #include "dccp_recv.cmdline.h"
 
index c19facf70a39b1503deaea28008fc4b7a8b73f97..48673afb478aadd242d5ad4829d78623beedf1f9 100644 (file)
 #include "list.h"
 #include "sched.h"
 #include "ggo.h"
+#include "buffer_tree.h"
 #include "recv.h"
 #include "http_recv.cmdline.h"
 #include "net.h"
 #include "string.h"
 #include "fd.h"
-#include "buffer_tree.h"
 
 /**
  * the possible states of a http receiver node
diff --git a/recv.c b/recv.c
index c021b17bdbefdbcc7e562f496b6ae14917d3d681..3d5049ba36aabb42720d6b4bb2d1d3f57b0acd7f 100644 (file)
--- a/recv.c
+++ b/recv.c
 #include "list.h"
 #include "sched.h"
 #include "ggo.h"
+#include "buffer_tree.h"
 #include "recv.h"
 #include "recv.cmdline.h"
 #include "fd.h"
 #include "string.h"
 #include "error.h"
 #include "stdout.h"
-#include "buffer_tree.h"
 #include "version.h"
 
 /** The gengetopt args info struct. */
diff --git a/recv.h b/recv.h
index c69520e402905524ebcb120bc44221f371d29371..322ac57200179f49061f0b0d568816e428950ea4 100644 (file)
--- a/recv.h
+++ b/recv.h
@@ -119,6 +119,13 @@ struct receiver {
 
        /** The two help texts of this receiver. */
        struct ggo_help help;
+       /**
+        * Answer a buffer tree query.
+        *
+        * This optional function pointer is used for inter node communications
+        * of the buffer tree nodes. See \ref btr_command_handler for details.
+        */
+       btr_command_handler execute;
 };
 
 /** Define an array of all available receivers. */
index 7d7d2b059cd4765dab811d3ace2ea144d4d8f7c8..f0321df2f1f3e79733c3c2d42d3998e236395833 100644 (file)
@@ -12,9 +12,9 @@
 #include "list.h"
 #include "sched.h"
 #include "ggo.h"
+#include "buffer_tree.h"
 #include "recv.h"
 #include "string.h"
-#include "buffer_tree.h"
 
 DEFINE_RECEIVER_ARRAY;
 
index f4912e1e5322f1adf79cb805a2782ba7edbecdad..ec188b5e165a0cdb57d5a8aed009286ea1ec532f 100644 (file)
 #include "list.h"
 #include "sched.h"
 #include "ggo.h"
+#include "buffer_tree.h"
 #include "recv.h"
 #include "udp_recv.cmdline.h"
 #include "string.h"
 #include "net.h"
 #include "fd.h"
-#include "buffer_tree.h"
 
 static void udp_recv_pre_select(struct sched *s, struct task *t)
 {