Fix memory leak issues
[platform/core/uifw/anthy.git] / doc / protocol.txt
1 EGG ¤È¤ÎÄÌ¿®¤Î¥×¥í¥È¥³¥ë
2  anthy-agent¥³¥Þ¥ó¥É¤Ë--egg¥ª¥×¥·¥ç¥ó¤òÀßÄꤷ¤Æµ¯Æ°¤¹¤ë¤³¤È¤ÇÍøÍѲÄǽ¤Ç¤¹¡£
3
4 °§»¢
5         greeting = server-name " (" version ") " options " :" string CRLF
6         server-name = string
7         version = 1*(DIGIT)
8         options = "[" string 1*(", " string ) "]"
9
10 Command Semantics and Syntax
11
12         context-desc = 1*( DIGIT)
13                 ; context descriptor
14
15         seg-no  = 1*(DIGIT)
16                 ; segment number (0 origin)
17
18         candidate-offset = 1*(DIGIT)
19
20         max-candidates = 1*(DIGIT)
21
22         cand-no = 1*(DIGIT)
23                 ; candidate number (0 origin)
24
25         string = 1*<any CHAR excluding control characters>
26
27         error = "-ERR" SP error-code SP string CRLF
28
29         error-code = 1*( DIGIT )
30
31         success-with-number = "+OK" SP number CRLF
32
33         number = 1*( DIGIT )
34
35         success = "+OK" CRLF
36
37         segments = "+DATA" SP seg-no SP number-of-segments-removed SP
38                    number-of-segments-inserted CRLF
39                    1*( number-of-candidates SP converted SP yomi CRLF )
40                    CRLF
41
42         number-of-replaced = 1*( DIGIT )
43
44         offset = 1*( DIGIT )
45
46         number-of-segments = 1*( DIGIT )
47
48         converted = string
49
50         yomi = string
51
52         candidates = "+DATA" SP offset SP number-of-candidates CRLF
53                    1*( converted CRLF )
54                    CRLF
55
56         number-of-candidates = 1*( DIGIT )
57
58
59 1. ¥³¥ó¥Æ¥¯¥¹¥ÈÀ¸À®
60   Command:
61         command-new-context = "NEW-CONTEXT" parameters CRLF
62         parameters = *( SP expression )
63                    ; e.g. : Encoding specification, etc.
64         expression = var "=" value
65         var = 1*(ALPHA) 1*(ALPHA / DIGIT)
66         value = string
67                    ; INPUT=UTF-8 OUTPUT=UTF-8
68                    ; INPUT=#106 OUTPUT=#106
69                    ; INPUT=EUC-JP OUTPUT=EUC-JP
70                    ; INPUT=#18 OUTPUT=#18
71
72   Reply:
73         reply-of-new-context = error
74                              / success-with-number
75                              ; number: context-descriptor
76
77 2. ¥³¥ó¥Æ¥¯¥¹¥È²òÊü
78   Command:
79         command-release-context = "RELEASE-CONTEXT" SP context-desc CRLF
80
81   Reply:
82         reply-of-release-context = error / success
83
84 3. ÊÑ´¹
85   Command:
86         command-convert = "CONVERT" SP context-desc SP input CRLF
87         input = string
88
89   Reply:
90         reply-of-convert = error / segments
91
92 4. ÊÑ´¹·ë²Ì¥³¥ß¥Ã¥È/¥­¥ã¥ó¥»¥ë
93   Command:
94         command-commit-or-cancel = "COMMIT" SP context-desc SP do-cancel CRLF
95         do-cancel = "0" / "1"
96                   ;  0 ¤Î¤È¤­³ÎÄê¡£¤½¤Î¾¤Î¤È¤­¥­¥ã¥ó¥»¥ë¡£
97   Reply:
98         reply-of-commit-or-cancel = error / success
99
100 5.¸õÊä¼èÆÀ
101   Command:
102         command-get-candidates = "GET-CANDIDATES" SP context-desc SP
103                                   seg-no SP candidate-offset SP
104                                   max-candidates CRLF
105
106   Reply:
107         reply-of-get-candidates = error / candidates
108
109 6. ¸õÊä³ÎÄê
110   Command:
111         command-select-candidate = "SELECT-CANDIDATE" SP context-desc SP
112                                    seg-no SP cand-no CRLF
113   Reply:
114         reply-of-select-candidate = error / success / segments
115
116 7. Ê¸Àá¿­½Ì
117   Command:
118         command-resize-segment = "RESIZE-SEGMENT" SP context-desc SP
119                                   seg-no SP inc-dec CRLF
120         inc-dec = "0" / "1"
121                 ; "0" means increment, while "1" means decrement
122   Reply:
123         reply-of-resize-segment = error / segments
124
125 8. ½ªÎ»
126   Command:
127         command-quit = "QUIT" CRLF
128   Reply:
129         no reply, connection will be closed by server.
130 --