TRACE("command:%s\n", command);
if (strcmp(command, "2\n" ) == 0) {
notify_sdb_daemon_start();
- } else if (strcmp(command, "3\n" ) == 0) {
- notify_sensor_daemon_start();
- notify_ecs_server_start();
- }
-#if 0
- else if (strcmp(command, "4\n") == 0) {
- handle_sdcard(readbuf);
- }
-#endif
- else if (strcmp(command, "5\n") == 0) {
+ } else if (strcmp(command, "5\n") == 0) {
register_sdb_server(readbuf, client_addr);
} else if (strcmp(command, "6\n") == 0) {
wakeup_guest();
return;
}
- if (!communicator.isSensorDaemonStarted()) {
- /* roll back a selection */
- item.setSelection(false);
-
- for (MenuItem m : rotationList) {
- short rotationId = (Short) m.getData();
- if (currentState.getCurrentRotationId() == rotationId) {
- m.setSelection(true);
- break;
- }
- }
-
- SkinUtil.openMessage(shell, null,
- "Rotation is not ready.\n"
- + "Please wait until the emulator is completely boot up.",
- SWT.ICON_WARNING, config);
- return;
- }
-
final short rotationId = ((Short) item.getData());
shell.getDisplay().syncExec(new Runnable() {
public void widgetSelected(SelectionEvent e) {
logger.info("Control Panel menu is selected");
- if (communicator.isSdbDaemonStarted() == false) {
-// || communicator.isEcsServerStarted() == false) {
- logger.warning("Control Panel is not ready.");
-
- SkinUtil.openMessage(shell,null,
- "Control Panel is not ready.\n"
- + "Please wait until the emulator is completely boot up.",
- SWT.ICON_WARNING, config);
- return;
- }
-
String ecpPath = SkinUtil.getEcpPath();
File ecpFile = new File(ecpPath);
public final static short RECV_HOST_KBD_STATE = 8;
public final static short RECV_MULTI_TOUCH_STATE = 9;
- public final static short RECV_SENSORD_STARTED = 800;
public final static short RECV_SDBD_STARTED = 801;
- public final static short RECV_ECS_STARTED = 802;
public final static short RECV_DRAW_FRAME = 900;
public final static short RECV_DRAW_BLANK_GUIDE = 901;
public final static short RECV_EMUL_RESET = 998;
private long sleep;
private long maxWaitTime;
private Timer timer;
-
+
private DataTranfer() {
/* do nothing */
}
private AtomicInteger heartbeatCount;
private boolean isTerminated;
- private boolean isSensorDaemonStarted;
private boolean isSdbDaemonStarted;
- private boolean isEcsServerStarted;
private boolean isRamdump;
private TimerTask heartbeatExecutor;
private Timer heartbeatTimer;
break;
}
- case RECV_SENSORD_STARTED: {
- logger.info("received SENSORD_STARTED from QEMU");
-
- synchronized (this) {
- isSensorDaemonStarted = true;
- }
- break;
- }
case RECV_SDBD_STARTED: {
logger.info("received SDBD_STARTED from QEMU");
}
break;
}
- case RECV_ECS_STARTED: {
- logger.info("received ECS_STARTED from QEMU");
-
- synchronized (this) {
- isEcsServerStarted = true;
- }
- break;
- }
case RECV_DRAW_FRAME: {
//logger.info("received DRAW_FRAME from QEMU.");
logger.info("received EMUL_RESET from QEMU");
synchronized (this) {
- isSensorDaemonStarted = false;
isSdbDaemonStarted = false;
- isEcsServerStarted = false;
}
// TODO:
}
}
}
-
+
private void sendToQEMUInternal(SkinSendData sendData) {
if (null == sendData) {
return;
receivedData = dataTranfer.receivedData;
dataTranfer.receivedData = null;
-
+
return receivedData;
}
}
-
+
public Socket getSocket() {
return socket;
}
- public synchronized boolean isSensorDaemonStarted() {
- return isSensorDaemonStarted;
- }
-
public synchronized boolean isSdbDaemonStarted() {
return isSdbDaemonStarted;
}
- public synchronized boolean isEcsServerStarted() {
- return isEcsServerStarted;
- }
-
public synchronized void setRamdumpFlag(boolean flag) {
isRamdump = flag;
}
SEND_HOST_KBD_STATE = 8,
SEND_MULTI_TOUCH_STATE = 9,
- SEND_SENSORD_STARTED = 800,
SEND_SDBD_STARTED = 801,
- SEND_ECS_STARTED = 802,
SEND_DRAW_FRAME = 900,
SEND_DRAW_BLANK_GUIDE = 901,
SEND_EMUL_RESET = 998,
static int server_sock = 0;
static int client_sock = 0;
static int stop_server = 0;
-static int is_sensord_initialized = 0;
static int is_sdbd_initialized = 0;
-static int is_ecs_initialized = 0;
static int ready_server = 0;
static int ignore_heartbeat = 0;
static int is_force_close_client = 0;
}
}
-void notify_ecs_server_start(void)
-{
- INFO("notify_ecs_server_start\n");
-
- is_ecs_initialized = 1;
- if (client_sock) {
- if (0 > send_skin_header_only(
- client_sock, SEND_ECS_STARTED, 1)) {
-
- ERR("fail to send SEND_ECS_STARTED to skin\n");
- }
- } else {
- INFO("skin client socket is not connected yet\n");
- }
-}
-
void notify_sdb_daemon_start(void)
{
INFO("notify_sdb_daemon_start\n");
}
}
-void notify_sensor_daemon_start(void)
-{
- INFO("notify_sensor_daemon_start\n");
-
- is_sensord_initialized = 1;
- if (client_sock) {
- if (0 > send_skin_header_only(
- client_sock, SEND_SENSORD_STARTED, 1)) {
-
- ERR("fail to send SEND_SENSORD_STARTED to skin\n");
- }
- } else {
- INFO("skin client socket is not connected yet\n");
- }
-}
-
void notify_ramdump_completed(void)
{
INFO("ramdump completed!\n");
maru_display_resize();
/* after display resizing */
- if (is_rotate == true && is_sensord_initialized == 1) {
+ if (is_rotate == true) {
do_rotation_event(rotation_type);
}
void notify_draw_frame(void);
void notify_draw_blank_guide(void);
-void notify_ecs_server_start(void);
void notify_sdb_daemon_start(void);
-void notify_sensor_daemon_start(void);
void notify_ramdump_completed(void);
void notify_booting_progress(unsigned int layer, int progress_value);
void notify_brightness_state(bool on);