]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
audiod: Reduce scope of struct audiod_command.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 13 Jan 2015 23:49:52 +0000 (00:49 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 12 Aug 2015 21:23:47 +0000 (23:23 +0200)
This structure is only used in audiod_command.c, so move the
declaration from audiod.h to audiod_command.c.

audiod.h
audiod_command.c

index 3b4b9bd0416720e5e7d9455df23221cb049a2fc8..b9cfb25e8a34a931dab19e67303813f46ab6b738 100644 (file)
--- a/audiod.h
+++ b/audiod.h
@@ -22,26 +22,12 @@ extern const char *audio_formats[];
  */
 enum audiod_status_info {AUDIOD_OFF, AUDIOD_ON, AUDIOD_STANDBY};
 
  */
 enum audiod_status_info {AUDIOD_OFF, AUDIOD_ON, AUDIOD_STANDBY};
 
-/** defines one command of para_audiod */
-struct audiod_command {
-       /** the name of the command */
-       const char *name;
-       /** pointer to the function that handles the command */
-       int (*handler)(int, int, char**);
-       /** one-line description of the command */
-       const char *description;
-       /** summary of the command line options */
-       const char *usage;
-       /** the long help text */
-       const char *help;
-};
-
-__malloc char *audiod_get_decoder_flags(void);
 extern struct audiod_args_info conf;
 extern int audiod_status;
 
 int handle_connect(int accept_fd, fd_set *rfds, uid_t *uid_whitelist);
 void audiod_status_dump(bool force);
 extern struct audiod_args_info conf;
 extern int audiod_status;
 
 int handle_connect(int accept_fd, fd_set *rfds, uid_t *uid_whitelist);
 void audiod_status_dump(bool force);
+__malloc char *audiod_get_decoder_flags(void);
 char *get_time_string(void);
 struct btr_node *audiod_get_btr_root(void);
 
 char *get_time_string(void);
 struct btr_node *audiod_get_btr_root(void);
 
index 98dba3b32dfcaee1a7532d8e3021947102d98f89..0fe2e5f05edd39e18ed8aac3d0191daec9196026 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "para.h"
 #include "audiod.cmdline.h"
 
 #include "para.h"
 #include "audiod.cmdline.h"
+#include "audiod.command_list.h"
 #include "list.h"
 #include "sched.h"
 #include "ggo.h"
 #include "list.h"
 #include "sched.h"
 #include "ggo.h"
 #include "write.h"
 #include "fd.h"
 #include "version.h"
 #include "write.h"
 #include "fd.h"
 #include "version.h"
-#include "audiod.command_list.h"
 
 extern struct sched sched;
 extern char *stat_item_values[NUM_STAT_ITEMS];
 
 
 extern struct sched sched;
 extern char *stat_item_values[NUM_STAT_ITEMS];
 
+/* Defines one command of para_audiod. */
+struct audiod_command {
+       const char *name;
+       /* Pointer to the function that handles the command. */
+       int (*handler)(int, int, char **);
+       /* One-line description. */
+       const char *description;
+       /* Summary of the command line options. */
+       const char *usage;
+       /* The long help text. */
+       const char *help;
+};
 
 static struct audiod_command audiod_cmds[] = {DEFINE_AUDIOD_CMD_ARRAY};
 
 
 static struct audiod_command audiod_cmds[] = {DEFINE_AUDIOD_CMD_ARRAY};
 
@@ -278,6 +290,7 @@ static int com_tasks(int fd, __a_unused int argc, __a_unused char **argv)
 {
        char *tl = get_task_list(&sched);
        int ret = 1;
 {
        char *tl = get_task_list(&sched);
        int ret = 1;
+
        if (tl)
                ret = client_write(fd, tl);
        free(tl);
        if (tl)
                ret = client_write(fd, tl);
        free(tl);