communication: modified event message names 47/11847/1
authorGiWoong Kim <giwoong.kim@samsung.com>
Tue, 5 Nov 2013 09:25:28 +0000 (18:25 +0900)
committerGiWoong Kim <giwoong.kim@samsung.com>
Tue, 5 Nov 2013 10:23:26 +0000 (19:23 +0900)
There is little difference of event message name between
Qemu(c - msruskin_server.c) and Skin(java - ICommunicator.java).
To improve the readability of the our source code, I change
the some message and function names.

Change-Id: I457a35cd4713696990ea229e1f41d5a13ac00c2b
Signed-off-by: GiWoong Kim <giwoong.kim@samsung.com>
15 files changed:
tizen/src/ecs/ecs_msg.c
tizen/src/hw/maru_brightness.c
tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorShmSkin.java
tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java
tizen/src/skin/client/src/org/tizen/emulator/skin/comm/ICommunicator.java
tizen/src/skin/client/src/org/tizen/emulator/skin/comm/sock/SocketCommunicator.java
tizen/src/skin/client/src/org/tizen/emulator/skin/custom/GeneralKeyWindow.java
tizen/src/skin/client/src/org/tizen/emulator/skin/custom/SpecialKeyWindow.java
tizen/src/skin/client/src/org/tizen/emulator/skin/dialog/DetailInfoDialog.java
tizen/src/skin/client/src/org/tizen/emulator/skin/layout/ProfileSpecificSkinComposer.java
tizen/src/skin/client/src/org/tizen/emulator/skin/screenshot/SdlScreenShotWindow.java
tizen/src/skin/maruskin_operation.c
tizen/src/skin/maruskin_operation.h
tizen/src/skin/maruskin_server.c
tizen/src/skin/maruskin_server.h

index 4dbd3c4..0472143 100644 (file)
@@ -290,7 +290,7 @@ bool msgproc_device_req(ECS_Client* ccli, ECS__DeviceReq* msg)
             if (!strncmp(data, "1", 1)) {
                 is_on = 1;
             }
-            onoff_host_kbd(is_on);
+            do_host_kbd_enable(is_on);
         }
     } else if (!strncmp(cmd, MSG_TYPE_NFC, 3)) {
         if (group == MSG_GROUP_STATUS) {
index c875172..5a8b25e 100644 (file)
@@ -178,9 +178,9 @@ static void brightness_exitfn(PCIDevice *dev)
 static void maru_brightness_bh(void *opaque)
 {
     if (brightness_off == 0) {
-        notify_brightness(true);
+        notify_brightness_state(true);
     } else {
-        notify_brightness(false);
+        notify_brightness_state(false);
     }
 }
 
index fbd35f3..41a4f6c 100644 (file)
@@ -189,7 +189,7 @@ public class EmulatorShmSkin extends EmulatorSkin {
                        //logger.info("getPixels native function returned " + result);
 
                        communicator.sendToQEMU(
-                                       SendCommand.RESPONSE_DRAW_FRAMEBUFFER, null, true);
+                                       SendCommand.RESPONSE_DRAW_FRAME, null, true);
 
                        dataFramebuffer.setPixels(0, 0,
                                        sizeFramebuffer, arrayFramebuffer, 0);
@@ -527,7 +527,7 @@ public class EmulatorShmSkin extends EmulatorSkin {
                KeyEventData keyEventData = new KeyEventData(
                                KeyEventType.RELEASED.value(), keyCode, stateMask, keyLocation);
                communicator.sendToQEMU(
-                               SendCommand.SEND_KEY_EVENT, keyEventData, false);
+                               SendCommand.SEND_KEYBOARD_KEY_EVENT, keyEventData, false);
 
                removePressedKeyFromList(keyEventData);
        }
@@ -575,7 +575,7 @@ public class EmulatorShmSkin extends EmulatorSkin {
                KeyEventData keyEventData = new KeyEventData(
                                KeyEventType.PRESSED.value(), keyCode, stateMask, keyLocation);
                communicator.sendToQEMU(
-                               SendCommand.SEND_KEY_EVENT, keyEventData, false);
+                               SendCommand.SEND_KEYBOARD_KEY_EVENT, keyEventData, false);
 
                addPressedKeyToList(keyEventData);
        }
index 50316c2..83b173d 100755 (executable)
@@ -465,7 +465,7 @@ public class EmulatorSkin {
                                        event.doit = false;
 
                                        if (null != communicator) {
-                                               communicator.sendToQEMU(SendCommand.CLOSE, null, false);
+                                               communicator.sendToQEMU(SendCommand.SEND_CLOSE_REQ, null, false);
                                        }
                                }
                        }
@@ -544,7 +544,7 @@ public class EmulatorSkin {
                                DisplayStateData lcdStateData = new DisplayStateData(
                                                currentState.getCurrentScale(),
                                                currentState.getCurrentRotationId());
-                               communicator.sendToQEMU(SendCommand.CHANGE_LCD_STATE,
+                               communicator.sendToQEMU(SendCommand.SEND_DISPLAY_STATE,
                                                lcdStateData, false);
                        }
                };
@@ -923,7 +923,7 @@ public class EmulatorSkin {
                                                                        KeyEventType.RELEASED.value(),
                                                                        disappearKeycode, disappearStateMask,
                                                                        disappearKeyLocation);
