qemu-ga: move channel/transport functionality into wrapper class

This is mostly in preparation for the win32 port, which won't use
GIO channels for reasons that will be made clearer later. Here the
GAChannel class is just a loose wrapper around GIOChannel
calls/callbacks, but we also roll in the logic/configuration for
various channel types and managing unix socket connections, which makes
the abstraction much more complete and further aids in the win32 port
since isa-serial/unix-listen will not be supported initially.

There's also a bit of refactoring in the main logic to consolidate the
exit paths so we can do common cleanup for things like pid files, which
weren't always cleaned up previously.
This commit is contained in:
Michael Roth 2012-01-19 00:18:20 -06:00
parent 54383726dd
commit 125b310e1d
5 changed files with 355 additions and 233 deletions

View file

@ -14,7 +14,7 @@
#include "qemu-common.h"
#define QGA_VERSION "1.0"
#define QGA_READ_COUNT_DEFAULT 4 << 10
#define QGA_READ_COUNT_DEFAULT 4096
typedef struct GAState GAState;
typedef struct GACommandState GACommandState;