2 * Emulator State Information
4 * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
7 * SeokYeon Hwang <syeon.hwang@samsung.com>
8 * MunKyu Im <munkyu.im@samsung.com>
9 * GiWoong Kim <giwoong.kim@samsung.com>
10 * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33 #ifndef __EMUL_STATE_H__
34 #define __EMUL_STATE_H__
36 #include "emulator_common.h"
37 #include "hw/maru_device_ids.h"
39 #define MAX_ADDR_LEN 256
40 #define MAX_PORT_LEN 256
42 #define MAX_HDS_PATH 256
43 #define MAX_PROFILE 256
45 #define DEFAULT_STATIC_HDS_ID "fsdef0"
52 /* keep it consistent with emulator-skin definition */
56 HARD_KEY_VOL_UP = 115,
57 HARD_KEY_VOL_DOWN = 114,
60 /* keep it consistent with emulator-skin definition */
68 MOUSE_DOUBLECLICK = 7,
73 /* keep it consistent with emulator-skin definition */
80 HOST_CAPSLOCK_KEY = 1,
84 typedef struct EmulatorConfigInfo {
85 const char *skin_path;
86 const char *file_sharing_path;
90 typedef struct EmulatorConfigState {
91 int emulator_condition;
93 int multitouch_enable;
95 char emulator_profile[MAX_PROFILE];
96 bool emuld_connection;
98 } EmulatorConfigState;
101 void set_emulator_condition(int state);
102 void set_emul_tap_enable(bool enable);
103 void set_emuld_connection(bool connected);
104 void set_sdb_connection(bool connected);
105 void set_emul_guest_home_path(char *home_path);
108 const char* get_emul_skin_path(void);
109 const char* get_emul_guest_home_path(void);
110 bool get_emul_cpu_accel(void);
112 int get_emulator_condition(void);
113 bool get_emuld_connection(void);
114 bool get_sdb_connection(void);
115 int get_max_touch_point(void);
118 extern const char *launch_conf_file;
119 extern const char *bin_path;
120 extern int initial_resolution_width;
121 extern int initial_resolution_height;
122 extern int vm_base_port;
124 char const *get_bin_path(void);
125 char const *get_log_redirect_file(void);
126 char const *get_kernel_log_redirect_file(void);
127 const char *get_drive_image_file(void);
128 const char *get_drive_image_ver(void);
129 const char *get_swap_image_file(void);
130 const char *get_kernel_file(void);
131 const char *get_https_proxy_addr(void);
132 const char *get_vm_name(void);
133 const char *get_profile_name(void);
134 const char *get_platform_version(void);
135 const char *get_vm_data_path(void);
136 const char *get_sdcard_image_path(void);
137 const char* get_host_directory_sharing_path(void);
139 bool is_gpu_accel_enabled(void);
140 bool is_pci_device_enabled(int device_id);
141 bool is_mouse_enabled(void);
142 bool is_touchscreen_enabled(void);
143 bool is_netclient_tap_attached(void);
145 uint64_t get_ram_size(void);
147 int get_vm_base_port(void);
148 int get_vm_device_serial_number(void);
149 int get_vm_spice_port(void);
151 void set_guest_ip(const char *ip);
152 void set_host_ip(const char *ip);
153 const char* get_guest_ip(void);
154 const char* get_host_ip(void);
156 void set_initial_display_resolution(int width, int height);
157 int get_display_resolution_width(void);
158 int get_display_resolution_height(void);
160 const char* get_platform_default_home(void);
161 void set_platform_default_home(const char *path);
163 void init_emul_state(void);
164 #endif /* __EMUL_STATE_H__ */