From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDMME-0006r1-KK for qemu-devel@nongnu.org; Thu, 29 Mar 2012 16:54:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SDMMC-0000dc-CA for qemu-devel@nongnu.org; Thu, 29 Mar 2012 16:54:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48089) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SDMMC-0000ct-3S for qemu-devel@nongnu.org; Thu, 29 Mar 2012 16:54:08 -0400 Date: Thu, 29 Mar 2012 22:54:00 +0200 From: Alon Levy Message-ID: <20120329205400.GE5648@garlic> References: <1332766053-9063-3-git-send-email-alevy@redhat.com> <1332771332-14090-1-git-send-email-alevy@redhat.com> <4F74C3C4.5040608@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F74C3C4.5040608@codemonkey.ws> Subject: Re: [Qemu-devel] [PATCH v2] spice_info: add mouse_mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, kraxel@redhat.com On Thu, Mar 29, 2012 at 03:19:16PM -0500, Anthony Liguori wrote: > On 03/26/2012 09:15 AM, Alon Levy wrote: > >Add mouse_mode, either server or mouse, to qmp and hmp commands, based > >on spice_server_is_server_mouse added in spice-server 0.10.3. > > > >Signed-off-by: Alon Levy > >--- > >v1->v2: > > report mouse mode "unknown" for qmp too (Gerd Hoffman request) > > > > hmp.c | 1 + > > qapi-schema.json | 7 ++++++- > > ui/spice-core.c | 7 +++++++ > > 3 files changed, 14 insertions(+), 1 deletion(-) > > > >diff --git a/hmp.c b/hmp.c > >index 9cf2d13..8837dd0 100644 > >--- a/hmp.c > >+++ b/hmp.c > >@@ -350,6 +350,7 @@ void hmp_info_spice(Monitor *mon) > > } > > monitor_printf(mon, " auth: %s\n", info->auth); > > monitor_printf(mon, " compiled: %s\n", info->compiled_version); > >+ monitor_printf(mon, " mouse-mode: %s\n", info->mouse_mode); > > > > if (!info->has_channels || info->channels == NULL) { > > monitor_printf(mon, "Channels: none\n"); > >diff --git a/qapi-schema.json b/qapi-schema.json > >index 0d11d6e..72c0080 100644 > >--- a/qapi-schema.json > >+++ b/qapi-schema.json > >@@ -654,6 +654,11 @@ > > # 'spice' uses SASL or direct TLS authentication, depending on command > > # line options > > # > >+# @mouse-mode: #optional current server mouse mode if spice server is new > >+# enough and exposes this information. > >+# 'client' if client side > >+# 'server' if server side > >+# > > Please document which version this is being added in and use an enum > instead of a string to describe the mode. > > If it's trouble a boolean, then use a bool instead of an enum. OK. Can't imagine any trouble in using an enum. > > Regards, > > Anthony Liguori