From: Andre Noll Date: Sat, 26 Jul 2014 11:51:35 +0000 (+0200) Subject: Make senders independent of afs and osl. X-Git-Tag: v0.5.4~51^2 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=77d770f7b0930476d95021bd9e6d6007db53d391;p=paraslash.git Make senders independent of afs and osl. 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 . 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. --- diff --git a/afh.h b/afh.h index ec1d6706..4204108a 100644 --- 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 9669b26d..0b443354 100644 --- 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. * diff --git a/dccp_send.c b/dccp_send.c index ed03b614..92a22162 100644 --- a/dccp_send.c +++ b/dccp_send.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -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" diff --git a/http_send.c b/http_send.c index ce2dddfa..51edd9d9 100644 --- a/http_send.c +++ b/http_send.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -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" diff --git a/udp_send.c b/udp_send.c index 96f12ff0..35cb6135 100644 --- a/udp_send.c +++ b/udp_send.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #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"