daemon: Constify argument of two functions.
[paraslash.git] / send.h
diff --git a/send.h b/send.h
index 09eb78ba5d52f701a09b269b4485913bb05d5f51..0c74f0ea93208ec6b24878c963e671a4da8adb8d 100644 (file)
--- a/send.h
+++ b/send.h
@@ -6,16 +6,21 @@
 
 /** \file send.h Sender-related defines and structures. */
 
-/** The sender subcommands. */
+#define SENDER_SUBCOMMANDS \
+       SENDER_SUBCOMMAND(add) /**< Add a target (udp only). */ \
+       SENDER_SUBCOMMAND(delete) /**< Delete a target (udp only). */ \
+       SENDER_SUBCOMMAND(allow) /**< Allow connections from given IP address(es). */ \
+       SENDER_SUBCOMMAND(deny) /**< Deny connections from given IP address(es). */ \
+       SENDER_SUBCOMMAND(on) /**< Activate the sender. */ \
+       SENDER_SUBCOMMAND(off) /**< Deactivate the sender. */ \
+
+#define SENDER_SUBCOMMAND(_name) SENDER_ ## _name,
 enum sender_subcommand {
-       SENDER_ADD, /**< Add a target (udp only). */
-       SENDER_DELETE, /**< Delete a target (udp only). */
-       SENDER_ALLOW, /**< Allow connections from given IP address(es). */
-       SENDER_DENY, /**< Deny connections from given IP address(es). */
-       SENDER_ON, /**< Activate the sender. */
-       SENDER_OFF, /**< Deactivate the sender. */
+       SENDER_SUBCOMMANDS
        NUM_SENDER_CMDS /**< Used as array size in struct \ref sender. */
 };
+#undef SENDER_SUBCOMMAND
+#define SENDER_SUBCOMMAND(_name) #_name,
 
 /**
  * Describes one supported sender of para_server.