5a10db50b29edc9aa8b2d9ff5871d413191c5084
[platform/core/uifw/isf.git] / ism / src / isf_panel_agent_base.cpp
1 /** @file isf_panel_agent_base.cpp
2  *  @brief Implementation of class PanelAgentBase.
3  */
4
5 /* ISF is based on SCIM 1.4.7 and extended for supporting more mobile fitable. */
6
7 /*
8  * Smart Common Input Method
9  *
10  * Copyright (c) 2005 James Su <suzhe@tsinghua.org.cn>
11  * Copyright (c) 2012-2016 Samsung Electronics Co., Ltd.
12  *
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  * GNU Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this program; if not, write to the
26  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
27  * Boston, MA  02111-1307  USA
28  *
29  */
30
31 #define Uses_SCIM_TRANSACTION
32 #define Uses_SCIM_TRANS_COMMANDS
33 #define Uses_SCIM_PANEL_AGENT
34 #define Uses_SCIM_HELPER
35 #define Uses_SCIM_SOCKET
36 #define Uses_SCIM_EVENT
37 #define Uses_SCIM_CONFIG
38 #define Uses_SCIM_CONFIG_MODULE
39 #define Uses_SCIM_CONFIG_PATH
40 #define Uses_SCIM_UTILITY
41
42 #include <string.h>
43 #include <sys/types.h>
44 #include <sys/times.h>
45 #include <dlog.h>
46 #include <unistd.h>
47 #include "scim_private.h"
48 #include "scim.h"
49 #include "scim_stl_map.h"
50 #include "isf_debug.h"
51
52 #ifdef LOG_TAG
53 # undef LOG_TAG
54 #endif
55 #define LOG_TAG             "ISF_PANEL_AGENT_BASE"
56
57
58 namespace scim
59 {
60
61
62 PanelAgentBase::PanelAgentBase (const String& name)
63     :m_name (name)
64 {
65     m_impl = NULL;
66 }
67
68 PanelAgentBase::~PanelAgentBase ()
69 {
70 }
71
72 bool PanelAgentBase::initialize (InfoManager* info_manager, const String& display, bool resident)
73 {
74     return false;
75 }
76
77 bool PanelAgentBase::valid (void) const
78 {
79     return false;
80 }
81
82 void PanelAgentBase::stop (void)
83 {
84 }
85
86 void PanelAgentBase::update_panel_event (int client,  uint32 context, int cmd, uint32 nType, uint32 nValue)
87 {
88 }
89
90 void PanelAgentBase::reset_keyboard_ise (int client, uint32 context)
91 {
92 }
93
94 void PanelAgentBase::update_keyboard_ise_list (int client, uint32 context)
95 {
96 }
97
98 void PanelAgentBase::change_factory (int client, uint32 context, const String&  uuid)
99 {
100 }
101
102 void PanelAgentBase::helper_candidate_show (int client, uint32 context, const String&  uuid)
103 {
104 }
105
106 void PanelAgentBase::helper_candidate_hide (int client, uint32 context, const String&  uuid)
107 {
108 }
109
110 /* if the uuid is empty, it must send to panelclient otherwise HelperAgent
111  */
112 void PanelAgentBase::candidate_more_window_show (int client, uint32 context)
113 {
114 }
115 /* if the uuid is empty, it must send to panelclient otherwise HelperAgent
116  */
117 void PanelAgentBase::candidate_more_window_hide (int client, uint32 context)
118 {
119 }
120
121 void PanelAgentBase::update_helper_lookup_table (int client, uint32 context, const String&  uuid, const LookupTable& table)
122 {
123 }
124
125 //select_aux
126 //helper_select_aux
127 //SCIM_TRANS_CMD_SELECT_AUX
128 //this function called by two places, will send message to help(with uuid) or app
129 void PanelAgentBase::select_aux (int client, uint32 context, uint32 item)
130 {
131 }
132 //SCIM_TRANS_CMD_SELECT_CANDIDATE
133 //this function called by two places, will send message to help(with uuid) or app
134 void PanelAgentBase::select_candidate (int client, uint32 context, uint32 item)
135 {
136 }
137
138 void PanelAgentBase::lookup_table_page_up (int client, uint32 context)
139 {
140 }
141
142 void PanelAgentBase::lookup_table_page_down (int client, uint32 context)
143 {
144 }
145
146 void PanelAgentBase::update_lookup_table_page_size (int client, uint32 context, uint32 size)
147 {
148 }
149
150 void PanelAgentBase::update_candidate_item_layout (int client, uint32 context, const std::vector<uint32>& row_items)
151 {
152 }
153
154 void PanelAgentBase::select_associate (int client, uint32 context, uint32 item)
155 {
156 }
157
158 void PanelAgentBase::associate_table_page_up (int client, uint32 context)
159 {
160 }
161
162 void PanelAgentBase::associate_table_page_down (int client, uint32 context)
163 {
164 }
165
166 void PanelAgentBase::update_associate_table_page_size (int client, uint32 context, uint32 size)
167 {
168 }
169
170 void PanelAgentBase::update_displayed_candidate_number (int client, uint32 context, uint32 size)
171 {
172 }
173
174 void PanelAgentBase::send_longpress_event (int client, uint32 context, uint32 index)
175 {
176 }
177
178 void PanelAgentBase::trigger_property (int client, uint32 context, const String&  property)
179 {
180 }
181
182 void PanelAgentBase::socket_start_helper (int client, uint32 context, const String& ic_uuid)
183 {
184 }
185
186 void PanelAgentBase::exit (int client, uint32 context)
187 {
188 }
189
190 void PanelAgentBase::focus_out_helper (int client, uint32 context, const String& uuid)
191 {
192 }
193
194 void PanelAgentBase::focus_in_helper (int client, uint32 context, const String& uuid)
195 {
196 }
197
198 void PanelAgentBase::show_helper (int client, uint32 context, const String& uuid, char* data, size_t& len)
199 {
200 }
201
202 void PanelAgentBase::hide_helper (int client, uint32 context, const String& uuid)
203 {
204 }
205
206 void PanelAgentBase::set_helper_mode (int client, uint32 context, const String& uuid, uint32& mode)
207 {
208 }
209
210 void PanelAgentBase::set_helper_language (int client, uint32 context, const String& uuid, uint32& language)
211 {
212 }
213
214 void PanelAgentBase::set_helper_imdata (int client, uint32 context, const String& uuid, const char* imdata, size_t& len)
215 {
216 }
217
218 void PanelAgentBase::set_helper_return_key_type (int client, uint32 context, const String& uuid, uint32 type)
219 {
220 }
221
222 void PanelAgentBase::get_helper_return_key_type (int client, uint32 context, const String& uuid, _OUT_ uint32& type)
223 {
224 }
225
226 void PanelAgentBase::set_helper_return_key_disable (int client, uint32 context, const String& uuid, uint32 disabled)
227 {
228 }
229
230 void PanelAgentBase::get_helper_return_key_disable (int client, uint32 context, const String& uuid, _OUT_ uint32& disabled)
231 {
232 }
233
234 void PanelAgentBase::set_helper_layout (int client, uint32 context, const String& uuid, uint32& layout)
235 {
236 }
237
238 void PanelAgentBase::set_helper_input_mode (int client, uint32 context, const String& uuid, uint32& mode)
239 {
240 }
241
242 void PanelAgentBase::set_helper_input_hint (int client, uint32 context, const String& uuid, uint32& hint)
243 {
244 }
245
246 void PanelAgentBase::set_helper_bidi_direction (int client, uint32 context, const String& uuid, uint32& direction)
247 {
248 }
249
250 void PanelAgentBase::set_helper_caps_mode (int client, uint32 context, const String& uuid, uint32& mode)
251 {
252 }
253
254 void PanelAgentBase::show_helper_option_window (int client, uint32 context, const String& uuid, uint32 caller_pid, uint32 ime_pid)
255 {
256 }
257
258 void PanelAgentBase::resume_helper_option_window (int client, uint32 context, const String& uuid)
259 {
260 }
261
262 void PanelAgentBase::set_transient_for (uint32 caller_pid, uint32 ime_pid)
263 {
264
265 }
266
267 void PanelAgentBase::set_helper_keyboard_mode (int client, uint32 context, const String& uuid, uint32& mode)
268 {
269 }
270
271 void PanelAgentBase::set_helper_prediction_hint (int client, uint32 context, const String& uuid, String& prediction_hint)
272 {
273 }
274
275 void PanelAgentBase::set_helper_mime_type (int client, uint32 context, const String& uuid, String& mime_type)
276 {
277 }
278
279 void PanelAgentBase::finalize_content_helper (int client, uint32 context, const String& uuid, String& text, uint32& cursor_pos)
280 {
281 }
282
283 void PanelAgentBase::set_helper_prediction_hint_data (int client, uint32 context, const String& uuid, String& key, String& value)
284 {
285 }
286
287 void PanelAgentBase::set_helper_optimization_hint(int client, uint32 context, const String& uuid, uint32& hint)
288 {
289 }
290
291 bool PanelAgentBase::process_key_event (int client, uint32 context, const String& uuid, KeyEvent& key, uint32 serial, uint32 keycode)
292 {
293     return false;
294 }
295
296 bool PanelAgentBase::get_helper_geometry (int client, uint32 context, String& uuid, _OUT_ struct rectinfo& info)
297 {
298     return false;
299 }
300
301 void PanelAgentBase::get_helper_imdata (int client, uint32 context, String& uuid, _OUT_ char** imdata, _OUT_ size_t& len)
302 {
303 }
304
305 void PanelAgentBase::get_helper_layout (int client, uint32 context, String& uuid, uint32& layout)
306 {
307 }
308
309 void PanelAgentBase::get_ise_language_locale (int client, uint32 context, String& uuid, _OUT_ char** data, _OUT_ size_t& len)
310 {
311 }
312
313 void PanelAgentBase::check_option_window (int client, uint32 context, String& uuid, _OUT_ uint32& avail)
314 {
315 }
316
317 void PanelAgentBase::reset_ise_option (int client, uint32 context)
318 {
319 }
320
321 void PanelAgentBase::reset_helper_context (int client, uint32 context, const String& uuid)
322 {
323 }
324
325 void PanelAgentBase::reload_config (int client)
326 {
327 }
328
329 void PanelAgentBase::socket_update_surrounding_text (int client, uint32 context, const String& uuid, String& text, uint32 cursor)
330 {
331 }
332
333 void PanelAgentBase::socket_remoteinput_focus_in (int client)
334 {
335 }
336
337 void PanelAgentBase::socket_remoteinput_focus_out (int client)
338 {
339 }
340
341 void PanelAgentBase::socket_remoteinput_entry_metadata (int client, uint32 hint, uint32 layout, int variation, uint32 autocapital_type, int return_key_disabled, uint32 return_key_type)
342 {
343 }
344
345 void PanelAgentBase::socket_remoteinput_surrounding_text (int client, String& text, uint32 cursor)
346 {
347 }
348
349 void PanelAgentBase::socket_remoteinput_input_resource (int client, uint32 input_resource)
350 {
351 }
352
353 void PanelAgentBase::socket_update_selection (int client, uint32 context, String& uuid, String text)
354 {
355 }
356
357 void PanelAgentBase::socket_get_keyboard_ise_list (int client, uint32 context, const String& uuid, std::vector<String>& list)
358 {
359 }
360
361 void PanelAgentBase::socket_get_candidate_ui (int client, uint32 context, const String& uuid,  int style,  int mode)
362 {
363 }
364
365 void PanelAgentBase::socket_get_candidate_geometry (int client, uint32 context, const String& uuid, struct rectinfo& info)
366 {
367 }
368
369 void PanelAgentBase::socket_get_keyboard_ise (int client, uint32 context, const String& uuid, String& ise_name, String& ise_uuid)
370 {
371 }
372
373 void PanelAgentBase::helper_detach_input_context (int client, uint32 context, const String& ic_uuid)
374 {
375 }
376
377 void PanelAgentBase::helper_process_imengine_event (int client, uint32 context, const String& ic_uuid, const Transaction& nest_transaction)
378 {
379 }
380
381 void PanelAgentBase::process_helper_event (int client, uint32 context, String target_uuid, String active_uuid, Transaction& nest_trans)
382 {
383 }
384
385 void PanelAgentBase::socket_helper_key_event (int client, uint32 context, int cmd , KeyEvent& key)
386 {
387 }
388
389 //SCIM_TRANS_CMD_GET_SURROUNDING_TEXT
390 //socket_helper_get_surrounding_text
391 void PanelAgentBase::socket_helper_get_surrounding_text (int client, uint32 context, uint32 maxlen_before, uint32 maxlen_after)
392 {
393 }
394 //SCIM_TRANS_CMD_DELETE_SURROUNDING_TEXT
395 //socket_helper_delete_surrounding_text
396 void PanelAgentBase::socket_helper_delete_surrounding_text (int client, uint32 context, uint32 offset, uint32 len)
397 {
398 }
399 //SCIM_TRANS_CMD_GET_SELECTION
400 void PanelAgentBase::socket_helper_get_selection (int client, uint32 context)
401 {
402 }
403 //SCIM_TRANS_CMD_SET_SELECTION
404 void PanelAgentBase::socket_helper_set_selection (int client, uint32 context, uint32 start, uint32 end)
405 {
406 }
407
408 //socket_helper_update_input_context
409 //ISM_TRANS_CMD_UPDATE_ISE_INPUT_CONTEXT
410 void PanelAgentBase::update_ise_input_context (int client, uint32 context, uint32 type, uint32 value)
411 {
412 }
413
414 //socket_helper_update_language_locale
415 //ISM_TRANS_CMD_UPDATE_ISE_LANGUAGE_LOCALE
416 void PanelAgentBase::update_ise_language_locale(int client, uint32 context, String locale)
417 {
418 }
419
420 //socket_helper_send_private_command
421 //SCIM_TRANS_CMD_SEND_PRIVATE_COMMAND
422 void PanelAgentBase::send_private_command (int client, uint32 context, const String& command)
423 {
424 }
425
426 //socket_helper_commit_content
427 //SCIM_TRANS_CMD_COMMIT_CONTENT
428 void PanelAgentBase::commit_content (int client, uint32 context, const String& content, const String& description, const String& mime_types)
429 {
430 }
431
432 //SCIM_TRANS_CMD_UPDATE_SPOT_LOCATION
433 void PanelAgentBase::helper_all_update_spot_location (int client, uint32 context, String uuid, int x, int y)
434 {
435 }
436 //ISM_TRANS_CMD_UPDATE_CURSOR_POSITION
437 void PanelAgentBase::helper_all_update_cursor_position (int client, uint32 context, String uuid, int cursor_pos)
438 {
439 }
440 //SCIM_TRANS_CMD_UPDATE_SCREEN
441 void PanelAgentBase::helper_all_update_screen (int client, uint32 context, String uuid, int screen)
442 {
443 }
444
445 //socket_helper_commit_string
446 //SCIM_TRANS_CMD_COMMIT_STRING
447 void PanelAgentBase::commit_string (int client, uint32 context, const WideString& wstr)
448 {
449 }
450 //socket_helper_show_preedit_string
451 //SCIM_TRANS_CMD_SHOW_PREEDIT_STRING
452 void PanelAgentBase::show_preedit_string (int client, uint32 context)
453 {
454 }
455 //socket_helper_hide_preedit_string
456 //SCIM_TRANS_CMD_HIDE_PREEDIT_STRING
457 void PanelAgentBase::hide_preedit_string (int client, uint32 context)
458 {
459 }
460 //socket_helper_update_preedit_string
461 //SCIM_TRANS_CMD_UPDATE_PREEDIT_STRING
462 void PanelAgentBase::update_preedit_string (int client, uint32 context, WideString preedit, WideString commit, AttributeList& attrs, uint32 caret)
463 {
464 }
465 //socket_helper_update_preedit_caret
466 //SCIM_TRANS_CMD_UPDATE_PREEDIT_CARET
467 void PanelAgentBase::update_preedit_caret (int client, uint32 context, uint32 caret)
468 {
469 }
470 //socket_helper_recapture_string
471 //ISM_TRANS_CMD_RECAPTURE_STRING
472 void PanelAgentBase::recapture_string (int client, uint32 context, int offset, int len, WideString preedit, WideString commit, AttributeList& attrs)
473 {
474 }
475 //socket_helper_register_helper
476 //SCIM_TRANS_CMD_HELPER_ATTACH_INPUT_CONTEXT
477 //SCIM_TRANS_CMD_UPDATE_SCREEN
478 void PanelAgentBase::helper_attach_input_context_and_update_screen (int client, std::vector < std::pair <uint32, String> >& helper_ic_index,
479         uint32 current_screen)
480 {
481 }
482
483 void PanelAgentBase::hide_helper_ise (int client, uint32 context)
484 {
485 }
486
487 bool PanelAgentBase::process_input_device_event(int client, uint32 context, const String& uuid, uint32 type, const char *data, size_t len, _OUT_ uint32& result)
488 {
489     return false;
490 }
491
492 void PanelAgentBase::process_key_event_done(int client, uint32 context, KeyEvent &key, uint32 ret, uint32 serial)
493 {
494 }
495
496 void PanelAgentBase::request_ise_hide(int client, uint32 context)
497 {
498 }
499
500 void PanelAgentBase::set_autocapital_type(int client, uint32 context, String uuid, int mode)
501 {
502 }
503
504 void PanelAgentBase::update_ise_geometry (int client, uint32 context, uint32 x, uint32 y, uint32 width, uint32 height)
505 {
506 }
507
508 void PanelAgentBase::remote_update_preedit_string (int client, uint32 context, const WideString str, const WideString commit, const AttributeList &attrs, uint32 caret)
509 {
510 }
511
512 void PanelAgentBase::remote_send_key_event (int client, uint32 context, const KeyEvent &key)
513 {
514 }
515
516 void PanelAgentBase::remote_forward_key_event (int client, uint32 context, const KeyEvent &key)
517 {
518 }
519
520 void PanelAgentBase::remote_commit_string (int client, uint32 context, const WideString& wstr)
521 {
522 }
523
524 void PanelAgentBase::remote_delete_surrounding_text (int client, uint32 context, uint32 offset, uint32 len)
525 {
526 }
527
528 void PanelAgentBase::set_prediction_allow (int client, uint32 context, String uuid, int mode)
529 {
530 }
531
532 void PanelAgentBase::send_fail_reply (int client)
533 {
534 }
535
536 void PanelAgentBase::update_entry_metadata (int client, uint32 context)
537 {
538 }
539
540 void PanelAgentBase::request_ise_reshow (int client, uint32 context)
541 {
542 }
543 } /* namespace scim */
544
545 /*
546 vi:ts=4:nowrap:ai:expandtab
547 */