1777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Copyright (C) 2010 The Android Open Source Project 2777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** 3777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** This software is licensed under the terms of the GNU General Public 4777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** License version 2, as published by the Free Software Foundation, and 5777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** may be copied, distributed, and modified under those terms. 6777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** 7777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** This program is distributed in the hope that it will be useful, 8777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** but WITHOUT ANY WARRANTY; without even the implied warranty of 9777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine** GNU General Public License for more details. 11777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine*/ 12777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 13777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#ifndef _ANDROID_PROTOCOL_UI_COMMANDS_IMPL_H 14777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#define _ANDROID_PROTOCOL_UI_COMMANDS_IMPL_H 15777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 16777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#include "sockets.h" 17b6c168bbb6477145e843bb4a2e56e72e6d47822dDavid 'Digit' Turner#include "android/looper.h" 18777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#include "android/protocol/ui-commands.h" 19777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 20777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* 21777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * Contains the UI-side implementation of the "core-ui-control" service that is 22777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * part of the UI control protocol. Here we handle UI control commands sent by 23777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * the Core to the UI. 24777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine */ 25777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 26777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Creates and initializes descriptor for the UI-side of the "core-ui-control" 27777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * service. Note that there can be only one instance of this service in the UI. 28777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * Param: 29777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * console_socket - Addresses Core's console. 30777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * Return: 31777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * 0 on success, or < 0 on failure. 32777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine */ 33b6c168bbb6477145e843bb4a2e56e72e6d47822dDavid 'Digit' Turnerextern int uiCmdImpl_create(SockAddress* console_socket, Looper* looper); 34777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 3585276806ec6ac969d7befa2496c1de59adaaac74Vladimir Chtchetkine/* Destroys UI-side of the "core-ui-control" service. */ 3685276806ec6ac969d7befa2496c1de59adaaac74Vladimir Chtchetkineextern void uiCmdImpl_destroy(); 3785276806ec6ac969d7befa2496c1de59adaaac74Vladimir Chtchetkine 38777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#endif /* _ANDROID_PROTOCOL_UI_COMMANDS_IMPL_H */ 39