From: Ian Campbell Subject: Re: [PATCH V4] libxl, Introduce a QMP client Date: Tue, 21 Jun 2011 14:33:48 +0100 Message-ID: <1308663228.6920.31.camel@zakaz.uk.xensource.com> References: <1308324754-19159-1-git-send-email-anthony.perard@citrix.com> <19967.24103.640384.969388@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <19967.24103.640384.969388@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: Anthony Perard , Xen Devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Mon, 2011-06-20 at 15:50 +0100, Ian Jackson wrote: > > > +static struct { > > + const char *name; > > + message_type_e type; > > +} member_name_to_message_type[] = { > > + { "QMP", QMP_QMP }, > > + { "return", QMP_RETURN }, > > + { "error", QMP_ERROR }, > > + { "event", QMP_EVENT }, > > + { "", QMP_ANY }, > > +}; > > If we do need to define these, we should use a libxl idl enum (with > Ian Campbell's string-mapping-generation patch which I will apply > shortly. Just to note that this is enum is only used internally, using the IDL as is would make it public... It'd be relatively easy to allow for internal types in the IDL but I'm not sure if we want to? I think if we did I'd be tempted to add a separate libxl_internal.idl generating (using the same generator) _libxl_types_internal.[ch] etc. Ian.