[svn] assuan - r276 - in trunk: doc src
svn author marcus
cvs at cvs.gnupg.org
Thu Oct 18 16:42:00 CEST 2007
Author: marcus
Date: 2007-10-18 16:41:51 +0200 (Thu, 18 Oct 2007)
New Revision: 276
Modified:
trunk/doc/ChangeLog
trunk/doc/assuan.texi
trunk/src/ChangeLog
trunk/src/assuan-handler.c
Log:
doc/
2007-10-18 Marcus Brinkmann <marcus at g10code.de>
* assuan.texi (Client requests): Document HELP.
src/
2007-10-18 Marcus Brinkmann <marcus at g10code.de>
* assuan-handler.c (std_handler_help): New function.
(std_cmd_table): Add new command HELP.
Modified: trunk/doc/ChangeLog
===================================================================
--- trunk/doc/ChangeLog 2007-10-08 18:03:38 UTC (rev 275)
+++ trunk/doc/ChangeLog 2007-10-18 14:41:51 UTC (rev 276)
@@ -1,3 +1,7 @@
+2007-10-18 Marcus Brinkmann <marcus at g10code.de>
+
+ * assuan.texi (Client requests): Document HELP.
+
2007-09-07 Moritz Schulte <moritz at g10code.com>
* assuan.texi (Client code): mention assuan_send_data() instead of
Modified: trunk/doc/assuan.texi
===================================================================
--- trunk/doc/assuan.texi 2007-10-08 18:03:38 UTC (rev 275)
+++ trunk/doc/assuan.texi 2007-10-18 14:41:51 UTC (rev 276)
@@ -339,7 +339,8 @@
to indicate a partial end of data.
@item HELP
-Reserved for future extensions.
+Lists all commands that the server understands as comment lines on the
+status channel.
@item QUIT
Reserved for future extensions.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2007-10-08 18:03:38 UTC (rev 275)
+++ trunk/src/ChangeLog 2007-10-18 14:41:51 UTC (rev 276)
@@ -1,3 +1,8 @@
+2007-10-18 Marcus Brinkmann <marcus at g10code.de>
+
+ * assuan-handler.c (std_handler_help): New function.
+ (std_cmd_table): Add new command HELP.
+
2007-10-08 Werner Koch <wk at g10code.com>
* assuan-util.c (assuan_set_io_hooks): New.
Modified: trunk/src/assuan-handler.c
===================================================================
--- trunk/src/assuan-handler.c 2007-10-08 18:03:38 UTC (rev 275)
+++ trunk/src/assuan-handler.c 2007-10-18 14:41:51 UTC (rev 276)
@@ -139,6 +139,23 @@
}
static int
+std_handler_help (assuan_context_t ctx, char *line)
+{
+ int i;
+ char buf[ASSUAN_LINELENGTH];
+
+ for (i = 0; i < ctx->cmdtbl_used; i++)
+ {
+ snprintf (buf, sizeof (buf), "# %s", ctx->cmdtbl[i].name);
+ buf[ASSUAN_LINELENGTH - 1] = '\0';
+ assuan_write_line (ctx, buf);
+ }
+
+ return PROCESS_DONE (ctx, 0);
+}
+
+
+static int
std_handler_end (assuan_context_t ctx, char *line)
{
return PROCESS_DONE (ctx, set_error (ctx, Not_Implemented, NULL));
@@ -232,6 +249,7 @@
{ "AUTH", std_handler_auth, 1 },
{ "RESET", std_handler_reset, 1 },
{ "END", std_handler_end, 1 },
+ { "HELP", std_handler_help, 1 },
{ "INPUT", std_handler_input },
{ "OUTPUT", std_handler_output },
More information about the Gnupg-commits
mailing list