]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - command.h
server: Reduce scope of struct server_command.
[paraslash.git] / command.h
index e4159e6bda00131bf4a1ef6b5a46627c9f7d88b1..ab76d6027d8f9cbcfe6075050c0c7188fc271c1b 100644 (file)
--- a/command.h
+++ b/command.h
@@ -11,29 +11,9 @@ struct command_context {
        /** Argument vector. */
        char **argv;
        /** The command being executed. */
-       struct server_command *cmd;
+       const struct server_command *cmd;
        /** File descriptor and crypto keys. */
        struct stream_cipher_context scc;
-       /** Whether to use the sideband API for this command. */
-       bool use_sideband;
-};
-
-/**
- * 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,