#endif
#define LOG_TAG "ISF_REMOTE_CONTROL"
+#define MESSAGE_DELIMETER "\t"
+
using namespace scim;
static bool focus_flag;
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 ());
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 ());
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 ());