blob: 188a3c15e44fef5b72815cfec30a346c2a4fe3e1 [file] [log] [blame]
Vladimir Chtchetkinee95660a2010-12-20 08:28:03 -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 "android/looper.h"
23#include "android/async-utils.h"
24#include "android/core-connection.h"
25
26/* Descriptor for the framebuffer client. */
27typedef struct ClientFramebuffer ClientFramebuffer;
28
29/*
30 * Creates framebuffer client, and connects it with the core.
31 * Param:
32 * console_socket Address of the core's console socket.
33 * protocol Protocol to use for the updates:
34 * -raw Stream pixels over socket
35 * -shared Use shared memory for pixels.
36 * Return:
37 * Descriptor for the framebuffer client on success, or NULL on failure.
38 */
39ClientFramebuffer* clientfb_create(SockAddress* console_socket,
40 const char* protocol);
41
42/*
43 * Disconnects and destroys framebuffer client.
44 * Param:
45 * client_fb Framebuffer client descriptor created with clientfb_create.
46 */
47void clientfb_destroy(ClientFramebuffer* client_fb);
48
49#endif /* _ANDROID_FRAMEBUFFER_UI_H */