android_qemud: add wrappers for qemud: framing over pipes
The Android QEMUD protocol dates back from the early days of the
project. It adds a simple header that declares a frame size to messages
coming in over the pipe. Pipe services should you the
qemud_pipe_read/write_buffers functions to convert from the
over-the-wire format and a bunch of NULL terminated strings kept in a
GPtrArray. The will also need to identify the service with a "qemud:"
prefix in the service name.
Additionally a GString is maintained for tracking partial messages as
the available buffers may not be big enough for the whole message at
once. The buffer size is determined by the amount the client
reads/writes at a time.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
3 files changed