From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35374 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OHjNH-0006s8-Nu for qemu-devel@nongnu.org; Thu, 27 May 2010 16:08:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OHjND-0007um-HC for qemu-devel@nongnu.org; Thu, 27 May 2010 16:08:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29333) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OHjND-0007uc-9c for qemu-devel@nongnu.org; Thu, 27 May 2010 16:08:11 -0400 Date: Thu, 27 May 2010 17:08:03 -0300 From: Luiz Capitulino Message-ID: <20100527170803.6477625d@redhat.com> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v3 10/17] QMP: Reserve namespace for complex object classes List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Anthony Liguori , Juan Quintela , Markus@gnu.org, qemu-devel@nongnu.org, Armbruster , Blue Swirl , Avi Kivity , Jan Kiszka On Sun, 23 May 2010 12:59:23 +0200 Jan Kiszka wrote: > From: Jan Kiszka > > This reserves JSON objects that contain the key '__class__' for QMP-specific > complex objects. First user will be the buffer class. > > Signed-off-by: Jan Kiszka > --- > QMP/qmp-spec.txt | 16 +++++++++++++--- > 1 files changed, 13 insertions(+), 3 deletions(-) > > diff --git a/QMP/qmp-spec.txt b/QMP/qmp-spec.txt > index 9d30a8c..fa1dd62 100644 > --- a/QMP/qmp-spec.txt > +++ b/QMP/qmp-spec.txt > @@ -146,6 +146,15 @@ The format is: > For a listing of supported asynchronous events, please, refer to the > qmp-events.txt file. > > +2.6 Complex object classes > +-------------------------- > + > +JSON objects that contain the key-value pair '"__class__": json-string' are I'm not strong about this, but it's better to call it just a 'pair', as 'value' is a bit problematic because of json-value. > +reserved for QMP-specific complex object classes that. QMP specifies which Early full stop? > +further keys each of these objects include and how they are encoded. > + > +So far, no complex object class is specified. > + > 3. QMP Examples > =============== > > @@ -229,9 +238,10 @@ avoid modifying QMP. Both upstream and downstream need to take care to > preserve long-term compatibility and interoperability. > > To help with that, QMP reserves JSON object member names beginning with > -'__' (double underscore) for downstream use ("downstream names"). This > -means upstream will never use any downstream names for its commands, > -arguments, errors, asynchronous events, and so forth. > +'__' (double underscore) for downstream use ("downstream names"). Downstream > +names MUST NOT end with '__' as this pattern is reserved for QMP-defined JSON > +object classes. Upstream will never use any downstream names for its > +commands, arguments, errors, asynchronous events, and so forth. Suggest mentioning subsection 2.6. > > Any new names downstream wishes to add must begin with '__'. To > ensure compatibility with other downstreams, it is strongly