X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=send.h;h=0c74f0ea93208ec6b24878c963e671a4da8adb8d;hp=0736b1bc18105d4001263dc383b7fb50d22d622b;hb=5ff80e887a99a192bab3339c4339f8202733f031;hpb=435ad905b15bdad01dc3189bed5bf1d647ed1229 diff --git a/send.h b/send.h index 0736b1bc..0c74f0ea 100644 --- a/send.h +++ b/send.h @@ -1,21 +1,26 @@ /* - * Copyright (C) 2005-2014 Andre Noll + * Copyright (C) 2005 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ /** \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.