qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 19/19] VNC: Convert do_info_vnc() to QObject


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 19/19] VNC: Convert do_info_vnc() to QObject
Date: Thu, 10 Dec 2009 07:00:01 -0600
User-agent: Thunderbird 2.0.0.23 (X11/20090825)

Markus Armbruster wrote:
Luiz Capitulino <address@hidden> writes:

Return a QDict with server information. Connected clients are returned
as a QList of QDicts.

The new functions (vnc_qdict_remote_addr(), vnc_qdict_local_addr() and
put_addr_qdict()) are used to insert 'host' and 'service' information
in the returned QDict.

This patch is big, but I don't see how to split it.

Signed-off-by: Luiz Capitulino <address@hidden>
---
 console.h |    3 +-
 monitor.c |    3 +-
 vnc.c     |  191 +++++++++++++++++++++++++++++++++++++++++++++++++++----------
 3 files changed, 164 insertions(+), 33 deletions(-)

[...]
diff --git a/vnc.c b/vnc.c
index 32c4678..f0fea6a 100644
--- a/vnc.c
+++ b/vnc.c
[...]
+/**
+ * do_info_vnc(): Show VNC server information
+ *
+ * Return a QDict with server information. Connected clients are returned
+ * as a QList of QDicts.
+ *
+ * The main QDict contains the following:
+ *
+ * - "status": "disabled" or "enabled"
+ * - "host": server's IP address
+ * - "service": server's port number
+ * - "auth": authentication method (optional)
+ * - "clients": a QList of all connected clients
+ *
+ * Clients are described by a QDict, with the following information:
+ *
+ * - "host": client's IP address
+ * - "service": client's port number
+ * - "x509 dname": TLS dname (optional)

Sure you want dict keys with spaces?  I'd prefer "x509-dname".

+1

Actually, x509_dname is preferable. While the JSON spec doesn't say this, in JavaScript, dictionaries are indistinguishable from objects. It's better for the key names to be valid identifiers.

--
Regards,

Anthony Liguori





reply via email to

[Prev in Thread] Current Thread [Next in Thread]