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_CORE_COMMANDS_H 14777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#define _ANDROID_PROTOCOL_CORE_COMMANDS_H 15777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 16777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* 17777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * Contains declarations related to the UI control commands sent by the UI and 18777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * handled by the Core. 19777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine */ 20777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 21777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#include "android/hw-sensors.h" 22777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#include "android/protocol/ui-common.h" 23777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 24777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Sets coarse orientation. */ 25777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#define AUICMD_SET_COARSE_ORIENTATION 1 26777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 27777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Toggles the network. */ 28777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#define AUICMD_TOGGLE_NETWORK 2 29777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 30777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Starts / stops the tracing. */ 31777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#define AUICMD_TRACE_CONTROL 3 32777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 33777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Checks if network is disabled. */ 34777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#define AUICMD_CHK_NETWORK_DISABLED 4 35777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 36777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Gets network speed. */ 37777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#define AUICMD_GET_NETSPEED 5 38777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 39777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Gets network delays */ 40777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#define AUICMD_GET_NETDELAY 6 41777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 42777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Gets path to a QEMU file on local host. */ 43777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#define AUICMD_GET_QEMU_PATH 7 44777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 45777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Gets LCD density. */ 46777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#define AUICMD_GET_LCD_DENSITY 8 47777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 48777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Formats AUICMD_SET_COARSE_ORIENTATION UI control command parameters. */ 49777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkinetypedef struct UICmdSetCoarseOrientation { 50777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine AndroidCoarseOrientation orient; 51777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine} UICmdSetCoarseOrientation; 52777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 53777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Formats AUICMD_TRACE_CONTROL UI control command parameters. */ 54777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkinetypedef struct UICmdTraceControl { 55777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine int start; 56777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine} UICmdTraceControl; 57777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 58777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Formats AUICMD_GET_NETSPEED UI control command parameters. */ 59777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkinetypedef struct UICmdGetNetSpeed { 60777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine int index; 61777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine} UICmdGetNetSpeed; 62777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 63777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Formats AUICMD_GET_NETSPEED UI control command response. 64777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * Instances of this structure contains content of the NetworkSpeed structure, 65777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * including actual "name" and "display" strings. */ 66777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkinetypedef struct UICmdGetNetSpeedResp { 67777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine int upload; 68777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine int download; 69777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine /* Zero-terminated NetworkSpeed's "name" strings starts here. The "display" 70777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * string begins inside this structure, right after the "name"'s 71777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * zero-terminator. */ 72777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine char name[0]; 73777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine} UICmdGetNetSpeedResp; 74777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 75777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Formats AUICMD_GET_NETDELAY UI control command parameters. */ 76777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkinetypedef struct UICmdGetNetDelay { 77777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine int index; 78777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine} UICmdGetNetDelay; 79777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 80777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Formats AUICMD_GET_NETDELAY UI control command response. 81777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * Instances of this structure contains content of the NetworkLatency structure, 82777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * including actual "name" and "display" strings. */ 83777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkinetypedef struct UICmdGetNetDelayResp { 84777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine int min_ms; 85777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine int max_ms; 86777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine /* Zero-terminated NetworkLatency's "name" strings starts here. The "display" 87777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * string begins inside this structure, right after the "name"'s 88777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine * zero-terminator. */ 89777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine char name[0]; 90777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine} UICmdGetNetDelayResp; 91777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 92777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Formats AUICMD_GET_QEMU_PATH UI control command parameters. */ 93777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkinetypedef struct UICmdGetQemuPath { 94777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine int type; 95777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine char filename[0]; 96777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine} UICmdGetQemuPath; 97777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 98777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine/* Formats AUICMD_GET_QEMU_PATH UI control command response. */ 99777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkinetypedef struct UICmdGetQemuPathResp { 100777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine /* Queried qemu path begins here. */ 101777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine char path[0]; 102777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine} UICmdGetQemuPathResp; 103777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine 104777eb68eb60cac18f4b62e2e1b14a906875cbe7aVladimir Chtchetkine#endif /* _ANDROID_PROTOCOL_CORE_COMMANDS_H */ 105