blob: c4dd2e050b1eff21cce6bcbfacac53cfc7187367 [file] [log] [blame]
Vladimir Chtchetkine94a2fba2011-01-31 10:49:06 -08001/* Copyright (C) 2010 The Android Open Source Project
2**
3** This software is licensed under the terms of the GNU General Public
4** License version 2, as published by the Free Software Foundation, and
5** may be copied, distributed, and modified under those terms.
6**
7** This program is distributed in the hope that it will be useful,
8** but WITHOUT ANY WARRANTY; without even the implied warranty of
9** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10** GNU General Public License for more details.
11*/
12
13/*
14 * Contains UI-side "framebuffer" client that receives framebuffer updates
15 * from the Core.
16 */
17
18#ifndef _ANDROID_FRAMEBUFFER_UI_H
19#define _ANDROID_FRAMEBUFFER_UI_H
20
21#include "console.h"
David 'Digit' Turnere3fdd072011-02-02 14:43:23 +010022#include "android/framebuffer.h"
Vladimir Chtchetkine94a2fba2011-01-31 10:49:06 -080023#include "android/looper.h"
24#include "android/async-utils.h"
Vladimir Chtchetkine94a2fba2011-01-31 10:49:06 -080025
26/* Creates framebuffer client, and connects it with the core.
27 * Param:
28 * console_socket Address of the core's console socket.
29 * protocol Protocol to use for the updates:
30 * -raw Stream pixels over socket
31 * -shared Use shared memory for pixels.
32 * fb - Framebuffer associated with this FB client.
33 * Return:
34 * 0 on success, or < 0 on failure.
35 */
36int implFb_create(SockAddress* console_socket,
37 const char* protocol,
38 QFrameBuffer* fb);
39
40/* Disconnects and destroys framebuffer client. */
41void implFb_destroy(void);
42
43#endif /* _ANDROID_FRAMEBUFFER_UI_H */