aboutsummaryrefslogtreecommitdiffstats
path: root/android/protocol/fb-updates-impl.h
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2011-01-31 10:49:06 -0800
committerVladimir Chtchetkine <vchtchetkine@google.com>2011-01-31 10:49:06 -0800
commit94a2fba98924c6684650d66409934358cb0c9d09 (patch)
tree61438a0563eb274091cf81fe6136a35973495e8f /android/protocol/fb-updates-impl.h
parentf988ac730fecefbd7590d3a8068c9e80fc53e026 (diff)
downloadexternal_qemu-94a2fba98924c6684650d66409934358cb0c9d09.zip
external_qemu-94a2fba98924c6684650d66409934358cb0c9d09.tar.gz
external_qemu-94a2fba98924c6684650d66409934358cb0c9d09.tar.bz2
Refactor the framebuffer service
Change-Id: I8ac4580af65b8d58976c97b77b309dd202e75003
Diffstat (limited to 'android/protocol/fb-updates-impl.h')
-rw-r--r--android/protocol/fb-updates-impl.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/android/protocol/fb-updates-impl.h b/android/protocol/fb-updates-impl.h
new file mode 100644
index 0000000..0c351aa
--- /dev/null
+++ b/android/protocol/fb-updates-impl.h
@@ -0,0 +1,44 @@
+/* Copyright (C) 2010 The Android Open Source Project
+**
+** This software is licensed under the terms of the GNU General Public
+** License version 2, as published by the Free Software Foundation, and
+** may be copied, distributed, and modified under those terms.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+*/
+
+/*
+ * Contains UI-side "framebuffer" client that receives framebuffer updates
+ * from the Core.
+ */
+
+#ifndef _ANDROID_FRAMEBUFFER_UI_H
+#define _ANDROID_FRAMEBUFFER_UI_H
+
+#include "console.h"
+#include "framebuffer.h"
+#include "android/looper.h"
+#include "android/async-utils.h"
+#include "android/core-connection.h"
+
+/* Creates framebuffer client, and connects it with the core.
+ * Param:
+ * console_socket Address of the core's console socket.
+ * protocol Protocol to use for the updates:
+ * -raw Stream pixels over socket
+ * -shared Use shared memory for pixels.
+ * fb - Framebuffer associated with this FB client.
+ * Return:
+ * 0 on success, or < 0 on failure.
+ */
+int implFb_create(SockAddress* console_socket,
+ const char* protocol,
+ QFrameBuffer* fb);
+
+/* Disconnects and destroys framebuffer client. */
+void implFb_destroy(void);
+
+#endif /* _ANDROID_FRAMEBUFFER_UI_H */