scim
1.4.9
|
Transaction command types used by Socket Frontend/IMEngine/Config, Helper and Panel. More...
Transaction command types used by Socket Frontend/IMEngine/Config, Helper and Panel.
This commands are used in communication protocols of SocketFrontEnd, SocketIMEngine, SocketConfig, Helper and Panel.
There are mainly four major protocols used in the communications among each part of SCIM:
As soon as the socket to the server is established, the client must call function scim_socket_open_connection() to create the connection and get the magic key for later communication.
At the same time, the server must call function scim_socket_accept_connection() to accept the connection and get the same magic key for later client verification.
The valid types of servers are:
The valid types of clients are:
Then the client and the server can communicate with each other via the socket by sending transactions.
Multiple commands and their data may be put into one transaction with a restricted order. The data of a command must be put into the transaction just follow the command itself.
A transaction sent from a socket client to a socket server (eg. SocketIMEngine to SocketFrontEnd) must be started with a SCIM_TRANS_CMD_REQUEST command followed by an uint32 magic key of the client (returned by scim_socket_open_connection() function.
A transaction sent back to a socket client from a socket server must be started with a SCIM_TRANS_CMD_REPLY command.
So for example, the layout of a transaction sent from SocketIMEngine to SocketFrontEnd may look like:
Some commands may be used in more than one protocols for similar purpose, but they may have different data in different protocol.
Brief introduction of communication protocols used in SCIM:
Please refer to the descriptions of each Transaction commands for details.
const int scim::SCIM_TRANS_CMD_UNKNOWN = 0 |
Unknown command. No use.
const int scim::SCIM_TRANS_CMD_REQUEST = 1 |
It's the first command which should be put into the Transaction sending from a socket client to a socket server.
The corresponding data for this command is an uint32 magic key which is returned by scim_socket_open_connection() function.
const int scim::SCIM_TRANS_CMD_REPLY = 2 |
It's the first command which should be put into the Transaction sending from a socket server to a socket client.
The corresponding data for this command is different in each protocol. Please refer to the previous protocol notes for details.
const int scim::SCIM_TRANS_CMD_OK = 3 |
This command is usually used in the Transaction sending from a socket server to a socket client to indicate that the request previously sent from the client was executed successfully.
There is no data for this command.
const int scim::SCIM_TRANS_CMD_FAIL = 4 |
This command is usually used in the Transaction sending from a socket server to a socket client to indicate that the request previously sent from the client was failed to be executed.
There is no data for this command.
const int scim::SCIM_TRANS_CMD_OPEN_CONNECTION = 5 |
This command is used internally by scim_socket_open_connection() and scim_socket_accept_connection().
It's sent from a socket client to a socket server to request the server to create the connection.
The corresponding data are:
If the socket server accept the connection request, it must send back a Transaction with following content:
Then if the client accept the result too, it must send the following content back to the socket server:
Otherwise, the client must return:
If the socket server do not accept the connection in the first stage, it should discard the request and send nothing back.
const int scim::SCIM_TRANS_CMD_CLOSE_CONNECTION = 6 |
It's used to request the socket server to close the connection forcedly.
It's currently not used at all.
const int scim::SCIM_TRANS_CMD_LOAD_FILE = 7 |
Request the socket server to load and send a file to the client.
The corresponding data is:
If the file is loaded successfully, then the server should send back:
Otherwise it should send back:
This command is only supported by SocketFrontEnd.
const int scim::SCIM_TRANS_CMD_SAVE_FILE = 8 |
Request the socket server to save a buffer into a file.
The corresponding data is:
If the file is saved successfully, then the server should return:
Otherwise it should return:
This command is currently not supported by any servers.
const int scim::SCIM_TRANS_CMD_EXIT = 99 |
This command should be sent from a socket server to its clients to let them exit.
No data is associated to this command.
This command is currently only used by Panel server.
const int scim::SCIM_TRANS_CMD_PROCESS_KEY_EVENT = 100 |
This command is used in SocketIMEngine to SocketFrontEnd and Panel to FrontEnd protocols to send a KeyEvent to an IMEngineInstance.
When used in SocketIMEngine to SocketFrontEnd protocol, the corresponding data is:
The Transaction returned from SocketFrontEnd should contain:
When used in Panel to FrontEnds protocol, the corresponding data is:
const int scim::SCIM_TRANS_CMD_MOVE_PREEDIT_CARET = 101 |
const int scim::SCIM_TRANS_CMD_SELECT_CANDIDATE = 102 |
const int scim::SCIM_TRANS_CMD_UPDATE_LOOKUP_TABLE_PAGE_SIZE = 103 |
const int scim::SCIM_TRANS_CMD_LOOKUP_TABLE_PAGE_UP = 104 |
const int scim::SCIM_TRANS_CMD_LOOKUP_TABLE_PAGE_DOWN = 105 |
const int scim::SCIM_TRANS_CMD_RESET = 106 |
const int scim::SCIM_TRANS_CMD_FOCUS_IN = 107 |
const int scim::SCIM_TRANS_CMD_FOCUS_OUT = 108 |
const int scim::SCIM_TRANS_CMD_TRIGGER_PROPERTY = 109 |
const int scim::SCIM_TRANS_CMD_PROCESS_HELPER_EVENT = 110 |
const int scim::SCIM_TRANS_CMD_UPDATE_CLIENT_CAPABILITIES = 111 |
const int scim::SCIM_TRANS_CMD_SHOW_PREEDIT_STRING = 150 |
const int scim::SCIM_TRANS_CMD_SHOW_AUX_STRING = 151 |
const int scim::SCIM_TRANS_CMD_SHOW_LOOKUP_TABLE = 152 |
const int scim::SCIM_TRANS_CMD_HIDE_PREEDIT_STRING = 153 |
const int scim::SCIM_TRANS_CMD_HIDE_AUX_STRING = 154 |
const int scim::SCIM_TRANS_CMD_HIDE_LOOKUP_TABLE = 155 |
const int scim::SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET = 156 |
const int scim::SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING = 157 |
const int scim::SCIM_TRANS_CMD_UPDATE_AUX_STRING = 158 |
const int scim::SCIM_TRANS_CMD_UPDATE_LOOKUP_TABLE = 159 |
const int scim::SCIM_TRANS_CMD_COMMIT_STRING = 160 |
const int scim::SCIM_TRANS_CMD_FORWARD_KEY_EVENT = 161 |
const int scim::SCIM_TRANS_CMD_REGISTER_PROPERTIES = 162 |
const int scim::SCIM_TRANS_CMD_UPDATE_PROPERTY = 163 |
const int scim::SCIM_TRANS_CMD_BEEP = 164 |
const int scim::SCIM_TRANS_CMD_START_HELPER = 165 |
const int scim::SCIM_TRANS_CMD_STOP_HELPER = 166 |
const int scim::SCIM_TRANS_CMD_SEND_HELPER_EVENT = 167 |
const int scim::SCIM_TRANS_CMD_GET_SURROUNDING_TEXT = 168 |
const int scim::SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT = 169 |
const int scim::SCIM_TRANS_CMD_NEW_INSTANCE = 200 |
const int scim::SCIM_TRANS_CMD_DELETE_INSTANCE = 201 |
const int scim::SCIM_TRANS_CMD_DELETE_ALL_INSTANCES = 202 |
const int scim::SCIM_TRANS_CMD_GET_FACTORY_LIST = 203 |
const int scim::SCIM_TRANS_CMD_GET_FACTORY_NAME = 204 |
const int scim::SCIM_TRANS_CMD_GET_FACTORY_AUTHORS = 205 |
const int scim::SCIM_TRANS_CMD_GET_FACTORY_CREDITS = 206 |
const int scim::SCIM_TRANS_CMD_GET_FACTORY_HELP = 207 |
const int scim::SCIM_TRANS_CMD_GET_FACTORY_LOCALES = 208 |
const int scim::SCIM_TRANS_CMD_GET_FACTORY_ICON_FILE = 209 |
const int scim::SCIM_TRANS_CMD_GET_FACTORY_LANGUAGE = 210 |
const int scim::SCIM_TRANS_CMD_FLUSH_CONFIG = 300 |
const int scim::SCIM_TRANS_CMD_ERASE_CONFIG = 301 |
const int scim::SCIM_TRANS_CMD_GET_CONFIG_STRING = 302 |
const int scim::SCIM_TRANS_CMD_SET_CONFIG_STRING = 303 |
const int scim::SCIM_TRANS_CMD_GET_CONFIG_INT = 304 |
const int scim::SCIM_TRANS_CMD_SET_CONFIG_INT = 305 |
const int scim::SCIM_TRANS_CMD_GET_CONFIG_BOOL = 306 |
const int scim::SCIM_TRANS_CMD_SET_CONFIG_BOOL = 307 |
const int scim::SCIM_TRANS_CMD_GET_CONFIG_DOUBLE = 308 |
const int scim::SCIM_TRANS_CMD_SET_CONFIG_DOUBLE = 309 |
const int scim::SCIM_TRANS_CMD_GET_CONFIG_VECTOR_STRING = 310 |
const int scim::SCIM_TRANS_CMD_SET_CONFIG_VECTOR_STRING = 311 |
const int scim::SCIM_TRANS_CMD_GET_CONFIG_VECTOR_INT = 312 |
const int scim::SCIM_TRANS_CMD_SET_CONFIG_VECTOR_INT = 313 |
const int scim::SCIM_TRANS_CMD_RELOAD_CONFIG = 314 |
const int scim::SCIM_TRANS_CMD_UPDATE_SCREEN = 400 |
const int scim::SCIM_TRANS_CMD_UPDATE_SPOT_LOCATION = 401 |
const int scim::SCIM_TRANS_CMD_PANEL_EXIT = 500 |
const int scim::SCIM_TRANS_CMD_PANEL_TURN_ON = 501 |
const int scim::SCIM_TRANS_CMD_PANEL_TURN_OFF = 502 |
const int scim::SCIM_TRANS_CMD_PANEL_UPDATE_FACTORY_INFO = 503 |
const int scim::SCIM_TRANS_CMD_PANEL_SHOW_HELP = 504 |
const int scim::SCIM_TRANS_CMD_PANEL_SHOW_FACTORY_MENU = 505 |
const int scim::SCIM_TRANS_CMD_PANEL_REGISTER_INPUT_CONTEXT = 506 |
const int scim::SCIM_TRANS_CMD_PANEL_REMOVE_INPUT_CONTEXT = 507 |
const int scim::SCIM_TRANS_CMD_PANEL_REQUEST_HELP = 520 |
const int scim::SCIM_TRANS_CMD_PANEL_REQUEST_FACTORY_MENU = 521 |
const int scim::SCIM_TRANS_CMD_PANEL_CHANGE_FACTORY = 522 |
const int scim::SCIM_TRANS_CMD_PANEL_REGISTER_HELPER = 540 |
const int scim::SCIM_TRANS_CMD_PANEL_SEND_IMENGINE_EVENT = 541 |
const int scim::SCIM_TRANS_CMD_PANEL_SEND_KEY_EVENT = 542 |
const int scim::SCIM_TRANS_CMD_HELPER_PROCESS_IMENGINE_EVENT = 602 |
const int scim::SCIM_TRANS_CMD_HELPER_ATTACH_INPUT_CONTEXT = 603 |
const int scim::SCIM_TRANS_CMD_HELPER_DETACH_INPUT_CONTEXT = 604 |
const int scim::SCIM_TRANS_CMD_HELPER_MANAGER_GET_HELPER_LIST = 700 |
const int scim::SCIM_TRANS_CMD_HELPER_MANAGER_RUN_HELPER = 701 |
const int scim::SCIM_TRANS_CMD_USER_DEFINED = 10000 |