/* * Emulator State Information * * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd. All rights reserved. * * Contact: * SeokYeon Hwang * MunKyu Im * GiWoong Kim * YeongKyoon Lee * HyunJun Son * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Contributors: * - S-Core Co., Ltd * */ #ifndef __EMUL_STATE_H__ #define __EMUL_STATE_H__ #include "emulator_common.h" #include "hw/maru_device_ids.h" #define MAX_ADDR_LEN 256 #define MAX_PORT_LEN 256 #define MAX_HDS_PATH 256 #define MAX_PROFILE 256 #define DEFAULT_STATIC_HDS_ID "fsdef0" enum { RESET = 0, BOOT_COMPLETED = 1, }; /* keep it consistent with emulator-skin definition */ enum { HARD_KEY_HOME = 139, HARD_KEY_POWER = 116, HARD_KEY_VOL_UP = 115, HARD_KEY_VOL_DOWN = 114, }; /* keep it consistent with emulator-skin definition */ enum { MOUSE_DOWN = 1, MOUSE_UP = 2, MOUSE_DRAG = 3, MOUSE_WHEELUP = 4, MOUSE_WHEELDOWN = 5, MOUSE_MOVE = 6, MOUSE_DOUBLECLICK = 7, PS2_DOWN = 8, PS2_UP = 9, }; /* keep it consistent with emulator-skin definition */ enum { KEY_PRESSED = 1, KEY_RELEASED = 2, }; enum { HOST_CAPSLOCK_KEY = 1, HOST_NUMLOCK_KEY = 2, }; typedef struct EmulatorConfigInfo { const char *skin_path; const char *file_sharing_path; /* add here */ } EmulatorConfigInfo; typedef struct EmulatorConfigState { int emulator_condition; int emuld_condition; int multitouch_enable; /* add here */ char emulator_profile[MAX_PROFILE]; bool emuld_connection; bool sdb_connection; } EmulatorConfigState; /* setter */ void set_emulator_condition(int state); void set_emul_tap_enable(bool enable); void set_emuld_connection(bool connected); void set_sdb_connection(bool connected); /* getter */ const char* get_emul_skin_path(void); bool get_emul_cpu_accel(void); int get_emulator_condition(void); bool get_emuld_connection(void); bool get_sdb_connection(void); int get_max_touch_point(void); /* multi-touch */ void set_multi_touch_enable(int mode); int get_multi_touch_enable(void); // cleaned-up extern const char *launch_conf_file; extern const char *bin_path; extern int initial_resolution_width; extern int initial_resolution_height; extern int vm_base_port; char const *get_bin_path(void); char const *get_log_redirect_file(void); char const *get_kernel_log_redirect_file(void); const char *get_drive_image_file(void); const char *get_drive_image_ver(void); const char *get_swap_image_file(void); const char *get_kernel_file(void); const char *get_http_proxy_addr(void); const char *get_vm_name(void); const char *get_profile_name(void); const char *get_vm_data_path(void); const char *get_sdcard_image_path(void); const char* get_host_directory_sharing_path(void); bool is_gpu_accel_enabled(void); bool is_pci_device_enabled(int device_id); bool is_mouse_enabled(void); bool is_touchscreen_enabled(void); bool is_netclient_tap_attached(void); uint64_t get_ram_size(void); int get_vm_base_port(void); int get_vm_device_serial_number(void); int get_vm_spice_port(void); void set_guest_ip(const char *ip); void set_host_ip(const char *ip); const char* get_guest_ip(void); const char* get_host_ip(void); void set_initial_display_resolution(int width, int height); int get_display_resolution_width(void); int get_display_resolution_height(void); void init_emul_state(void); #endif /* __EMUL_STATE_H__ */