diff mbox

[7/7] qapi: promote input-send-event to stable

Message ID 1452601779-5790-7-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Jan. 12, 2016, 12:29 p.m. UTC
With all fixups being in place now, we can promote input-send-event
to stable abi by removing the x- prefix.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 qapi-schema.json | 12 +++---------
 qmp-commands.hx  | 14 +++++++-------
 ui/input.c       |  6 +++---
 3 files changed, 13 insertions(+), 19 deletions(-)

Comments

Daniel P. Berrangé Jan. 12, 2016, 12:53 p.m. UTC | #1
On Tue, Jan 12, 2016 at 01:29:39PM +0100, Gerd Hoffmann wrote:
> With all fixups being in place now, we can promote input-send-event
> to stable abi by removing the x- prefix.
> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  qapi-schema.json | 12 +++---------
>  qmp-commands.hx  | 14 +++++++-------
>  ui/input.c       |  6 +++---
>  3 files changed, 13 insertions(+), 19 deletions(-)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 35ef71c..a0b6963 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -3738,7 +3738,7 @@
>                'abs'     : 'InputMoveEvent' } }
>  
>  ##
> -# @x-input-send-event
> +# @input-send-event
>  #
>  # Send input event(s) to guest.
>  #
> @@ -3759,16 +3759,10 @@
>  # specified, both input devices with and without input routing config
>  # are admissible, but devices with input routing config take
>  # precedence.
> -
> -# Since: 2.2
> -#
> -# Note: this command is experimental, and not a stable API.  Things that
> -# might change before it becomes stable include the spelling of enum
> -# values for InputButton and InputAxis, and the notion of how to designate
> -# which console will receive the event.
>  #
> +# Since: experimental 2.2, stable 2.6

Couldn't it just be 'Since: 2.6' ? The experimental tag refers to
the old x- prefixed comamnd which no longer exists, so I don't think
we need to admit existence of the old command after this point.

>  ##
> -{ 'command': 'x-input-send-event',
> +{ 'command': 'input-send-event',
>    'data': { '*device': 'str',
>              '*head'  : 'int',
>              'events' : [ 'InputEvent' ] } }



Regards,
Daniel
Gerd Hoffmann Jan. 12, 2016, 1:04 p.m. UTC | #2
> > +# Since: experimental 2.2, stable 2.6
> 
> Couldn't it just be 'Since: 2.6' ? The experimental tag refers to
> the old x- prefixed comamnd which no longer exists, so I don't think
> we need to admit existence of the old command after this point.

Sounds good to me, but will wait for our qapi masters to comment ;)

cheers,
  Gerd
Markus Armbruster Jan. 15, 2016, 4:58 p.m. UTC | #3
Gerd Hoffmann <kraxel@redhat.com> writes:

>> > +# Since: experimental 2.2, stable 2.6
>> 
>> Couldn't it just be 'Since: 2.6' ? The experimental tag refers to
>> the old x- prefixed comamnd which no longer exists, so I don't think
>> we need to admit existence of the old command after this point.
>
> Sounds good to me, but will wait for our qapi masters to comment ;)

I agree with Dan.

Series is basically fine.
diff mbox

Patch

diff --git a/qapi-schema.json b/qapi-schema.json
index 35ef71c..a0b6963 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3738,7 +3738,7 @@ 
               'abs'     : 'InputMoveEvent' } }
 
 ##
-# @x-input-send-event
+# @input-send-event
 #
 # Send input event(s) to guest.
 #
@@ -3759,16 +3759,10 @@ 
 # specified, both input devices with and without input routing config
 # are admissible, but devices with input routing config take
 # precedence.
-
-# Since: 2.2
-#
-# Note: this command is experimental, and not a stable API.  Things that
-# might change before it becomes stable include the spelling of enum
-# values for InputButton and InputAxis, and the notion of how to designate
-# which console will receive the event.
 #
+# Since: experimental 2.2, stable 2.6
 ##
-{ 'command': 'x-input-send-event',
+{ 'command': 'input-send-event',
   'data': { '*device': 'str',
             '*head'  : 'int',
             'events' : [ 'InputEvent' ] } }
diff --git a/qmp-commands.hx b/qmp-commands.hx
index b9154b5..e02d2f2 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -4601,13 +4601,13 @@  Example:
 EQMP
 
     {
-        .name       = "x-input-send-event",
+        .name       = "input-send-event",
         .args_type  = "console:i?,events:q",
-        .mhandler.cmd_new = qmp_marshal_x_input_send_event,
+        .mhandler.cmd_new = qmp_marshal_input_send_event,
     },
 
 SQMP
-@x-input-send-event
+@input-send-event
 -----------------
 
 Send input event to guest.
@@ -4628,13 +4628,13 @@  Example (1):
 
 Press left mouse button.
 
--> { "execute": "x-input-send-event",
+-> { "execute": "input-send-event",
     "arguments": { "device": "video0",
                    "events": [ { "type": "btn",
                    "data" : { "down": true, "button": "left" } } ] } }
 <- { "return": {} }
 
--> { "execute": "x-input-send-event",
+-> { "execute": "input-send-event",
     "arguments": { "device": "video0",
                    "events": [ { "type": "btn",
                    "data" : { "down": false, "button": "left" } } ] } }
@@ -4644,7 +4644,7 @@  Example (2):
 
 Press ctrl-alt-del.
 
--> { "execute": "x-input-send-event",
+-> { "execute": "input-send-event",
      "arguments": { "events": [
         { "type": "key", "data" : { "down": true,
           "key": {"type": "qcode", "data": "ctrl" } } },
@@ -4658,7 +4658,7 @@  Example (3):
 
 Move mouse pointer to absolute coordinates (20000, 400).
 
--> { "execute": "x-input-send-event" ,
+-> { "execute": "input-send-event" ,
   "arguments": { "events": [
                { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
                { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
diff --git a/ui/input.c b/ui/input.c
index 755b90a..c630c46 100644
--- a/ui/input.c
+++ b/ui/input.c
@@ -118,9 +118,9 @@  qemu_input_find_handler(uint32_t mask, QemuConsole *con)
     return NULL;
 }
 
-void qmp_x_input_send_event(bool has_device, const char *device,
-                            bool has_head, int64_t head,
-                            InputEventList *events, Error **errp)
+void qmp_input_send_event(bool has_device, const char *device,
+                          bool has_head, int64_t head,
+                          InputEventList *events, Error **errp)
 {
     InputEventList *e;
     QemuConsole *con;