Make senders independent of afs and osl.
authorAndre Noll <maan@systemlinux.org>
Sat, 26 Jul 2014 11:51:35 +0000 (13:51 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 6 Sep 2014 19:21:42 +0000 (21:21 +0200)
Although senders don't know anything about the osl databases of
the audio file selector, all senders currently include afs.h and
osl.h. This is because:

* senders are part of para_server, so they include server.h,

* server.h has an audio_file_data structure embedded in struct
misc_meta_data, so struct audio_file_data must be declared
before server.h is included,

* struct audio_file_data is declared in afs.h,

* afs.h makes use of structures defined in <osl.h>.

This patch moves the declaration of struct audio_file_data from afs.h
to afh.h, which is also included by all senders. This allows to remove
the two include directives for afs.h and osl.h from all three senders.

afh.h
afs.h
dccp_send.c
http_send.c
udp_send.c

diff --git a/afh.h b/afh.h
index ec1d67065c757402b3a63d81e27450d763d87263..4204108a33131e3b4bda8a007bd429665246860c 100644 (file)
--- a/afh.h
+++ b/afh.h
@@ -58,6 +58,18 @@ struct afh_info {
        uint16_t bitrate;
 };
 
+/** Data about the current audio file, passed from afs to server. */
+struct audio_file_data {
+       /** The open file descriptor to the current audio file. */
+       int fd;
+       /** Vss needs this for streaming. */
+       struct afh_info afhi;
+       /** Size of the largest chunk. */
+       uint32_t max_chunk_size;
+       /** Needed to get the audio file header. */
+       uint8_t audio_format_id;
+};
+
 /**
  *  Structure for audio format handling.
  *
diff --git a/afs.h b/afs.h
index 9669b26d7fba7802af4b2156a26e804e937ea051..0b443354b74a115d1e81349ba8d3fada358dde62 100644 (file)
--- a/afs.h
+++ b/afs.h
@@ -122,18 +122,6 @@ struct ls_data {
        unsigned char *hash;
 };
 
-/** Data about the current audio file, passed from afs to server. */
-struct audio_file_data {
-       /** The open file descriptor to the current audio file. */
-       int fd;
-       /** Vss needs this for streaming. */
-       struct afh_info afhi;
-       /** Size of the largest chunk. */
-       uint32_t max_chunk_size;
-       /** Needed to get the audio file header. */
-       uint8_t audio_format_id;
-};
-
 /**
  * Codes used for communication between the server and the afs process.
  *
index ed03b6140d3854710b85355f68165f6316f878ce..92a22162954ee030353017101803f1d9ef4a53bf 100644 (file)
@@ -15,7 +15,6 @@
 #include <sys/socket.h>
 #include <regex.h>
 #include <sys/types.h>
-#include <osl.h>
 #include <arpa/inet.h>
 #include <sys/un.h>
 #include <netdb.h>
@@ -24,7 +23,6 @@
 #include "error.h"
 #include "string.h"
 #include "afh.h"
-#include "afs.h"
 #include "server.h"
 #include "net.h"
 #include "list.h"
index ce2dddfa82dcbcfbcc039e7b805af157947a2f26..51edd9d96704f20bb8969e53d8171ccc328458aa 100644 (file)
@@ -10,7 +10,6 @@
 #include <sys/socket.h>
 #include <regex.h>
 #include <sys/types.h>
-#include <osl.h>
 #include <arpa/inet.h>
 #include <sys/un.h>
 #include <netdb.h>
@@ -20,7 +19,6 @@
 #include "string.h"
 #include "server.cmdline.h"
 #include "afh.h"
-#include "afs.h"
 #include "server.h"
 #include "http.h"
 #include "list.h"
index 96f12ff0f716b3e26176ab5d03b3ca0d3dba2d7e..35cb61358bb616a0733224c2f4494b72989e9c02 100644 (file)
@@ -15,7 +15,6 @@
 #include <net/if.h>
 #include <arpa/inet.h>
 #include <sys/un.h>
-#include <osl.h>
 #include <netdb.h>
 
 #include "server.cmdline.h"
@@ -23,7 +22,6 @@
 #include "error.h"
 #include "string.h"
 #include "afh.h"
-#include "afs.h"
 #include "server.h"
 #include "list.h"
 #include "send.h"