From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCsso-0006L0-Or for qemu-devel@nongnu.org; Tue, 24 Nov 2009 05:44:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCssj-0006J0-VJ for qemu-devel@nongnu.org; Tue, 24 Nov 2009 05:44:30 -0500 Received: from [199.232.76.173] (port=45501 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCssj-0006Ix-JD for qemu-devel@nongnu.org; Tue, 24 Nov 2009 05:44:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34824) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NCssj-0003lA-CE for qemu-devel@nongnu.org; Tue, 24 Nov 2009 05:44:25 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAOAiN4P012030 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 24 Nov 2009 05:44:23 -0500 Date: Tue, 24 Nov 2009 10:44:21 +0000 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] [PATCH 17/17] VNC: Convert do_info_vnc() to QObject Message-ID: <20091124104421.GB8427@redhat.com> References: <1259006783-945-1-git-send-email-lcapitulino@redhat.com> <1259006783-945-18-git-send-email-lcapitulino@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1259006783-945-18-git-send-email-lcapitulino@redhat.com> Reply-To: "Daniel P. Berrange" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org On Mon, Nov 23, 2009 at 06:06:23PM -0200, Luiz Capitulino wrote: > 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. > +/** > + * 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 > + * - "clients": 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 > + * - "username": SASL username > + * > + * Example: > + * > + * { "status": "enabled", "host": "0.0.0.0", "service": "50402", "auth": "none", > + * "clients": [ > + * { "host": "127.0.0.1", "service": "50401", > + * "x509 dname": "none", "username": "none" } ] } > + */ For the JSON formatted data, those literal 'none' strings should really be serialized as NULLs, or even cause that key to be left out altogether. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|