From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J27p4-00055z-2d for qemu-devel@nongnu.org; Tue, 11 Dec 2007 11:19:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J27p3-00055c-Gm for qemu-devel@nongnu.org; Tue, 11 Dec 2007 11:19:05 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J27p3-00055Z-B3 for qemu-devel@nongnu.org; Tue, 11 Dec 2007 11:19:05 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J27p2-00065k-Gp for qemu-devel@nongnu.org; Tue, 11 Dec 2007 11:19:04 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [RFC] QEMU Dbus support - a proposal management API Date: Tue, 11 Dec 2007 16:18:57 +0000 References: <475EAE8F.4020209@codemonkey.ws> <475EB3FC.1010106@qumranet.com> In-Reply-To: <475EB3FC.1010106@qumranet.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712111618.58860.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org > > Why can't we make the monitor interface a "formal" interface? > > Because then fixing a type or extending the interface becomes a pain. > > It's also much more difficult to specify a text-base interface > completey, compared to a C api (where sometimes all you need is the > header and a few comments). I disagree. It's entirely possible to fully specify a text protocol, and it's just as easy to extend it in a backwards compatible way. A C API is about the most fixed interface you could possible use. A C API also requires that both sides of the interface be part of the same process on the same machine. A text protocol is trivial to implement over pretty much any transport you can think of. IMHO we have two options: - Integrate a GUI into qemu. This will be the only supported GUI. As different people want very different things this is unlikely to ever happen. - Implement some sort of remote control protocol. Maybe based on the existing monitor comands, but definitely using based on a simple serial data link. This allows third party frontends to control qemu without having to integrate them into qemu itself. If you want to implement a C library to implement the text protocol, then you can do so. If it's any good then maybe other people will also use it. However I bet a C API isn't going to be particularly pleasant, and people are going to want to talk to qemu from e.g. python and C++ without having to mess about going via your C API. Paul