Fix the bug that delimiter character is not entered in Remote Input 84/254984/4
authorInHong Han <inhong1.han@samsung.com>
Thu, 11 Mar 2021 06:17:03 +0000 (15:17 +0900)
committerInHong Han <inhong1.han@samsung.com>
Thu, 11 Mar 2021 09:01:26 +0000 (18:01 +0900)
Change-Id: I07c32f9ae3abb21e92cc9d717cf0c3eb97d5f5ef

ism/extras/efl_panel/websocketserver.h
ism/src/isf_remote_control.cpp

index d579ad1..9300cc7 100644 (file)
@@ -203,7 +203,7 @@ class CISEMessageSerializer
 {
 protected:
     /* FIXME : Temporary solution for distinguish commands and values */
-    static const char MESSAGE_DELIMETER = '|';
+    static const char MESSAGE_DELIMETER = '\t';
 
 public:
     static std::string serialize(ISE_MESSAGE message) {
index 57b3d20..948e8ac 100644 (file)
@@ -14,6 +14,8 @@
 #endif
 #define LOG_TAG             "ISF_REMOTE_CONTROL"
 
+#define MESSAGE_DELIMETER "\t"
+
 using namespace scim;
 
 static bool focus_flag;
@@ -470,7 +472,8 @@ EXAPI int remote_control_send_key_event(remote_control_client *client, remote_co
 
     char key_str[12] = {};
     snprintf(key_str, sizeof(key_str), "%d", key);
-    String command = String ("|plain|send_key_event|") + String (key_str) + String ("|");
+    String command = String (MESSAGE_DELIMETER) + String ("plain") + String (MESSAGE_DELIMETER) +
+                    String ("send_key_event") + String (MESSAGE_DELIMETER) + String (key_str) + String (MESSAGE_DELIMETER);
 
     if (focus_flag) {
         error_e = (remote_control_error_e)client->remote_client->send_remote_input_message(command.c_str ());
@@ -498,7 +501,8 @@ EXAPI int remote_control_send_commit_string(remote_control_client *client, const
         return error_e;
     }
 
-    String command = String ("|plain|commit_string|") + String (text) + String ("|");
+    String command = String (MESSAGE_DELIMETER) + String ("plain") + String (MESSAGE_DELIMETER) +
+                    String ("commit_string") + String (MESSAGE_DELIMETER) + String (text) + String (MESSAGE_DELIMETER);
 
     if (focus_flag) {
         error_e = (remote_control_error_e)client->remote_client->send_remote_input_message(command.c_str ());
@@ -528,7 +532,8 @@ EXAPI int remote_control_update_preedit_string(remote_control_client *client, co
 
     char cursor_position[10] = {};
     snprintf(cursor_position, sizeof(cursor_position), "%d", cursor_pos);
-    String command = String ("|plain|update_preedit_string|") + String (text) + String ("|") + String (cursor_position) + String ("|");
+    String command = String (MESSAGE_DELIMETER) + String ("plain") + String (MESSAGE_DELIMETER) +String ("update_preedit_string") +
+                    String (MESSAGE_DELIMETER) + String (text) + String (MESSAGE_DELIMETER) + String (cursor_position) + String (MESSAGE_DELIMETER);
 
     if (focus_flag) {
         error_e = (remote_control_error_e)client->remote_client->send_remote_input_message(command.c_str ());