upload tizen1.0 source
[profile/ivi/isf.git] / ism / src / scim_panel_agent.h
1 /**
2  * @file scim_panel_agent.h
3  * @brief Defines scim::PanelAgent and their related types.
4  *
5  * scim::PanelAgent is a class used to write Panel daemons.
6  * It acts like a Socket Server and handles all socket clients
7  * issues.
8  */
9
10 /* ISF is based on SCIM 1.4.7 and extended for supporting more mobile fitable. */
11
12 /*
13  * Smart Common Input Method
14  *
15  * Copyright (c) 2004-2005 James Su <suzhe@tsinghua.org.cn>
16  *
17  *
18  * This library is free software; you can redistribute it and/or
19  * modify it under the terms of the GNU Lesser General Public
20  * License as published by the Free Software Foundation; either
21  * version 2 of the License, or (at your option) any later version.
22  *
23  * This library is distributed in the hope that it will be useful,
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26  * GNU Lesser General Public License for more details.
27  *
28  * You should have received a copy of the GNU Lesser General Public
29  * License along with this program; if not, write to the
30  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
31  * Boston, MA  02111-1307  USA
32  *
33  * $Id: scim_panel_agent.h,v 1.2 2005/06/11 14:50:31 suzhe Exp $
34  */
35
36 #ifndef __SCIM_PANEL_AGENT_H
37 #define __SCIM_PANEL_AGENT_H
38
39 #include <scim_panel_common.h>
40
41 namespace scim {
42
43 /**
44  * @addtogroup Panel
45  * @ingroup InputServiceFramework
46  * The accessory classes to help develop Panel daemons and FrontEnds
47  * which need to communicate with Panel daemons.
48  * @{
49  */
50
51 typedef enum
52 {
53     TOOLBAR_KEYBOARD_MODE = 0,  /* Hardware keyboard ISE */
54     TOOLBAR_HELPER_MODE         /* Software keyboard ISE */
55 } TOOLBAR_MODE_T;
56
57 typedef struct _ISE_INFO
58 {
59     String uuid;
60     String name;
61     String lang;
62     String icon;
63     uint32 option;
64     TOOLBAR_MODE_T type;
65 } ISE_INFO;
66
67 typedef Slot0<void>
68         PanelAgentSlotVoid;
69
70 typedef Slot1<void, int>
71         PanelAgentSlotInt;
72
73 typedef Slot1<void, const String &>
74         PanelAgentSlotString;
75
76 typedef Slot2<void, String &, String &>
77         PanelAgentSlotString2;
78
79 typedef Slot2<void, int, const String &>
80         PanelAgentSlotIntString;
81
82 typedef Slot1<void, const PanelFactoryInfo &>
83         PanelAgentSlotFactoryInfo;
84
85 typedef Slot1<void, const std::vector <PanelFactoryInfo> &>
86         PanelAgentSlotFactoryInfoVector;
87
88 typedef Slot1<void, const LookupTable &>
89         PanelAgentSlotLookupTable;
90
91 typedef Slot1<void, const Property &>
92         PanelAgentSlotProperty;
93
94 typedef Slot1<void, const PropertyList &>
95         PanelAgentSlotPropertyList;
96
97 typedef Slot2<void, int, int>
98         PanelAgentSlotIntInt;
99
100 typedef Slot2<void, int &, int &>
101         PanelAgentSlotIntInt2;
102
103 typedef Slot3<void, int, int, int>
104         PanelAgentSlotIntIntInt;
105
106 typedef Slot2<void, int, const Property &>
107         PanelAgentSlotIntProperty;
108
109 typedef Slot2<void, int, const PropertyList &>
110         PanelAgentSlotIntPropertyList;
111
112 typedef Slot2<void, int, const HelperInfo &>
113         PanelAgentSlotIntHelperInfo;
114
115 typedef Slot2<void, const String &, const AttributeList &>
116         PanelAgentSlotAttributeString;
117
118 typedef Slot1<void, std::vector<String> &>
119         PanelAgentSlotStringVector;
120
121 typedef Slot1<bool, std::vector<String> &>
122         PanelAgentSlotBoolStringVector;
123
124 typedef Slot2<void, char *, std::vector<String> &>
125         PanelAgentSlotStrStringVector;
126
127 typedef Slot2<bool, const String &, ISE_INFO &>
128         PanelAgentSlotStringISEINFO;
129
130 typedef Slot1<void, const KeyEvent &>
131         PanelAgentSlotKeyEvent;
132
133 typedef Slot1<void, struct rectinfo &>
134         PanelAgentSlotRect;
135
136 typedef Slot2<void, const String &, bool>
137         PanelAgentSlotStringBool;
138
139 typedef struct DefaultIse
140 {
141     TOOLBAR_MODE_T type;
142     String         uuid;
143     String         name;
144     DefaultIse () : type (TOOLBAR_KEYBOARD_MODE), uuid (""), name ("") { }
145 } DEFAULT_ISE_T;
146
147 /**
148  * @brief The class to implement all socket protocol in Panel.
149  *
150  * This class acts like a stand alone SocketServer.
151  * It has its own dedicated main loop, and will be blocked when run () is called.
152  * So run () must be called within a separated thread, in order to not block
153  * the main loop of the Panel program itself.
154  *
155  * Before calling run (), the panel must hook the callback functions to the
156  * corresponding signals.
157  *
158  * Note that, there are two special signals: lock(void) and unlock(void). These
159  * two signals are used to provide a thread lock to PanelAgent, so that PanelAgent
160  * can run correctly within a multi-threading Panel program.
161  */
162 class PanelAgent
163 {
164     class PanelAgentImpl;
165     PanelAgentImpl *m_impl;
166
167     PanelAgent (const HelperAgent &);
168     const PanelAgent & operator = (const HelperAgent &);
169
170 public:
171     PanelAgent ();
172     ~PanelAgent ();
173
174     /**
175      * @brief Initialize this PanelAgent.
176      *
177      * @param config The name of the config module to be used by Helpers.
178      * @param display The name of display, on which the Panel should run.
179      * @param resident If this is true then this PanelAgent will keep running
180      *                 even if there is no more client connected.
181      *
182      * @return true if the PanelAgent is initialized correctly and ready to run.
183      */
184     bool initialize (const String &config, const String &display, bool resident = false);
185
186     /**
187      * @brief Check if this PanelAgent is initialized correctly and ready to run.
188      *
189      * @return true if this PanelAgent is ready to run.
190      */
191     bool valid (void) const;
192
193     /**
194      * @brief Run this PanelAgent.
195      *
196      * This method has its own dedicated main loop,
197      * so it should be run in a separated thread.
198      *
199      * @return false if the Panel SocketServer encountered an error when running.
200      *               Otherwise, it won't return until the server exits.
201      */
202     bool run (void);
203
204     /**
205      * @brief Stop this PanelAgent.
206      */
207     void stop (void);
208
209 public:
210
211     /**
212      * @brief Get the list of all helpers.
213      *
214      * Panel program should provide a menu which contains
215      * all stand alone but not auto start Helpers, so that users can activate
216      * the Helpers by clicking in the menu.
217      *
218      * All auto start Helpers should be started by Panel after running PanelAgent
219      * by calling PanelAgent::start_helper().
220      *
221      * @param helpers A list contains information of all Helpers.
222      */
223     int get_helper_list (std::vector <HelperInfo> & helpers) const;
224
225     /**
226      * @brief Get the list of active ISEs.
227      *
228      * @param strlist A list contains information of active ISEs.
229      *
230      * @return the list size.
231      */
232     int get_active_ise_list (std::vector<String> &strlist);
233
234     /**
235      * @brief Send display name to FrontEnd.
236      *
237      * @param name The display name.
238      *
239      * @return zero if this operation is successful, otherwise return -1.
240      */
241     int send_display_name (String &name);
242
243
244     /**
245      * @brief Get current ISE type.
246      *
247      * @return the current ISE type.
248      */
249     TOOLBAR_MODE_T get_current_toolbar_mode (void) const;
250
251     /**
252      * @brief Get current ISE icon.
253      *
254      * @return the current ISE icon.
255      */
256     String get_current_factory_icon (void) const;
257
258     /**
259      * @brief Get current helper ISE uuid.
260      *
261      * @return the current helper ISE uuid.
262      */
263    String get_current_helper_uuid (void) const;
264
265     /**
266      * @brief Get current helper ISE name.
267      *
268      * @return the current helper ISE name.
269      */
270     String get_current_helper_name (void) const;
271
272     /**
273      * @brief Get current ISE name.
274      *
275      * @return the current ISE name.
276      */
277     String get_current_ise_name (void) const;
278
279     /**
280      * @brief Set current ISE style.
281      *
282      * @param style The current ISE style.
283      */
284     void set_current_ise_style (uint32 &style);
285
286     /**
287      * @brief Set current ISE name.
288      *
289      * @param name The current ISE name.
290      */
291     void set_current_ise_name (String &name);
292
293     /**
294      * @brief Set current ISE icon.
295      *
296      * @param icon The current ISE icon filepath.
297      */
298     void set_current_factory_icon (String &icon);
299
300     /**
301      * @brief Set current ISE type.
302      *
303      * @param mode The current ISE type.
304      */
305     void set_current_toolbar_mode (TOOLBAR_MODE_T mode);
306
307     /**
308      * @brief Get current ISE size and position.
309      *
310      * @param rect It contains ISE size and position.
311      */
312     void get_current_ise_geometry (rectinfo &rect);
313
314     /**
315      * @brief Update ISE name to IM Control.
316      *
317      * @param name The ISE name.
318      */
319     void update_ise_name (String &name);
320
321     /**
322      * @brief Update ISE style to IM Control.
323      *
324      * @param style The ISE style.
325      */
326     void update_ise_style (uint32 &style);
327
328     /**
329      * @brief Send candidate panel event to IM Control.
330      *
331      * @param nType  The candidate panel event type.
332      * @param nValue The candidate panel event value.
333      */
334     void update_candidate_panel_event (uint32 nType, uint32 nValue);
335
336     /**
337      * @brief Update ISE control panel status to IM Control.
338      *
339      * @param showed The control panel status.
340      */
341     void update_isf_control_status (const bool showed);
342
343     /**
344      * @brief Notice helper ISE to focus out.
345      *
346      * @param uuid The helper ISE uuid.
347      */
348     void focus_out_helper (const String &uuid);
349
350     /**
351      * @brief Notice helper ISE to focus in.
352      *
353      * @param uuid The helper ISE uuid.
354      */
355     void focus_in_helper (const String &uuid);
356
357     /**
358      * @brief Notice helper ISE to show window.
359      *
360      * @param uuid The helper ISE uuid.
361      */
362     void show_helper (const String &uuid);
363
364     /**
365      * @brief Notice helper ISE to hide window.
366      *
367      * @param uuid The helper ISE uuid.
368      */
369     void hide_helper (const String &uuid);
370
371
372     /**
373      * @brief Set default ISE.
374      *
375      * @param ise The variable contains the information of default ISE.
376      */
377     void set_default_ise (const DEFAULT_ISE_T &ise);
378
379     /**
380      * @brief Set whether shared ISE is for all applications.
381      *
382      * @param should_shared_ise The indicator for shared ISE.
383      */
384     void set_should_shared_ise (const bool should_shared_ise);
385
386     /**
387      * @brief Reset keyboard ISE.
388      *
389      * @return true if this operation is successful, otherwise return false.
390      */
391     bool reset_keyboard_ise (void) const;
392
393     /**
394      * @brief Set whether ISE is changed.
395      *
396      * @param changing The indicator for ISE changing.
397      */
398     void set_ise_changing (bool changing);
399
400 public:
401     /**
402      * @brief Let the focused IMEngineInstance object move the preedit caret.
403      *
404      * @param position The new preedit caret position.
405      * @return true if the command was sent correctly.
406      */
407     bool move_preedit_caret             (uint32         position);
408
409     /**
410      * @brief Request help information from the focused IMEngineInstance object.
411      * @return true if the command was sent correctly.
412      */
413     bool request_help                   (void);
414
415     /**
416      * @brief Request factory menu from the focused FrontEnd.
417      * @return true if the command was sent correctly.
418      */
419     bool request_factory_menu           (void);
420
421     /**
422      * @brief Change the factory used by the focused IMEngineInstance object.
423      *
424      * @param uuid The uuid of the new factory.
425      * @return true if the command was sent correctly.
426      */
427     bool change_factory                 (const String  &uuid);
428
429     /**
430      * @brief Notice Helper ISE that candidate more window is showed.
431      * @return true if the command was sent correctly.
432      */
433     bool candidate_more_window_show     (void);
434
435     /**
436      * @brief Notice Helper ISE that candidate more window is hidden.
437      * @return true if the command was sent correctly.
438      */
439     bool candidate_more_window_hide     (void);
440
441     /**
442      * @brief Let the focused IMEngineInstance object
443      *        select a aux in current aux string.
444      *
445      * @param item The index of the selected aux.
446      * @return true if the command was sent correctly.
447      */
448     bool select_aux                     (uint32         item);
449
450     /**
451      * @brief Let the focused IMEngineInstance object
452      *        select a candidate in current lookup table.
453      *
454      * @param item The index of the selected candidate.
455      * @return true if the command was sent correctly.
456      */
457     bool select_candidate               (uint32         item);
458
459     /**
460      * @brief Let the focused IMEngineInstance object
461      *        flip the LookupTable to previous page.
462      * @return true if the command was sent correctly.
463      */
464     bool lookup_table_page_up           (void);
465
466     /**
467      * @brief Let the focused IMEngineInstance object
468      *        flip the LookupTable to next page.
469      * @return true if the command was sent correctly.
470      */
471     bool lookup_table_page_down         (void);
472
473     /**
474      * @brief Let the focused IMEngineInstance object
475      *        update the page size of the LookupTable.
476      *
477      * @param size The new page size.
478      * @return true if the command was sent correctly.
479      */
480     bool update_lookup_table_page_size  (uint32         size);
481
482     /**
483      * @brief Let the focused IMEngineInstance object
484      *        select a associate in current associate table.
485      *
486      * @param item The index of the selected associate.
487      * @return true if the command was sent correctly.
488      */
489     bool select_associate               (uint32         item);
490
491     /**
492      * @brief Let the focused IMEngineInstance object
493      *        flip the AssociateTable to previous page.
494      * @return true if the command was sent correctly.
495      */
496     bool associate_table_page_up        (void);
497
498     /**
499      * @brief Let the focused IMEngineInstance object
500      *        flip the AssociateTable to next page.
501      * @return true if the command was sent correctly.
502      */
503     bool associate_table_page_down      (void);
504
505     /**
506      * @brief Let the focused IMEngineInstance object
507      *        update the page size of the AssociateTable.
508      *
509      * @param size The new page size.
510      * @return true if the command was sent correctly.
511      */
512     bool update_associate_table_page_size (uint32       size);
513
514     /**
515      * @brief Trigger a property of the focused IMEngineInstance object.
516      *
517      * @param property The property key to be triggered.
518      * @return true if the command was sent correctly.
519      */
520     bool trigger_property               (const String  &property);
521
522     /**
523      * @brief Trigger a property of a Helper object.
524      *
525      * @param client The client id of the Helper object.
526      * @param property The property key to be triggered.
527      * @return true if the command was sent correctly.
528      */
529     bool trigger_helper_property        (int            client,
530                                          const String  &property);
531
532     /**
533      * @brief Start a stand alone helper.
534      *
535      * @param uuid The uuid of the Helper object to be started.
536      * @return true if the command was sent correctly.
537      */
538     bool start_helper                   (const String  &uuid);
539
540     /**
541      * @brief Stop a stand alone helper.
542      *
543      * @param uuid The uuid of the Helper object to be stopped.
544      * @return true if the command was sent correctly.
545      */
546     bool stop_helper                    (const String  &uuid);
547
548     /**
549      * @brief Let all FrontEnds and Helpers reload configuration.
550      * @return true if the command was sent correctly.
551      */
552     bool reload_config                  (void);
553
554     /**
555      * @brief Let all FrontEnds, Helpers and this Panel exit.
556      * @return true if the command was sent correctly.
557      */
558     bool exit                           (void);
559
560     /**
561      * @brief Filter the events received from panel client.
562      *
563      * Corresponding signal will be emitted in this method.
564      *
565      * @param fd The file description for connection.
566      *
567      * @return true if the command was sent correctly, otherwise return false.
568      */
569     bool filter_event                   (int fd);
570
571     /**
572      * @brief Filter the exception events received from panel client.
573      *
574      * Corresponding signal will be emitted in this method.
575      *
576      * @param fd The file description for connection.
577      *
578      * @return true if the command was sent correctly, otherwise return false.
579      */
580     bool filter_exception_event         (int fd);
581
582     /**
583      * @brief Get PanelAgent server fd.
584      *
585      * @return the PanelAgent server fd.
586      */
587     int get_server_id                   (void);
588
589     /**
590      * @brief Set the common ISE uuid.
591      *
592      * @return none.
593      */
594     void set_common_ise_uuid            (String &uuid);
595
596     /**
597      * @brief Request to update ISE list.
598      *
599      * @return none.
600      */
601     void update_ise_list                (std::vector<String> &strList);
602
603 public:
604     /**
605      * @brief Signal: Reload configuration.
606      *
607      * When a Helper object send a RELOAD_CONFIG event to this Panel,
608      * this signal will be emitted. Panel should reload all configuration here.
609      */
610     Connection signal_connect_reload_config              (PanelAgentSlotVoid                *slot);
611
612     /**
613      * @brief Signal: Turn on.
614      *
615      * slot prototype: void turn_on (void);
616      */
617     Connection signal_connect_turn_on                    (PanelAgentSlotVoid                *slot);
618
619     /**
620      * @brief Signal: Turn off.
621      *
622      * slot prototype: void turn_off (void);
623      */
624     Connection signal_connect_turn_off                   (PanelAgentSlotVoid                *slot);
625
626     /**
627      * @brief Signal: Show panel.
628      *
629      * slot prototype: void show_panel (void);
630      */
631     Connection signal_connect_show_panel                 (PanelAgentSlotVoid                *slot);
632
633     /**
634      * @brief Signal: Hide panel.
635      *
636      * slot prototype: void hide_panel (void);
637      */
638     Connection signal_connect_hide_panel                 (PanelAgentSlotVoid                *slot);
639
640     /**
641      * @brief Signal: Update screen.
642      *
643      * slot prototype: void update_screen (int screen);
644      */
645     Connection signal_connect_update_screen              (PanelAgentSlotInt                 *slot);
646
647     /**
648      * @brief Signal: Update spot location.
649      *
650      * slot prototype: void update_spot_location (int x, int y, int top_y);
651      */
652     Connection signal_connect_update_spot_location       (PanelAgentSlotIntIntInt           *slot);
653
654     /**
655      * @brief Signal: Update factory information.
656      *
657      * slot prototype: void update_factory_info (const PanelFactoryInfo &info);
658      */
659     Connection signal_connect_update_factory_info        (PanelAgentSlotFactoryInfo         *slot);
660
661     /**
662      * @brief Signal: start default ise.
663      *
664      * slot prototype: void start_default_ise (void);
665      */
666     Connection signal_connect_start_default_ise          (PanelAgentSlotVoid                *slot);
667
668     /**
669      * @brief Signal: Get the list of keyboard ise name.
670      *
671      * slot prototype: bool get_keyboard_ise_list (std::vector<String> &);
672      */
673     Connection signal_connect_get_keyboard_ise_list      (PanelAgentSlotBoolStringVector    *slot);
674
675     /**
676      * @brief Signal: set candidate ui.
677      *
678      * slot prototype: void set_candidate_ui (int style, int mode);
679      */
680     Connection signal_connect_set_candidate_ui           (PanelAgentSlotIntInt              *slot);
681
682     /**
683      * @brief Signal: get candidate ui.
684      *
685      * slot prototype: void get_candidate_ui (int &style, int &mode);
686      */
687     Connection signal_connect_get_candidate_ui           (PanelAgentSlotIntInt2             *slot);
688
689     /**
690      * @brief Signal: get candidate window geometry information.
691      *
692      * slot prototype: void get_candidate_geometry (rectinfo &info);
693      */
694     Connection signal_connect_get_candidate_geometry     (PanelAgentSlotRect                *slot);
695
696     /**
697      * @brief Signal: set candidate position.
698      *
699      * slot prototype: void set_candidate_position (int left, int top);
700      */
701     Connection signal_connect_set_candidate_position     (PanelAgentSlotIntInt              *slot);
702
703     /**
704      * @brief Signal: set keyboard ise.
705      *
706      * slot prototype: void set_keyboard_ise (int type, const String &ise);
707      */
708     Connection signal_connect_set_keyboard_ise           (PanelAgentSlotIntString           *slot);
709
710     /**
711      * @brief Signal: get keyboard ise.
712      *
713      * slot prototype: void get_keyboard_ise (String &ise_name);
714      */
715     Connection signal_connect_get_keyboard_ise           (PanelAgentSlotString2             *slot);
716     /**
717      * @brief Signal: launch helper ise list selection.
718      *
719      * slot prototype: void launch_helper_ise_list_selecton (int withUI);
720      */
721     Connection signal_connect_launch_helper_ise_list_selection (PanelAgentSlotInt           *slot);
722
723     /**
724      * @brief Signal: Show help.
725      *
726      * slot prototype: void show_help (const String &help);
727      */
728     Connection signal_connect_show_help                  (PanelAgentSlotString              *slot);
729
730     /**
731      * @brief Signal: Show factory menu.
732      *
733      * slot prototype: void show_factory_menu (const std::vector <PanelFactoryInfo> &menu);
734      */
735     Connection signal_connect_show_factory_menu          (PanelAgentSlotFactoryInfoVector   *slot);
736
737     /**
738      * @brief Signal: Show preedit string.
739      *
740      * slot prototype: void show_preedit_string (void):
741      */
742     Connection signal_connect_show_preedit_string        (PanelAgentSlotVoid                *slot);
743
744     /**
745      * @brief Signal: Show aux string.
746      *
747      * slot prototype: void show_aux_string (void):
748      */
749     Connection signal_connect_show_aux_string            (PanelAgentSlotVoid                *slot);
750
751     /**
752      * @brief Signal: Show lookup table.
753      *
754      * slot prototype: void show_lookup_table (void):
755      */
756     Connection signal_connect_show_lookup_table          (PanelAgentSlotVoid                *slot);
757
758     /**
759      * @brief Signal: Show associate table.
760      *
761      * slot prototype: void show_associate_table (void):
762      */
763     Connection signal_connect_show_associate_table       (PanelAgentSlotVoid                *slot);
764
765     /**
766      * @brief Signal: Hide preedit string.
767      *
768      * slot prototype: void hide_preedit_string (void);
769      */
770     Connection signal_connect_hide_preedit_string        (PanelAgentSlotVoid                *slot);
771
772     /**
773      * @brief Signal: Hide aux string.
774      *
775      * slot prototype: void hide_aux_string (void);
776      */
777     Connection signal_connect_hide_aux_string            (PanelAgentSlotVoid                *slot);
778
779     /**
780      * @brief Signal: Hide lookup table.
781      *
782      * slot prototype: void hide_lookup_table (void);
783      */
784     Connection signal_connect_hide_lookup_table          (PanelAgentSlotVoid                *slot);
785
786     /**
787      * @brief Signal: Hide associate table.
788      *
789      * slot prototype: void hide_associate_table (void);
790      */
791     Connection signal_connect_hide_associate_table       (PanelAgentSlotVoid                *slot);
792
793     /**
794      * @brief Signal: Update preedit string.
795      *
796      * slot prototype: void update_preedit_string (const String &str, const AttributeList &attrs);
797      * - str   -- The UTF-8 encoded string to be displayed in preedit area.
798      * - attrs -- The attributes of the string.
799      */
800     Connection signal_connect_update_preedit_string      (PanelAgentSlotAttributeString     *slot);
801
802     /**
803      * @brief Signal: Update preedit caret.
804      *
805      * slot prototype: void update_preedit_caret (int caret);
806      */
807     Connection signal_connect_update_preedit_caret       (PanelAgentSlotInt                 *slot);
808
809     /**
810      * @brief Signal: Update aux string.
811      *
812      * slot prototype: void update_aux_string (const String &str, const AttributeList &attrs);
813      * - str   -- The UTF-8 encoded string to be displayed in aux area.
814      * - attrs -- The attributes of the string.
815      */
816     Connection signal_connect_update_aux_string          (PanelAgentSlotAttributeString     *slot);
817
818     /**
819      * @brief Signal: Update lookup table.
820      *
821      * slot prototype: void update_lookup_table (const LookupTable &table);
822      * - table -- The new LookupTable object.
823      */
824     Connection signal_connect_update_lookup_table        (PanelAgentSlotLookupTable         *slot);
825
826     /**
827      * @brief Signal: Update associate table.
828      *
829      * slot prototype: void update_associate_table (const LookupTable &table);
830      * - table -- The new LookupTable object.
831      */
832     Connection signal_connect_update_associate_table     (PanelAgentSlotLookupTable         *slot);
833
834     /**
835      * @brief Signal: Register properties.
836      *
837      * Register properties of the focused instance.
838      *
839      * slot prototype: void register_properties (const PropertyList &props);
840      * - props -- The properties to be registered.
841      */
842     Connection signal_connect_register_properties        (PanelAgentSlotPropertyList        *slot);
843
844     /**
845      * @brief Signal: Update property.
846      *
847      * Update a property of the focused instance.
848      *
849      * slot prototype: void update_property (const Property &prop);
850      * - prop -- The property to be updated.
851      */
852     Connection signal_connect_update_property            (PanelAgentSlotProperty            *slot);
853
854     /**
855      * @brief Signal: Register properties of a helper.
856      *
857      * slot prototype: void register_helper_properties (int id, const PropertyList &props);
858      * - id    -- The client id of the helper object.
859      * - props -- The properties to be registered.
860      */
861     Connection signal_connect_register_helper_properties (PanelAgentSlotIntPropertyList     *slot);
862
863     /**
864      * @brief Signal: Update helper property.
865      *
866      * slot prototype: void update_helper_property (int id, const Property &prop);
867      * - id   -- The client id of the helper object.
868      * - prop -- The property to be updated.
869      */
870     Connection signal_connect_update_helper_property     (PanelAgentSlotIntProperty         *slot);
871
872     /**
873      * @brief Signal: Register a helper object.
874      *
875      * A newly started helper object will send this event to Panel.
876      *
877      * slot prototype: register_helper (int id, const HelperInfo &helper);
878      * - id     -- The client id of the helper object.
879      * - helper -- The information of the helper object.
880      */
881     Connection signal_connect_register_helper            (PanelAgentSlotIntHelperInfo       *slot);
882
883     /**
884      * @brief Signal: Remove a helper object.
885      *
886      * If a running helper close its connection to Panel, then this signal will be triggered to
887      * tell Panel to remove all data associated to this helper.
888      *
889      * slot prototype: void remove_helper (int id);
890      * - id -- The client id of the helper object to be removed.
891      */
892     Connection signal_connect_remove_helper              (PanelAgentSlotInt                 *slot);
893
894     /**
895      * @brief Signal: Start an ise with the speficied uuid
896      *
897      * slot prototype: void set_active_ise_by_uuid (const String& uuid);
898      * - uuid -- the uuid of the ise object
899      */
900     Connection signal_connect_set_active_ise_by_uuid     (PanelAgentSlotStringBool          *slot);
901
902     /**
903      * @brief Signal: Start an ise with the speficied name
904      *
905      * slot prototype: void set_active_ise_by_name (const String& name);
906      * - name -- the name of the ise object
907      */
908     Connection signal_connect_set_active_ise_by_name     (PanelAgentSlotString              *slot);
909
910     /**
911      * @brief Signal: Focus in panel.
912      *
913      * slot prototype: void focus_in (void);
914      */
915     Connection signal_connect_focus_in                   (PanelAgentSlotVoid                *slot);
916
917     /**
918      * @brief Signal: Focus out panel.
919      *
920      * slot prototype: void focus_out (void);
921      */
922     Connection signal_connect_focus_out                  (PanelAgentSlotVoid                *slot);
923
924     /**
925      * @brief Signal: Get the list of ise name.
926      *
927      * slot prototype: bool get_ise_list (std::vector<String> &);
928      */
929     Connection signal_connect_get_ise_list               (PanelAgentSlotBoolStringVector    *slot);
930
931     /**
932      * @brief Signal: Get the list of selected language name.
933      *
934      * slot prototype: void get_language_list (std::vector<String> &);
935      */
936     Connection signal_connect_get_language_list          (PanelAgentSlotStringVector        *slot);
937
938     /**
939      * @brief Signal: Get the all languages name.
940      *
941      * slot prototype: void get_all_language (std::vector<String> &);
942      */
943     Connection signal_connect_get_all_language           (PanelAgentSlotStringVector        *slot);
944     /**
945      * @brief Signal: Get the language list of a specified ise.
946      *
947      * slot prototype: void get_ise_language (char *, std::vector<String> &);
948      */
949     Connection signal_connect_get_ise_language           (PanelAgentSlotStrStringVector     *slot);
950
951     /**
952      * @brief Signal: Set the isf language.
953      *
954      * slot prototype: void get_ise_language (char *, std::vector<String> &);
955      */
956     Connection signal_connect_set_isf_language           (PanelAgentSlotString              *slot);
957
958     /**
959      * @brief Signal: Get the ise information by uuid.
960      *
961      * slot prototype: bool get_ise_info_by_uuid (const String &, ISE_INFO &);
962      */
963     Connection signal_connect_get_ise_info_by_uuid       (PanelAgentSlotStringISEINFO       *slot);
964
965     /**
966      * @brief Signal: Get the ise information by name.
967      *
968      * slot prototype: bool get_ise_info_by_name (const String &, ISE_INFO &);
969      */
970     Connection signal_connect_get_ise_info_by_name       (PanelAgentSlotStringISEINFO       *slot);
971
972     /**
973      * @brief Signal: send key event in panel.
974      *
975      * slot prototype: void send_key_event (const KeyEvent &);
976      */
977     Connection signal_connect_send_key_event             (PanelAgentSlotKeyEvent            *slot);
978
979     /**
980      * @brief Signal: A transaction is started.
981      *
982      * This signal infers that the Panel should disable update before this transaction finishes.
983      *
984      * slot prototype: void signal_connect_transaction_start (void);
985      */
986     Connection signal_connect_transaction_start          (PanelAgentSlotVoid                *slot);
987
988     /**
989      * @brief Signal: Accept connection for this PanelAgent.
990      *
991      * slot prototype: void accept_connection (int fd);
992      * - fd -- the file description for connection
993      */
994     Connection signal_connect_accept_connection          (PanelAgentSlotInt                 *slot);
995
996     /**
997      * @brief Signal: Close connection for this PanelAgent.
998      *
999      * slot prototype: void close_connection (int fd);
1000      * - fd -- the file description for connection
1001      */
1002     Connection signal_connect_close_connection           (PanelAgentSlotInt                 *slot);
1003
1004     /**
1005      * @brief Signal: Exit application for this PanelAgent.
1006      *
1007      * slot prototype: void app_exit (void);
1008      */
1009     Connection signal_connect_exit                       (PanelAgentSlotVoid                *slot);
1010
1011     /**
1012      * @brief Signal: A transaction is finished.
1013      *
1014      * This signal will get emitted when a transaction is finished. This implys to re-enable
1015      * panel GUI update
1016      *
1017      * slot prototype: void signal_connect_transaction_end (void);
1018      */
1019     Connection signal_connect_transaction_end            (PanelAgentSlotVoid                *slot);
1020
1021     /**
1022      * @brief Signal: Lock the exclusive lock for this PanelAgent.
1023      *
1024      * The panel program should provide a thread lock and hook a slot into this signal to lock it.
1025      * PanelAgent will use this lock to ensure the data integrity.
1026      *
1027      * slot prototype: void lock (void);
1028      */
1029     Connection signal_connect_lock                       (PanelAgentSlotVoid                *slot);
1030
1031     /**
1032      * @brief Signal: Unlock the exclusive lock for this PanelAgent.
1033      *
1034      * slot prototype: void unlock (void);
1035      */
1036     Connection signal_connect_unlock                     (PanelAgentSlotVoid                *slot);
1037 };
1038
1039 /**  @} */
1040
1041 } /* namespace scim */
1042
1043 #endif /* __SCIM_PANEL_AGENT_H */
1044
1045 /*
1046 vi:ts=4:nowrap:ai:expandtab
1047 */
1048