]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
server: Reduce scope of struct server_command.
authorAndre Noll <maan@tuebingen.mpg.de>
Tue, 13 Jan 2015 23:00:05 +0000 (00:00 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Wed, 12 Aug 2015 21:23:47 +0000 (23:23 +0200)
This structure is only needed in command.c, so we can make it local
to this file. As structures defined in .c files are not included
in doxygen, the reference to struct server_command in server.h must
be removed.

command.c
command.h
server.c

index 175b496ca799820bc5d891676f71970d31ba7cc9..2db2d9cccabde3f90252e90fdc987fea4444f530 100644 (file)
--- a/command.c
+++ b/command.c
 #include "signal.h"
 #include "version.h"
 
 #include "signal.h"
 #include "version.h"
 
+/* Defines one command of para_server. */
+struct server_command {
+       /* The name of the command. */
+       const char *name;
+       /* Pointer to the function that handles the command. */
+       int (*handler)(struct command_context *);
+       /* The privileges a user must have to execute this command. */
+       unsigned int perms;
+       /* 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;
+};
+
 static struct server_command afs_cmds[] = {DEFINE_AFS_CMD_ARRAY};
 static struct server_command server_cmds[] = {DEFINE_SERVER_CMD_ARRAY};
 
 static struct server_command afs_cmds[] = {DEFINE_AFS_CMD_ARRAY};
 static struct server_command server_cmds[] = {DEFINE_SERVER_CMD_ARRAY};
 
index d28db0389f01846d4b7bb0c9c37ff156028a2bbf..ab76d6027d8f9cbcfe6075050c0c7188fc271c1b 100644 (file)
--- a/command.h
+++ b/command.h
@@ -16,24 +16,6 @@ struct command_context {
        struct stream_cipher_context scc;
 };
 
        struct stream_cipher_context scc;
 };
 
-/**
- * Defines one command of para_server.
- */
-struct server_command {
-       /** The name of the command. */
-       const char *name;
-       /** Pointer to the function that handles the command. */
-       int (*handler)(struct command_context *);
-       /** The privileges a user must have to execute this command. */
-       unsigned int perms;
-       /** 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;
-};
-
 int send_sb(struct stream_cipher_context *scc, void *buf, size_t numbytes,
                int band, bool dont_free);
 __printf_3_4 int send_sb_va(struct stream_cipher_context *scc, int band,
 int send_sb(struct stream_cipher_context *scc, void *buf, size_t numbytes,
                int band, bool dont_free);
 __printf_3_4 int send_sb_va(struct stream_cipher_context *scc, int band,
index 3118a3a0404c67b1663574125002f7ddf7cb87cc..cba57b1da82c4ff0a94675fe52ac1861180a954e 100644 (file)
--- a/server.c
+++ b/server.c
@@ -9,7 +9,7 @@
 /**
  * \mainpage Main data structures and selected APIs:
  *
 /**
  * \mainpage Main data structures and selected APIs:
  *
- *     - Server: \ref server_command, \ref sender,
+ *     - Senders: \ref sender,
  *     - Audio file selector: \ref afs_info, \ref afs_table,
  *     - Audio format handler: \ref audio_format_handler, \ref afh_info
  *     - Receivers/filters/writers: \ref receiver, \ref receiver_node,
  *     - Audio file selector: \ref afs_info, \ref afs_table,
  *     - Audio format handler: \ref audio_format_handler, \ref afh_info
  *     - Receivers/filters/writers: \ref receiver, \ref receiver_node,