blob: 56d48600b406de1c6e6bdde4eedc7fcc997f2085 [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
David 'Digit' Turnerb6c168b2011-02-02 21:39:10 +010021#include "android/looper.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 */
David 'Digit' Turner21cbdd22011-02-02 22:57:35 +010036int fbUpdatesImpl_create(SockAddress* console_socket,
37 const char* protocol,
38 QFrameBuffer* fb,
39 Looper* looper);
Vladimir Chtchetkine94a2fba2011-01-31 10:49:06 -080040
41/* Disconnects and destroys framebuffer client. */
David 'Digit' Turner21cbdd22011-02-02 22:57:35 +010042void fbUpdatesImpl_destroy(void);
Vladimir Chtchetkine94a2fba2011-01-31 10:49:06 -080043
44#endif /* _ANDROID_FRAMEBUFFER_UI_H */