-                                                       communicator.sendToQEMU(SendCommand.SEND_KEY_EVENT,
+                                                       communicator.sendToQEMU(SendCommand.SEND_KEYBOARD_KEY_EVENT,
                                                                        keyEventData, false);
 
                                                        removePressedKeyFromList(keyEventData);
@@ -973,7 +973,7 @@ public class EmulatorSkin {
                                                }
 
                                                if (keyEventData != null) {
-                                                       communicator.sendToQEMU(SendCommand.SEND_KEY_EVENT,
+                                                       communicator.sendToQEMU(SendCommand.SEND_KEYBOARD_KEY_EVENT,
                                                                        keyEventData, false);
                                                        removePressedKeyFromList(keyEventData);
                                                }
@@ -1042,7 +1042,7 @@ public class EmulatorSkin {
                                                                                previousKeyCode, previousStateMask,
                                                                                previous.keyLocation);
                                                                communicator.sendToQEMU(
-                                                                               SendCommand.SEND_KEY_EVENT,
+                                                                               SendCommand.SEND_KEYBOARD_KEY_EVENT,
                                                                                keyEventData, false);
 
                                                                removePressedKeyFromList(keyEventData);
@@ -1127,8 +1127,8 @@ public class EmulatorSkin {
                        int keyLocation) {
                KeyEventData keyEventData = new KeyEventData(
                                KeyEventType.RELEASED.value(), keyCode, stateMask, keyLocation);
-               communicator
-                               .sendToQEMU(SendCommand.SEND_KEY_EVENT, keyEventData, false);
+               communicator.sendToQEMU(
+                               SendCommand.SEND_KEYBOARD_KEY_EVENT, keyEventData, false);
 
                removePressedKeyFromList(keyEventData);
        }
@@ -1137,8 +1137,8 @@ public class EmulatorSkin {
                        int keyLocation) {
                KeyEventData keyEventData = new KeyEventData(
                                KeyEventType.PRESSED.value(), keyCode, stateMask, keyLocation);
-               communicator
-                               .sendToQEMU(SendCommand.SEND_KEY_EVENT, keyEventData, false);
+               communicator.sendToQEMU(
+                               SendCommand.SEND_KEYBOARD_KEY_EVENT, keyEventData, false);
 
                addPressedKeyToList(keyEventData);
        }
@@ -1418,7 +1418,7 @@ public class EmulatorSkin {
 
                                DisplayStateData lcdStateData = new DisplayStateData(
                                                currentState.getCurrentScale(), rotationId);
-                               communicator.sendToQEMU(SendCommand.CHANGE_LCD_STATE,
+                               communicator.sendToQEMU(SendCommand.SEND_DISPLAY_STATE,
                                                lcdStateData, false);
                        }
                };
@@ -1485,7 +1485,7 @@ public class EmulatorSkin {
 
                                DisplayStateData lcdStateData = new DisplayStateData(scale,
                                                currentState.getCurrentRotationId());
-                               communicator.sendToQEMU(SendCommand.CHANGE_LCD_STATE,
+                               communicator.sendToQEMU(SendCommand.SEND_DISPLAY_STATE,
                                                lcdStateData, false);
 
                        }
@@ -1573,7 +1573,7 @@ public class EmulatorSkin {
                                logger.info("Ram dump menu is selected");
 
                                communicator.setRamdumpFlag(true);
-                               communicator.sendToQEMU(SendCommand.RAM_DUMP, null, false);
+                               communicator.sendToQEMU(SendCommand.SEND_RAM_DUMP, null, false);
 
                                RamdumpDialog ramdumpDialog;
                                try {
@@ -1623,9 +1623,8 @@ public class EmulatorSkin {
                                        isOnKbd = on;
                                        logger.info("Host Keyboard " + isOnKbd);
 
-                                       communicator
-                                                       .sendToQEMU(SendCommand.HOST_KBD, new BooleanData(
-                                                                       on, SendCommand.HOST_KBD.toString()), false);
+                                       communicator.sendToQEMU(SendCommand.SEND_HOST_KBD_STATE,
+                                                       new BooleanData(on, SendCommand.SEND_HOST_KBD_STATE.toString()), false);
                                }
                        }
                };
@@ -1737,7 +1736,7 @@ public class EmulatorSkin {
                                                        SWT.ICON_ERROR, config);
                                }
 
-                               communicator.sendToQEMU(SendCommand.OPEN_SHELL, null, false);
+                               communicator.sendToQEMU(SendCommand.SEND_OPEN_SHELL, null, false);
                        }
                };
 
