VERSION command, HELP and EXPIRE skeletons
authorChristian Thaeter <ct@pipapo.org>
Tue, 16 Oct 2007 16:44:45 +0000 (18:44 +0200)
committerChristian Thaeter <ct@pipapo.org>
Tue, 16 Oct 2007 16:44:45 +0000 (18:44 +0200)
src/rxpd.h
src/rxpd_connection_cmd.c

index 649e0a4..0a4e8ad 100644 (file)
@@ -49,6 +49,9 @@
   RXPD_CMD(SAVE)        \
   RXPD_CMD(DUMP)        \
   RXPD_CMD(LIST)        \
+  RXPD_CMD(VERSION)     \
+  RXPD_CMD(HELP)        \
+  RXPD_CMD(EXPIRE)      \
   RXPD_CMD(SHUTDOWN)
 
 #define RXPD_CMD(cmd) RXPD_CMD_##cmd,
index 9aa3558..5fb035c 100644 (file)
@@ -385,3 +385,46 @@ rxpd_connection_cmd_SHUTDOWN (int fd, short event, void* ptr)
   rxpd_buffer_printf (&self->out, "#OK:\n");
   rxpd_connection_delete (self);
 }
+
+
+void
+rxpd_connection_cmd_VERSION (int fd, short event, void* ptr)
+{
+  (void) fd;
+  (void) event;
+  struct rxpd_connection* self = (struct rxpd_connection*) ptr;
+  rxpd_buffer_printf (&self->out, PACKAGE_STRING "\n");
+  rxpd_connection_delete (self);
+}
+
+void
+rxpd_connection_cmd_HELP (int fd, short event, void* ptr)
+{
+  (void) fd;
+  (void) event;
+  struct rxpd_connection* self = (struct rxpd_connection*) ptr;
+  //struct rxpd_base* base = self->socket->base;
+  rxpd_die ("Unimplemented\n");
+}
+
+void
+rxpd_connection_cmd_EXPIRE (int fd, short event, void* ptr)
+{
+  (void) fd;
+  (void) event;
+  struct rxpd_connection* self = (struct rxpd_connection*) ptr;
+  //struct rxpd_base* base = self->socket->base;
+  rxpd_die ("Unimplemented\n");
+}
+
+/* Template
+void
+rxpd_connection_cmd_ (int fd, short event, void* ptr)
+{
+  (void) fd;
+  (void) event;
+  struct rxpd_connection* self = (struct rxpd_connection*) ptr;
+  struct rxpd_base* base = self->socket->base;
+  rxpd_die ("Unimplemented\n");
+}
+*/