Vladimir Chtchetkine | 94a2fba | 2011-01-31 10:49:06 -0800 | [diff] [blame] | 1 | /* 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' Turner | b6c168b | 2011-02-02 21:39:10 +0100 | [diff] [blame] | 21 | #include "android/looper.h" |
David 'Digit' Turner | e3fdd07 | 2011-02-02 14:43:23 +0100 | [diff] [blame] | 22 | #include "android/framebuffer.h" |
Vladimir Chtchetkine | 94a2fba | 2011-01-31 10:49:06 -0800 | [diff] [blame] | 23 | #include "android/looper.h" |
| 24 | #include "android/async-utils.h" |
Vladimir Chtchetkine | 94a2fba | 2011-01-31 10:49:06 -0800 | [diff] [blame] | 25 | |
| 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' Turner | 21cbdd2 | 2011-02-02 22:57:35 +0100 | [diff] [blame] | 36 | int fbUpdatesImpl_create(SockAddress* console_socket, |
| 37 | const char* protocol, |
| 38 | QFrameBuffer* fb, |
| 39 | Looper* looper); |
Vladimir Chtchetkine | 94a2fba | 2011-01-31 10:49:06 -0800 | [diff] [blame] | 40 | |
| 41 | /* Disconnects and destroys framebuffer client. */ |
David 'Digit' Turner | 21cbdd2 | 2011-02-02 22:57:35 +0100 | [diff] [blame] | 42 | void fbUpdatesImpl_destroy(void); |
Vladimir Chtchetkine | 94a2fba | 2011-01-31 10:49:06 -0800 | [diff] [blame] | 43 | |
| 44 | #endif /* _ANDROID_FRAMEBUFFER_UI_H */ |