blob: 0c351aa824ae1d7379eb02fc8f0d2e15af21cc07 [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"
22#include "framebuffer.h"
23#include "android/looper.h"
24#include "android/async-utils.h"
25#include "android/core-connection.h"
26
27/* Creates framebuffer client, and connects it with the core.
28 * Param:
29 * console_socket Address of the core's console socket.
30 * protocol Protocol to use for the updates:
31 * -raw Stream pixels over socket
32 * -shared Use shared memory for pixels.
33 * fb - Framebuffer associated with this FB client.
34 * Return:
35 * 0 on success, or < 0 on failure.
36 */
37int implFb_create(SockAddress* console_socket,
38 const char* protocol,
39 QFrameBuffer* fb);
40
41/* Disconnects and destroys framebuffer client. */
42void implFb_destroy(void);
43
44#endif /* _ANDROID_FRAMEBUFFER_UI_H */