@@ -1778,7 +1777,7 @@ public class EmulatorSkin {
                                // TODO: thread
                                /* get ECS port from Qemu */
                                DataTranfer dataTranfer = communicator.sendDataToQEMU(
-                                               SendCommand.ECP_PORT_REQ, null, true);
+                                               SendCommand.SEND_ECP_PORT_REQ, null, true);
                                byte[] receivedData = communicator.getReceivedData(dataTranfer);
 
                                if (null != receivedData) {
@@ -1843,7 +1842,7 @@ public class EmulatorSkin {
                        public void widgetSelected(SelectionEvent e) {
                                logger.info("Close Menu is selected");
 
-                               communicator.sendToQEMU(SendCommand.CLOSE, null, false);
+                               communicator.sendToQEMU(SendCommand.SEND_CLOSE_REQ, null, false);
                        }
                };
 
@@ -1886,7 +1885,7 @@ public class EmulatorSkin {
                                KeyEventData keyEventData = new KeyEventData(
                                                KeyEventType.RELEASED.value(), data.keycode,
                                                data.stateMask, data.keyLocation);
-                               communicator.sendToQEMU(SendCommand.SEND_KEY_EVENT,
+                               communicator.sendToQEMU(SendCommand.SEND_KEYBOARD_KEY_EVENT,
                                                keyEventData, false);
 
                                logger.info("auto release : keycode=" + keyEventData.keycode
index e051dd9..9b96120 100644 (file)
@@ -37,7 +37,6 @@ import org.tizen.emulator.skin.dbi.RotationNameType;
  *
  */
 public interface ICommunicator extends Runnable {
-
        public enum Scale {
                SCALE_25(25),
                SCALE_50(50),
@@ -54,7 +53,7 @@ public interface ICommunicator extends Runnable {
                        return this.value;
                }
        }
-       
+
        public enum MouseButtonType {
                LEFT( (short)1 ),
                WHEEL( (short)2 ),
@@ -133,7 +132,7 @@ public interface ICommunicator extends Runnable {
        public enum KeyEventType {
                PRESSED( (short)1 ),
                RELEASED( (short)2 );
-               
+
                private short value;
                KeyEventType( short value ) {
                        this.value = value;
@@ -166,16 +165,15 @@ public interface ICommunicator extends Runnable {
        }
 
        public enum RotationInfo {
-
                PORTRAIT( RotationNameType.PORTRAIT.value(), (short)0, 0 ),
                LANDSCAPE( RotationNameType.LANDSCAPE.value(), (short)1, -90 ),
                REVERSE_PORTRAIT( RotationNameType.REVERSE_PORTRAIT.value(), (short)2, 180 ),
                REVERSE_LANDSCAPE( RotationNameType.REVERSE_LANDSCAPE.value(), (short)3, 90 );
-               
+
                private String value;
                private short id;
                private int angle;
-               
+
                RotationInfo( String value, short id, int ratio ) {
                        this.value = value;
                        this.id = id;
@@ -193,7 +191,7 @@ public interface ICommunicator extends Runnable {
                public short id() {
                        return this.id;
                }
-               
+
                public static RotationInfo getValue(short id) {
                        RotationInfo[] values = RotationInfo.values();
                        for (int i = 0; i < values.length; i++) {
@@ -209,26 +207,27 @@ public interface ICommunicator extends Runnable {
        public enum SendCommand {
                /* This values must match the QEMU definitions */
 
-               SEND_START((short) 1),
+               SEND_SKIN_OPENED((short) 1),
 
                SEND_MOUSE_EVENT((short) 10),
-               SEND_KEY_EVENT((short) 11),
-               SEND_HARD_KEY_EVENT((short) 12),
-               CHANGE_LCD_STATE((short) 13),
-               OPEN_SHELL((short) 14),
-               HOST_KBD((short) 15),
-               SCREEN_SHOT((short) 16),
-               DETAIL_INFO((short) 17),
-               RAM_DUMP((short) 18),
-               GUEST_DUMP((short) 19),
-               ECP_PORT_REQ((short) 20),
-               
+               SEND_KEYBOARD_KEY_EVENT((short) 11),
+               SEND_HW_KEY_EVENT((short) 12),
+               SEND_DISPLAY_STATE((short) 13),
+               SEND_OPEN_SHELL((short) 14),
+               SEND_HOST_KBD_STATE((short) 15),
+               SEND_SCREENSHOT_REQ((short) 16),
+               SEND_DETAIL_INFO_REQ((short) 17),
+               SEND_RAM_DUMP((short) 18),
+               SEND_GUEST_DUMP((short) 19),
+               SEND_ECP_PORT_REQ((short) 20),
+
                RESPONSE_HEART_BEAT((short) 900),
-               RESPONSE_DRAW_FRAMEBUFFER((short) 901),
-               CLOSE((short) 998),
+               RESPONSE_DRAW_FRAME((short) 901),
+               SEND_CLOSE_REQ((short) 998),
                RESPONSE_SHUTDOWN((short) 999);
 
                private short value;
+
                SendCommand(short value) {
                        this.value = value;
                }
@@ -261,19 +260,20 @@ public interface ICommunicator extends Runnable {
        public enum ReceiveCommand {
                /* This values must match the QEMU definitions */
 
-               HEART_BEAT((short) 1),
-               SCREEN_SHOT_DATA((short) 2),
-               DETAIL_INFO_DATA((short) 3),
-               RAMDUMP_COMPLETE((short) 4),
-               BOOTING_PROGRESS((short) 5),
-               BRIGHTNESS_VALUE((short) 6),
-               ECP_PORT((short) 7),
-               SENSOR_DAEMON_START((short) 800),
-               SDB_DAEMON_START((short) 801),
-               ECS_SERVER_START((short) 802),
-               DRAW_FRAME((short) 900),
-               DRAW_BLANK_GUIDE((short) 901),
-               SHUTDOWN((short) 999);
+               RECV_HEART_BEAT((short) 1),
+               RECV_SCREENSHOT_DATA((short) 2),
+               RECV_DETAIL_INFO_DATA((short) 3),
+               RECV_RAMDUMP_COMPLETED((short) 4),
+               RECV_BOOTING_PROGRESS((short) 5),
+               RECV_BRIGHTNESS_STATE((short) 6),
+               RECV_ECP_PORT_DATA((short) 7),
+
+               RECV_SENSORD_STARTED((short) 800),
+               RECV_SDBD_STARTED((short) 801),
+               RECV_ECS_STARTED((short) 802),
+               RECV_DRAW_FRAME((short) 900),
+               RECV_DRAW_BLANK_GUIDE((short) 901),
+               RECV_SHUTDOWN((short) 999);
 
                private short value;
 
index 1b51411..0c9e212 100755 (executable)
@@ -122,7 +122,7 @@ public class SocketCommunicator implements ICommunicator {
        private DataTranfer progressDataTransfer;
        private DataTranfer brightnessDataTransfer;
        private DataTranfer ecpTransfer;
-       
+
        private Thread sendThread;
        private LinkedList<SkinSendData> sendQueue;
 
@@ -251,7 +251,7 @@ public class SocketCommunicator implements ICommunicator {
                                width, height, scale, rotation, isBlankGuide);
                logger.info("" + startData);
 
-               sendToQEMU(SendCommand.SEND_START, startData, false);
+               sendToQEMU(SendCommand.SEND_SKIN_OPENED, startData, false);
 
                boolean ignoreHeartbeat =
                                config.getArgBoolean(ArgsConstants.HEART_BEAT_IGNORE);
@@ -299,34 +299,34 @@ public class SocketCommunicator implements ICommunicator {
                                }
 
                                switch (command) {
-                               case HEART_BEAT: {
+                               case RECV_HEART_BEAT: {
                                        resetHeartbeatCount();
 
                                        if (logger.isLoggable(Level.FINE)) {
-                                               logger.fine("received HEAR_BEAT from QEMU.");
+                                               logger.fine("received HEART_BEAT from QEMU");
                                        }
 
                                        sendToQEMU(SendCommand.RESPONSE_HEART_BEAT, null, true);
                                        break;
                                }
-                               case SCREEN_SHOT_DATA: {
-                                       logger.info("received SCREEN_SHOT_DATA from QEMU.");
+                               case RECV_SCREENSHOT_DATA: {
+                                       logger.info("received SCREENSHOT_DATA from QEMU");
                                        receiveData(screenShotDataTransfer, length );
 
                                        break;
                                }
-                               case DETAIL_INFO_DATA: {
-                                       logger.info("received DETAIL_INFO_DATA from QEMU.");
+                               case RECV_DETAIL_INFO_DATA: {
+                                       logger.info("received DETAIL_INFO_DATA from QEMU");
                                        receiveData( detailInfoTransfer, length);
 
                                        break;
                                }
-                               case RAMDUMP_COMPLETE: {
-                                       logger.info("received RAMDUMP_COMPLETE from QEMU.");
+                               case RECV_RAMDUMP_COMPLETED: {
+                                       logger.info("received RAMDUMP_COMPLETED from QEMU");
                                        setRamdumpFlag(false);
                                        break;
                                }
-                               case BOOTING_PROGRESS: {
+                               case RECV_BOOTING_PROGRESS: {
                                        //logger.info("received BOOTING_PROGRESS from QEMU.");
 
                                        resetDataTransfer(progressDataTransfer);
@@ -352,8 +352,8 @@ public class SocketCommunicator implements ICommunicator {
 
                                        break;
                                }
-                               case BRIGHTNESS_VALUE: {
-                                       //logger.info("received BRIGHTNESS_VALUE from QEMU.");
+                               case RECV_BRIGHTNESS_STATE: {
+                                       //logger.info("received BRIGHTNESS_STATE from QEMU");
 
                                        resetDataTransfer(brightnessDataTransfer);
                                        receiveData(brightnessDataTransfer, length);
@@ -378,44 +378,44 @@ public class SocketCommunicator implements ICommunicator {
 
                                        break;
                                }
-                               case ECP_PORT: {
-                                       logger.info("received ECP_PORT from QEMU.");
+                               case RECV_ECP_PORT_DATA: {
+                                       logger.info("received ECP_PORT_DATA from QEMU");
                                        receiveData(ecpTransfer, length);
-                                       
+
                                        break;
                                }
-                               case SENSOR_DAEMON_START: {
-                                       logger.info("received SENSOR_DAEMON_START from QEMU.");
+                               case RECV_SENSORD_STARTED: {
+                                       logger.info("received SENSORD_STARTED from QEMU");
 
                                        synchronized (this) {
                                                isSensorDaemonStarted = true;
                                        }
                                        break;
                                }
-                               case SDB_DAEMON_START: {
-                                       logger.info("received SDB_DAEMON_START from QEMU.");
+                               case RECV_SDBD_STARTED: {
+                                       logger.info("received SDBD_STARTED from QEMU");
 
                                        synchronized (this) {
                                                isSdbDaemonStarted = true;
                                        }
                                        break;
                                }
-                               case ECS_SERVER_START: {
-                                       logger.info("received ECS_SERVER_START from QEMU.");
+                               case RECV_ECS_STARTED: {
+                                       logger.info("received ECS_STARTED from QEMU");
 
                                        synchronized (this) {
                                                isEcsServerStarted = true;
                                        }
                                        break;
                                }
-                               case DRAW_FRAME: {
+                               case RECV_DRAW_FRAME: {
                                        //logger.info("received DRAW_FRAME from QEMU.");
 
                                        skin.updateDisplay();
 
                                        break;
                                }
-                               case DRAW_BLANK_GUIDE: {
+                               case RECV_DRAW_BLANK_GUIDE: {
                                        logger.info("received DRAW_BLANK_GUIDE from QEMU.");
 
                                        Image imageGuide = skin.getImageRegistry().getResourceImage(
@@ -426,8 +426,8 @@ public class SocketCommunicator implements ICommunicator {
 
                                        break;
                                }
-                               case SHUTDOWN: {
-                                       logger.info("received RESPONSE_SHUTDOWN from QEMU.");
+                               case RECV_SHUTDOWN: {
+                                       logger.info("received SHUTDOWN from QEMU");
 
                                        sendToQEMU(SendCommand.RESPONSE_SHUTDOWN, null, false);
                                        terminate();
@@ -539,11 +539,11 @@ public class SocketCommunicator implements ICommunicator {
                DataTranfer dataTranfer = null;
 
                if (useDataTransfer) {
-                       if (SendCommand.SCREEN_SHOT.equals(command)) {
+                       if (SendCommand.SEND_SCREENSHOT_REQ.equals(command)) {
                                dataTranfer = resetDataTransfer(screenShotDataTransfer);
-                       } else if (SendCommand.DETAIL_INFO.equals(command)) {
+                       } else if (SendCommand.SEND_DETAIL_INFO_REQ.equals(command)) {
                                dataTranfer = resetDataTransfer(detailInfoTransfer);
-                       } else if (SendCommand.ECP_PORT_REQ.equals(command)) {
+                       } else if (SendCommand.SEND_ECP_PORT_REQ.equals(command)) {
                                dataTranfer = resetDataTransfer(ecpTransfer);
                        }
                }
index baf44b9..3ee83a8 100644 (file)
@@ -270,7 +270,7 @@ public class GeneralKeyWindow extends SkinWindow {
                                                KeyEventData keyEventData = new KeyEventData(
                                                                KeyEventType.PRESSED.value(), keycode, 0, 0);
                                                skin.communicator.sendToQEMU(
-                                                               SendCommand.SEND_HARD_KEY_EVENT, keyEventData, false);
+                                                               SendCommand.SEND_HW_KEY_EVENT, keyEventData, false);
                                        }
 
                                        @Override
@@ -280,7 +280,7 @@ public class GeneralKeyWindow extends SkinWindow {
                                                KeyEventData keyEventData = new KeyEventData(
                                                                KeyEventType.RELEASED.value(), keycode, 0, 0);
                                                skin.communicator.sendToQEMU(
-                                                               SendCommand.SEND_HARD_KEY_EVENT, keyEventData, false);
+                                                               SendCommand.SEND_HW_KEY_EVENT, keyEventData, false);
                                        }
 
                                        @Override
index 46e545b..48fb3a1 100644 (file)
@@ -405,7 +405,7 @@ public class SpecialKeyWindow extends SkinWindow {
                                                        KeyEventData keyEventData = new KeyEventData(
                                                                        KeyEventType.RELEASED.value(), pressedHWKey.getKeyCode(), 0, 0);
                                                        communicator.sendToQEMU(
-                                                                       SendCommand.SEND_HARD_KEY_EVENT, keyEventData, false);
+                                                                       SendCommand.SEND_HW_KEY_EVENT, keyEventData, false);
                                                }
 
                                                currentPressedHWKey = null;
@@ -447,7 +447,7 @@ public class SpecialKeyWindow extends SkinWindow {
                                                        KeyEventData keyEventData = new KeyEventData(
                                                                        KeyEventType.PRESSED.value(), hwKey.getKeyCode(), 0, 0);
                                                        communicator.sendToQEMU(
-                                                                       SendCommand.SEND_HARD_KEY_EVENT, keyEventData, false);
+                                                                       SendCommand.SEND_HW_KEY_EVENT, keyEventData, false);
                                                }
 
                                                currentPressedHWKey = hwKey;
index e260f60..f57d39d 100644 (file)
@@ -233,7 +233,7 @@ public class DetailInfoDialog extends SkinDialog {
                String infoData = null;
 
                DataTranfer dataTranfer =
-                               communicator.sendDataToQEMU(SendCommand.DETAIL_INFO, null, true);
+                               communicator.sendDataToQEMU(SendCommand.SEND_DETAIL_INFO_REQ, null, true);
                byte[] receivedData = communicator.getReceivedData(dataTranfer);
 
                if (null != receivedData) {
index 2336cc3..1099c64 100644 (file)
@@ -483,7 +483,7 @@ public class ProfileSpecificSkinComposer implements ISkinComposer {
                                                KeyEventData keyEventData = new KeyEventData(
                                                                KeyEventType.RELEASED.value(), pressedHWKey.getKeyCode(), 0, 0);
                                                communicator.sendToQEMU(
-                                                               SendCommand.SEND_HARD_KEY_EVENT, keyEventData, false);
+                                                               SendCommand.SEND_HW_KEY_EVENT, keyEventData, false);
 
                                                currentPressedHWKey = null;
 
@@ -528,7 +528,7 @@ public class ProfileSpecificSkinComposer implements ISkinComposer {
                                                KeyEventData keyEventData = new KeyEventData(
                                                                KeyEventType.PRESSED.value(), hwKey.getKeyCode(), 0, 0);
                                                communicator.sendToQEMU(
-                                                               SendCommand.SEND_HARD_KEY_EVENT, keyEventData, false);
+                                                               SendCommand.SEND_HW_KEY_EVENT, keyEventData, false);
 
                                                currentPressedHWKey = hwKey;
 
index f88a49b..4b049b1 100644 (file)
@@ -61,7 +61,7 @@ public class SdlScreenShotWindow extends ScreenShotDialog {
                logger.info("screenshot capture");
 
                DataTranfer dataTranfer = emulatorSkin.communicator.sendDataToQEMU(
-                               SendCommand.SCREEN_SHOT, null, true);
+                               SendCommand.SEND_SCREENSHOT_REQ, null, true);
                byte[] receivedData =
                                emulatorSkin.communicator.getReceivedData(dataTranfer);
 
index 988648c..7071323 100644 (file)
@@ -169,7 +169,7 @@ void do_mouse_event(int button_type, int event_type,
 
             break;
         default:
-            ERR("undefined mouse event type passed:%d\n", event_type);
+            ERR("undefined mouse event type passed : %d\n", event_type);
             break;
     }
 
@@ -182,11 +182,13 @@ void do_mouse_event(int button_type, int event_type,
 #endif
 }
 
-void do_key_event(int event_type, int keycode, int state_mask, int key_location)
+void do_keyboard_key_event(int event_type,
+    int keycode, int state_mask, int key_location)
 {
     int scancode = -1;
 
-    TRACE("key_event event_type:%d, keycode:%d, state_mask:%d, key_location:%d\n",
+    TRACE("Keyboard Key : event_type=%d, keycode=%d,"
+        "state_mask=%d, key_location=%d\n",
         event_type, keycode, state_mask, key_location);
 
 #ifndef CONFIG_USE_SHM
@@ -279,9 +281,9 @@ void do_key_event(int event_type, int keycode, int state_mask, int key_location)
     }
 }
 
-void do_hardkey_event(int event_type, int keycode)
+void do_hw_key_event(int event_type, int keycode)
 {
-    INFO("do_hardkey_event event_type:%d, keycode:%d\n",
+    INFO("HW Key : event_type=%d, keycode=%d\n",
         event_type, keycode);
 
     if ( is_suspended_state() ) {
@@ -553,9 +555,9 @@ void do_open_shell(void)
     /* do nothing */
 }
 
-void onoff_host_kbd(int on)
+void do_host_kbd_enable(bool on)
 {
-    INFO("host kbd on/off: %d.\n", on);
+    INFO("host kbd enable : %d\n", on);
 
 #if defined(TARGET_ARM)
     mloop_evcmd_usbkbd(on);
@@ -584,7 +586,7 @@ void request_close(void)
     INFO("request_close\n");
 
     /* FIXME: convert to device emulatoion */
-    do_hardkey_event(KEY_PRESSED, HARD_KEY_POWER);
+    do_hw_key_event(KEY_PRESSED, HARD_KEY_POWER);
 
 #ifdef CONFIG_WIN32
         Sleep(CLOSE_POWER_KEY_INTERVAL);
@@ -592,7 +594,7 @@ void request_close(void)
         usleep(CLOSE_POWER_KEY_INTERVAL * 1000);
 #endif
 
-    do_hardkey_event(KEY_RELEASED, HARD_KEY_POWER);
+    do_hw_key_event(KEY_RELEASED, HARD_KEY_POWER);
 }
 
 void shutdown_qemu_gracefully(void)
index 3d03e76..76d0011 100644 (file)
@@ -53,9 +53,9 @@ void start_display(uint64 handle_id,
 
 void do_mouse_event(int button_type, int event_type,
     int origin_x, int origin_y, int x, int y, int z);
-void do_key_event(int event_type,
+void do_keyboard_key_event(int event_type,
     int keycode, int state_mask, int key_location);
-void do_hardkey_event(int event_type, int keycode);
+void do_hw_key_event(int event_type, int keycode);
 void do_scale_event(double scale_factor);
 void do_rotation_event(int rotation_type);
 
@@ -65,7 +65,7 @@ void free_detail_info(DetailInfo *detail_info);
 void free_screenshot_info(QemuSurfaceInfo *);
 
 void do_open_shell(void);
-void onoff_host_kbd(int on);
+void do_host_kbd_enable(bool on);
 void do_ram_dump(void);
 void do_guestmemory_dump(void);
 
index b04d937..2db5538 100644 (file)
@@ -99,21 +99,21 @@ enum {
     /* This values must match the Java definitions
     in Skin process */
 
-    RECV_START = 1,
+    RECV_SKIN_OPENED = 1,
     RECV_MOUSE_EVENT = 10,
-    RECV_KEY_EVENT = 11,
-    RECV_HARD_KEY_EVENT = 12,
-    RECV_CHANGE_LCD_STATE = 13,
+    RECV_KEYBOARD_KEY_EVENT = 11,
+    RECV_HW_KEY_EVENT = 12,
+    RECV_DISPLAY_STATE = 13,
     RECV_OPEN_SHELL = 14,
-    RECV_HOST_KBD = 15,
-    RECV_SCREEN_SHOT = 16,
-    RECV_DETAIL_INFO = 17,
+    RECV_HOST_KBD_STATE = 15,
+    RECV_SCREENSHOT_REQ = 16,
+    RECV_DETAIL_INFO_REQ = 17,
     RECV_RAM_DUMP = 18,
     RECV_GUESTMEMORY_DUMP = 19,
     RECV_ECP_PORT_REQ = 20,
     RECV_RESPONSE_HEART_BEAT = 900,
     RECV_RESPONSE_DRAW_FRAME = 901,
-    RECV_CLOSE = 998,
+    RECV_CLOSE_REQ = 998,
     RECV_RESPONSE_SHUTDOWN = 999,
 };
 
@@ -122,15 +122,16 @@ enum {
     in Skin process */
 
     SEND_HEART_BEAT = 1,
-    SEND_SCREEN_SHOT = 2,
-    SEND_DETAIL_INFO = 3,
-    SEND_RAMDUMP_COMPLETE = 4,
+    SEND_SCREENSHOT_DATA = 2,
+    SEND_DETAIL_INFO_DATA = 3,
+    SEND_RAMDUMP_COMPLETED = 4,
     SEND_BOOTING_PROGRESS = 5,
-    SEND_BRIGHTNESS_VALUE = 6,
-    SEND_ECP_PORT = 7,
-    SEND_SENSOR_DAEMON_START = 800,
-    SEND_SDB_DAEMON_START = 801,
-    SEND_ECS_SERVER_START = 802,
+    SEND_BRIGHTNESS_STATE = 6,
+    SEND_ECP_PORT_DATA = 7,
+    SEND_HOST_KBD_STATE = 8,
+    SEND_SENSORD_STARTED = 800,
+    SEND_SDBD_STARTED = 801,
+    SEND_ECS_STARTED = 802,
     SEND_DRAW_FRAME = 900,
     SEND_DRAW_BLANK_GUIDE = 901,
     SEND_SHUTDOWN = 999,
@@ -289,7 +290,7 @@ void notify_draw_frame(void)
         if (0 > send_skin_header_only(
             client_sock, SEND_DRAW_FRAME, 1)) {
 
-            ERR("fail to send SEND_DRAW_FRAME to skin.\n");
+            ERR("fail to send SEND_DRAW_FRAME to skin\n");
         }
     } else {
         INFO("skin client socket is not connected yet\n");
@@ -304,7 +305,7 @@ void notify_draw_blank_guide(void)
         if (0 > send_skin_header_only(
             client_sock, SEND_DRAW_BLANK_GUIDE, 1)) {
 
-            ERR("fail to send SEND_DRAW_BLANK_GUIDE to skin.\n");
+            ERR("fail to send SEND_DRAW_BLANK_GUIDE to skin\n");
         }
     } else {
         INFO("skin client socket is not connected yet\n");
@@ -318,9 +319,9 @@ void notify_ecs_server_start(void)
     is_ecs_initialized = 1;
     if (client_sock) {
         if (0 > send_skin_header_only(
-            client_sock, SEND_ECS_SERVER_START, 1)) {
+            client_sock, SEND_ECS_STARTED, 1)) {
 
-            ERR("fail to send SEND_ECS_SERVER_START to skin.\n");
+            ERR("fail to send SEND_ECS_STARTED to skin\n");
         }
     } else {
         INFO("skin client socket is not connected yet\n");
@@ -334,9 +335,9 @@ void notify_sdb_daemon_start(void)
     is_sdbd_initialized = 1;
     if (client_sock) {
         if (0 > send_skin_header_only(
-            client_sock, SEND_SDB_DAEMON_START, 1)) {
+            client_sock, SEND_SDBD_STARTED, 1)) {
 
-            ERR("fail to send SEND_SDB_DAEMON_START to skin.\n");
+            ERR("fail to send SEND_SDBD_STARTED to skin\n");
         }
     } else {
         INFO("skin client socket is not connected yet\n");
@@ -350,9 +351,9 @@ void notify_sensor_daemon_start(void)
     is_sensord_initialized = 1;
     if (client_sock) {
         if (0 > send_skin_header_only(
-            client_sock, SEND_SENSOR_DAEMON_START, 1)) {
+            client_sock, SEND_SENSORD_STARTED, 1)) {
 
-            ERR("fail to send SEND_SENSOR_DAEMON_START to skin.\n");
+            ERR("fail to send SEND_SENSORD_STARTED to skin\n");
         }
     } else {
         INFO("skin client socket is not connected yet\n");
@@ -365,9 +366,9 @@ void notify_ramdump_completed(void)
 
     if (client_sock) {
         if (0 > send_skin_header_only(
-            client_sock, SEND_RAMDUMP_COMPLETE, 1)) {
+            client_sock, SEND_RAMDUMP_COMPLETED, 1)) {
 
-            ERR("fail to send SEND_RAMDUMP_COMPLETE to skin.\n");
+            ERR("fail to send SEND_RAMDUMP_COMPLETED to skin\n");
         }
     } else {
         INFO("skin client socket is not connected yet\n");
@@ -390,7 +391,7 @@ void notify_booting_progress(unsigned int layer, int progress_value)
             SEND_BOOTING_PROGRESS,
             (unsigned char *)progress_data, PROGRESS_DATA_LENGTH, 0)) {
 
-            ERR("fail to send SEND_BOOTING_PROGRESS to skin.\n");
+            ERR("fail to send SEND_BOOTING_PROGRESS to skin\n");
         }
 
         SLEEP(1); /* 1ms */
@@ -399,26 +400,25 @@ void notify_booting_progress(unsigned int layer, int progress_value)
     }
 }
 
-void notify_brightness(bool on)
+void notify_brightness_state(bool on)
 {
 #define BRIGHTNESS_DATA_LENGTH 2
     char brightness_data[BRIGHTNESS_DATA_LENGTH] = { 0, };
-    int brightness_value = 1;
 
-    if (on == FALSE) {
-        brightness_value = 0;
+    if (on == false) {
+        snprintf(brightness_data, BRIGHTNESS_DATA_LENGTH, "0");
+    } else {
+        snprintf(brightness_data, BRIGHTNESS_DATA_LENGTH, "1");
     }
 
-    snprintf(brightness_data,
-        BRIGHTNESS_DATA_LENGTH, "%d", brightness_value);
-    TRACE("brightness value = %s\n", brightness_data);
+    TRACE("notify brightness state : %s\n", brightness_data);
 
     if (client_sock) {
         if (0 > send_skin_data(client_sock,
-            SEND_BRIGHTNESS_VALUE,
+            SEND_BRIGHTNESS_STATE,
             (unsigned char *)brightness_data, BRIGHTNESS_DATA_LENGTH, 0)) {
 
-            ERR("fail to send SEND_BRIGHTNESS_VALUE to skin.\n");
+            ERR("fail to send SEND_BRIGHTNESS_STATE to skin\n");
         }
     } else {
         INFO("skin client socket is not connected yet\n");
@@ -761,8 +761,8 @@ static void* run_skin_server(void* args)
                 }
 
                 switch (cmd) {
-                case RECV_START: {
-                    log_cnt += sprintf(log_buf + log_cnt, "RECV_START ==\n");
+                case RECV_SKIN_OPENED: {
+                    log_cnt += sprintf(log_buf + log_cnt, "RECV_SKIN_OPENED ==\n");
                     INFO(log_buf);
 
                     if (0 >= length) {
@@ -859,12 +859,12 @@ static void* run_skin_server(void* args)
                         host_x, host_y, guest_x, guest_y, z);
                     break;
                 }
-                case RECV_KEY_EVENT: {
-                    log_cnt += sprintf( log_buf + log_cnt, "RECV_KEY_EVENT ==\n" );
-                    TRACE( log_buf );
+                case RECV_KEYBOARD_KEY_EVENT: {
+                    log_cnt += sprintf(log_buf + log_cnt, "RECV_KEYBOARD_KEY_EVENT ==\n");
+                    TRACE(log_buf);
 
-                    if ( 0 >= length ) {
-                        ERR( "there is no data looking at 0 length." );
+                    if (0 >= length) {
+                        ERR("there is no data looking at 0 length.");
                         continue;
                     }
 
@@ -875,28 +875,28 @@ static void* run_skin_server(void* args)
                     int key_location = 0;
 
                     char* p = recvbuf;
-                    memcpy( &event_type, p, sizeof( event_type ) );
-                    p += sizeof( event_type );
-                    memcpy( &keycode, p, sizeof( keycode ) );
-                    p += sizeof( keycode );
-                    memcpy( &state_mask, p, sizeof( state_mask ) );
-                    p += sizeof( state_mask );
-                    memcpy( &key_location, p, sizeof( key_location ) );
-
-                    event_type = ntohl( event_type );
-                    keycode = ntohl( keycode );
-                    state_mask = ntohl( state_mask );
-                    key_location = ntohl( key_location );
-
-                    do_key_event(event_type, keycode, state_mask, key_location);
+                    memcpy(&event_type, p, sizeof(event_type));
+                    p += sizeof(event_type);
+                    memcpy(&keycode, p, sizeof(keycode));
+                    p += sizeof(keycode);
+                    memcpy(&state_mask, p, sizeof(state_mask));
+                    p += sizeof(state_mask);
+                    memcpy(&key_location, p, sizeof(key_location));
+
+                    event_type = ntohl(event_type);
+                    keycode = ntohl(keycode);
+                    state_mask = ntohl(state_mask);
+                    key_location = ntohl(key_location);
+
+                    do_keyboard_key_event(event_type, keycode, state_mask, key_location);
                     break;
                 }
-                case RECV_HARD_KEY_EVENT: {
-                    log_cnt += sprintf( log_buf + log_cnt, "RECV_HARD_KEY_EVENT ==\n" );
-                    TRACE( log_buf );
+                case RECV_HW_KEY_EVENT: {
+                    log_cnt += sprintf(log_buf + log_cnt, "RECV_HW_KEY_EVENT ==\n");
+                    TRACE(log_buf);
 
-                    if ( 0 >= length ) {
-                        ERR( "there is no data looking at 0 length." );
+                    if (0 >= length) {
+                        ERR("there is no data looking at 0 length.");
                         continue;
                     }
 
@@ -905,18 +905,18 @@ static void* run_skin_server(void* args)
                     int keycode = 0;
 
                     char* p = recvbuf;
-                    memcpy( &event_type, p, sizeof( event_type ) );
-                    p += sizeof( event_type );
-                    memcpy( &keycode, p, sizeof( keycode ) );
+                    memcpy(&event_type, p, sizeof(event_type));
+                    p += sizeof(event_type);
+                    memcpy(&keycode, p, sizeof(keycode));
 
-                    event_type = ntohl( event_type );
-                    keycode = ntohl( keycode );
+                    event_type = ntohl(event_type);
+                    keycode = ntohl(keycode);
 
-                    do_hardkey_event( event_type, keycode );
+                    do_hw_key_event(event_type, keycode);
                     break;
                 }
-                case RECV_CHANGE_LCD_STATE: {
-                    log_cnt += sprintf(log_buf + log_cnt, "RECV_CHANGE_LCD_STATE ==\n");
+                case RECV_DISPLAY_STATE: {
+                    log_cnt += sprintf(log_buf + log_cnt, "RECV_DISPLAY_STATE ==\n");
                     TRACE(log_buf);
 
                     if (0 >= length) {
@@ -963,33 +963,34 @@ static void* run_skin_server(void* args)
 
                     break;
                 }
-                case RECV_SCREEN_SHOT: {
-                    log_cnt += sprintf( log_buf + log_cnt, "RECV_SCREEN_SHOT ==\n" );
-                    TRACE( log_buf );
+                case RECV_SCREENSHOT_REQ: {
+                    log_cnt += sprintf(log_buf + log_cnt, "RECV_SCREENSHOT_REQ ==\n");
+                    TRACE(log_buf);
 
                     QemuSurfaceInfo* info = get_screenshot_info();
 
-                    if ( info ) {
-                        send_skin_data( client_sock, SEND_SCREEN_SHOT, info->pixel_data, info->pixel_data_length, 1 );
-                        free_screenshot_info( info );
+                    if (info) {
+                        send_skin_data(client_sock, SEND_SCREENSHOT_DATA,
+                            info->pixel_data, info->pixel_data_length, 1);
+                        free_screenshot_info(info);
                     } else {
-                        ERR( "Fail to get screenshot data.\n" );
+                        ERR("Fail to get screen shot data\n");
                     }
 
                     break;
                 }
-                case RECV_DETAIL_INFO: {
-                    log_cnt += sprintf( log_buf + log_cnt, "RECV_DETAIL_INFO ==\n" );
-                    TRACE( log_buf );
+                case RECV_DETAIL_INFO_REQ: {
+                    log_cnt += sprintf(log_buf + log_cnt, "RECV_DETAIL_INFO_REQ ==\n");
+                    TRACE(log_buf);
 
-                    DetailInfo* detail_info = get_detail_info( qmu_argc, qmu_argv );
+                    DetailInfo* detail_info = get_detail_info(qmu_argc, qmu_argv);
 
-                    if ( detail_info ) {
-                        send_skin_data( client_sock, SEND_DETAIL_INFO, (unsigned char*) detail_info->data,
-                            detail_info->data_length, 0 );
-                        free_detail_info( detail_info );
+                    if (detail_info) {
+                        send_skin_data(client_sock, SEND_DETAIL_INFO_DATA,
+                            (unsigned char*) detail_info->data, detail_info->data_length, 0);
+                        free_detail_info(detail_info);
                     } else {
-                        ERR( "Fail to get detail info.\n" );
+                        ERR("Fail to get detail info\n");
                     }
 
                     break;
@@ -1001,21 +1002,21 @@ static void* run_skin_server(void* args)
                     do_ram_dump();
                     break;
                 }
-                               case RECV_ECP_PORT_REQ: {
+                case RECV_ECP_PORT_REQ: {
                     log_cnt += sprintf(log_buf + log_cnt, "RECV_ECP_PORT_REQ ==\n");
                     TRACE(log_buf);
 
-                                       int port = get_ecs_port();
-                       unsigned char port_buf[5];
-                                       memset(port_buf, 0, 5);
-                                       port_buf[0] = (port & 0xFF000000) >> 24;
-                                       port_buf[1] = (port & 0x00FF0000) >> 16;
-                                       port_buf[2] = (port & 0x0000FF00) >> 8;
-                                       port_buf[3] = (port & 0x000000FF);
-
-                    send_skin_data( client_sock, SEND_ECP_PORT, port_buf, 4, 0);
-                                       break;
-                               }
+                    int port = get_ecs_port();
+                    unsigned char port_buf[5];
+                    memset(port_buf, 0, 5);
+                    port_buf[0] = (port & 0xFF000000) >> 24;
+                    port_buf[1] = (port & 0x00FF0000) >> 16;
+                    port_buf[2] = (port & 0x0000FF00) >> 8;
+                    port_buf[3] = (port & 0x000000FF);
+
+                    send_skin_data(client_sock, SEND_ECP_PORT_DATA, port_buf, 4, 0);
+                    break;
+                }
                 case RECV_GUESTMEMORY_DUMP: {
                     log_cnt += sprintf(log_buf + log_cnt, "RECV_GUESTMEMORY_DUMP ==\n");
                     TRACE(log_buf);
@@ -1043,10 +1044,10 @@ static void* run_skin_server(void* args)
                     do_open_shell();
                     break;
                 }
-                case RECV_HOST_KBD: {
+                case RECV_HOST_KBD_STATE: {
                     char on = 0;
 
-                    log_cnt += sprintf(log_buf + log_cnt, "RECV_HOST_KBD ==\n");
+                    log_cnt += sprintf(log_buf + log_cnt, "RECV_HOST_KBD_STATE ==\n");
                     TRACE(log_buf);
 
                     if (length <= 0) {
@@ -1055,7 +1056,12 @@ static void* run_skin_server(void* args)
                     }
 
                     memcpy(&on, recvbuf, sizeof(on));
-                    onoff_host_kbd(on);
+
+                    if (on == 0) {
+                        do_host_kbd_enable(false);
+                    } else {
+                        do_host_kbd_enable(true);
+                    }
                     break;
                 }
                 case RECV_RESPONSE_DRAW_FRAME: {
@@ -1069,7 +1075,7 @@ static void* run_skin_server(void* args)
 #endif
                     break;
                 }
-                case RECV_CLOSE: {
+                case RECV_CLOSE_REQ: {
                     log_cnt += sprintf(log_buf + log_cnt, "RECV_CLOSE ==\n");
                     TRACE(log_buf);
 
@@ -1263,7 +1269,7 @@ static int send_skin_data(int sockfd,
 
     pthread_mutex_unlock(&mutex_send_data);
 
-    TRACE("send_n result:%d\n", send_cnt);
+    TRACE("send_n result : %d\n", send_cnt);
 
     return send_cnt;
 }
@@ -1322,7 +1328,7 @@ static void* do_heart_beat(void* args)
         pthread_mutex_unlock(&mutex_recv_heartbeat_count);
 
         if (HEART_BEAT_EXPIRE_COUNT < recv_heartbeat_count) {
-            ERR("received heartbeat count is expired.\n");
+            ERR("received heart beat count is expired\n");
 
             shutdown = 1;
             break;
@@ -1330,7 +1336,7 @@ static void* do_heart_beat(void* args)
     }
 
     if (shutdown != 0) {
-        INFO("[HB] shutdown skin_server by heartbeat thread.\n");
+        INFO("[HB] shutdown skin_server by heart beat thread\n");
 
         is_force_close_client = 1;
 
@@ -1369,7 +1375,7 @@ static int start_heart_beat(void)
         return 1;
     } else {
         if (0 != pthread_create(&thread_id_heartbeat, NULL, do_heart_beat, NULL)) {
-            ERR("[HB] fail to create heartbean pthread.\n");
+            ERR("[HB] fail to create heart beat thread\n");
             return 0;
         } else {
             return 1;
index c1cea11..1b1743a 100644 (file)
 #ifndef MARUSKIN_SERVER_H_
 #define MARUSKIN_SERVER_H_
 
-#include <stdbool.h>
-
 int start_skin_server(int argc, char** argv, int qemu_argc, char** qemu_argv);
 void shutdown_skin_server(void);
 
 void notify_draw_frame(void);
 void notify_draw_blank_guide(void);
-void notify_sensor_daemon_start(void);
-void notify_sdb_daemon_start(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(bool on);
+void notify_brightness_state(bool on);
 
 int is_ready_skin_server(void);
 int get_skin_server_port(void);