Mercurial > libervia-backend
comparison src/bridge/bridge_template.ini @ 266:c4b84a2d2ad1
bridge: constructor and template improved, documentation added
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 24 Jan 2011 17:47:45 +0100 |
parents | b5f1f3dc9ac6 |
children |
comparison
equal
deleted
inserted
replaced
265:b5f1f3dc9ac6 | 266:c4b84a2d2ad1 |
---|---|
1 [DEFAULT] | |
2 doc_profile=profile: Name of the profile. | |
3 doc_profile_key=profile_key: Profile key which can be either a magic (eg: @DEFAULT@) or the name of an existing profile. | |
4 | |
1 ;signals | 5 ;signals |
2 | 6 |
3 [connected] | 7 [connected] |
4 type=signal | 8 type=signal |
5 category=communication | 9 category=communication |
6 sig_in=s | 10 sig_in=s |
7 doc=Connection is done | 11 doc=Connection is done |
12 doc_param_0=%(doc_profile)s | |
8 | 13 |
9 [disconnected] | 14 [disconnected] |
10 type=signal | 15 type=signal |
11 category=communication | 16 category=communication |
12 sig_in=s | 17 sig_in=s |
13 doc=Connection is finished or lost | 18 doc=Connection is finished or lost |
19 doc_param_0=%(doc_profile)s | |
14 | 20 |
15 [connection_error] | 21 [connection_error] |
16 type=signal | 22 type=signal |
17 category=communication | 23 category=communication |
18 sig_in=ss | 24 sig_in=ss |
19 doc=Something went wront with the connection | 25 doc=Something went wront with the connection |
26 doc_param_0=error_type: Why the connection got wrong, can be | |
27 - AUTH_ERROR: Authentification error | |
28 doc_param_1=%(doc_profile)s | |
20 | 29 |
21 [newContact] | 30 [newContact] |
22 type=signal | 31 type=signal |
23 category=communication | 32 category=communication |
24 sig_in=sa{ss}ass | 33 sig_in=sa{ss}ass |
25 doc=New contact received in roster | 34 doc=New contact received in roster |
35 doc_param_0=contact: JID from who the message is comming | |
36 doc_param_1=attributes: Dictionary of attributes where keys are: | |
37 - name: name of the contact | |
38 - to: "True" if the contact give its presence information to us | |
39 - from: "True" if contact is registred to our presence information | |
40 - ask: "True" is subscription is pending | |
41 doc_param_2=groups: Roster's groups where the contact is | |
42 doc_param_3=%(doc_profile)s | |
26 | 43 |
27 [newMessage] | 44 [newMessage] |
28 type=signal | 45 type=signal |
29 category=communication | 46 category=communication |
30 sig_in=sssss | 47 sig_in=sssss |
31 doc=A message has been received | 48 doc=A message has been received |
49 doc_param_0=from_jid: JID where the message is comming from | |
50 doc_param_1=message: Message itself | |
51 doc_param_2=mess_type: Type of the message (cf RFC 3921 #2.1.1) | |
52 doc_param_3=to_jid: JID where the message must be sent | |
53 doc_param_4=%(doc_profile)s | |
32 | 54 |
33 [newAlert] | 55 [newAlert] |
34 type=signal | 56 type=signal |
35 category=communication | 57 category=communication |
36 sig_in=ssss | 58 sig_in=ssss |
37 doc=A message has been received | 59 doc=A new alert happened |
60 doc_param_0=message: Body of the alert | |
61 doc_param_1=title: Title of the alert | |
62 doc_param_2=alert_type: Type of the alert, can be: | |
63 - INFO: Informative message | |
64 - ERROR: something went wrong | |
65 doc_param_3=%(doc_profile)s | |
38 | 66 |
39 [presenceUpdate] | 67 [presenceUpdate] |
40 type=signal | 68 type=signal |
41 category=communication | 69 category=communication |
42 sig_in=ssia{ss}s | 70 sig_in=ssia{ss}s |
43 doc=Somebody changed his presence informations. | 71 doc=Somebody changed his presence informations. |
72 doc_param_0=entity: JID from which we have presence informations | |
73 doc_param_1=show: availability status (see RFC 3921 #2.2.2.1) | |
74 doc_param_2=priority: Priority level of the ressource (see RFC 3921 #2.2.2.3) | |
75 doc_param_3=statuses: Natural language description of the availability status (see RFC 3921 #2.2.2.2) | |
76 doc_param_4=%(doc_profile)s | |
44 | 77 |
45 [subscribe] | 78 [subscribe] |
46 type=signal | 79 type=signal |
47 category=communication | 80 category=communication |
48 sig_in=sss | 81 sig_in=sss |
49 doc=Somebody wants to be added in roster list | 82 doc=Somebody wants to be added in roster |
83 doc_param_0=sub_type: Subscription states (see RFC 3921 #9) | |
84 doc_param_1=entity: JID from which the subscription is coming | |
85 doc_param_2=%(doc_profile)s | |
50 | 86 |
51 [paramUpdate] | 87 [paramUpdate] |
52 type=signal | 88 type=signal |
53 category=communication | 89 category=communication |
54 sig_in=ssss | 90 sig_in=ssss |
55 doc=A parameter has been changed | 91 doc=A parameter has been changed |
92 doc_param_0=name: Name of the updated parameter | |
93 doc_param_1=value: New value of the parameter | |
94 doc_param_2=category: Category of the updated parameter | |
95 doc_param_3=%(doc_profile)s | |
56 | 96 |
57 [contactDeleted] | 97 [contactDeleted] |
58 type=signal | 98 type=signal |
59 category=communication | 99 category=communication |
60 sig_in=ss | 100 sig_in=ss |
61 doc=A contact has been supressed from roster list | 101 doc=A contact has been supressed from roster |
102 doc_param_0=entity: JID of the contact removed from roster | |
103 doc_param_1=%(doc_profile)s | |
62 | 104 |
63 [askConfirmation] | 105 [askConfirmation] |
64 type=signal | 106 type=signal |
65 category=request | 107 category=request |
66 sig_in=ssa{ss} | 108 sig_in=ssa{ss} |
67 doc=A confirmation is needed for an action | 109 doc=A confirmation is needed for an action |
110 doc_param_0=conf_type: Type of the confirmation, can be: | |
111 - YES/NO: A question which need a yes or no answer | |
112 - FILE_TRANSFERT: A confirmation is needed before transfering a file | |
113 doc_param_1=id: Id of the confirmation query | |
114 doc_param_2=data: conf_type dependent data | |
68 | 115 |
69 [actionResult] | 116 [actionResult] |
70 type=signal | 117 type=signal |
71 category=request | 118 category=request |
72 sig_in=ssa{ss} | 119 sig_in=ssa{ss} |
73 doc=Requested result of an action | 120 doc=Requested result of an action |
121 doc_param_0=answer_type: Type of the answer, can be: | |
122 - SUPPRESS: The action is managed, the id MUST be removed from queue | |
123 - XMLUI: A SàT XMLUI interface is sent | |
124 - ERROR: Something went wrong when doing the action | |
125 - RESULT: General result, interpretation depend of the action | |
126 doc_param_1=id: Id of the action | |
127 doc_param_2=data: answer_type specific data | |
74 | 128 |
75 [actionResultExt] | 129 [actionResultExt] |
76 type=signal | 130 type=signal |
77 category=request | 131 category=request |
78 sig_in=ssa{sa{ss}} | 132 sig_in=ssa{sa{ss}} |
79 doc=Requested result of an action (Extended) | 133 doc=Requested result of an action (Extended) |
134 doc_param_0=answer_type: Same as for [actionResult] but with the following additional one: | |
135 - DICT_DICT: As RESULT, but returned as a dictionary of dictionary | |
136 doc_param_1=id: Id of the action | |
137 doc_param_2=data: answer_type specific data | |
80 | 138 |
81 [updatedValue] | 139 [updatedValue] |
82 type=signal | 140 type=signal |
83 category=request | 141 category=request |
84 sig_in=sa{ss} | 142 sig_in=sa{ss} |
85 doc=A value has been updated | 143 doc=A value has been updated |
144 doc_param_0=name: Name of the updated value | |
145 doc_param_1=value: New value | |
86 | 146 |
87 ;methods | 147 ;methods |
88 | 148 |
89 [getVersion] | 149 [getVersion] |
90 type=method | 150 type=method |
97 type=method | 157 type=method |
98 category=request | 158 category=request |
99 sig_in=s | 159 sig_in=s |
100 sig_out=s | 160 sig_out=s |
101 doc=Get real profile name from profile key | 161 doc=Get real profile name from profile key |
162 doc_param_0=%(doc_profile_key)s | |
102 | 163 |
103 [getProfilesList] | 164 [getProfilesList] |
104 type=method | 165 type=method |
105 category=request | 166 category=request |
106 sig_in= | 167 sig_in= |
111 type=method | 172 type=method |
112 category=request | 173 category=request |
113 sig_in=s | 174 sig_in=s |
114 sig_out=i | 175 sig_out=i |
115 doc=Create a new profile | 176 doc=Create a new profile |
177 doc_param_0=%(doc_profile)s | |
178 doc_return=status of the creation: | |
179 - 0: Profile created | |
180 - 1: The profile name already exists | |
116 | 181 |
117 [deleteProfile] | 182 [deleteProfile] |
118 type=method | 183 type=method |
119 category=request | 184 category=request |
120 sig_in=s | 185 sig_in=s |
121 sig_out=i | 186 sig_out=i |
122 doc=Delete a profile | 187 doc=Delete a profile |
188 doc_param_0=%(doc_profile)s | |
189 doc_return=status of the deletion: | |
190 - 0: Profile deleted | |
191 - 1: The profile doesn't exists | |
123 | 192 |
124 [registerNewAccount] | 193 [registerNewAccount] |
194 deprecated= | |
125 type=method | 195 type=method |
126 category=communication | 196 category=communication |
127 sig_in=sssi | 197 sig_in=sssi |
128 sig_out=s | 198 sig_out=s |
199 param_3_default=5222 | |
129 doc=Register a new account on a given server | 200 doc=Register a new account on a given server |
201 doc_param_0=login: login of the account | |
202 doc_param_1=password: password of the account | |
203 doc_param_2=host: host of the server to register to | |
204 doc_param_3=port: port of the server to register to | |
130 | 205 |
131 [connect] | 206 [connect] |
132 type=method | 207 type=method |
133 category=communication | 208 category=communication |
134 sig_in=s | 209 sig_in=s |
135 sig_out= | 210 sig_out= |
136 param_0_default="@DEFAULT@" | 211 param_0_default="@DEFAULT@" |
137 doc=Connect a profile | 212 doc=Connect a profile |
213 doc_param_0=%(doc_profile_key)s | |
138 | 214 |
139 [disconnect] | 215 [disconnect] |
140 type=method | 216 type=method |
141 category=communication | 217 category=communication |
142 sig_in=s | 218 sig_in=s |
143 sig_out= | 219 sig_out= |
144 param_0_default="@DEFAULT@" | 220 param_0_default="@DEFAULT@" |
145 doc=Disconnect a profile | 221 doc=Disconnect a profile |
222 doc_param_0=%(doc_profile_key)s | |
146 | 223 |
147 [isConnected] | 224 [isConnected] |
148 type=method | 225 type=method |
149 category=communication | 226 category=communication |
150 sig_in= | 227 sig_in=s |
151 sig_out=b | 228 sig_out=b |
152 param_0_default="@DEFAULT@" | 229 param_0_default="@DEFAULT@" |
153 doc=Tell if a profile is connected | 230 doc=Tell if a profile is connected |
231 doc_param_0=%(doc_profile_key)s | |
154 | 232 |
155 [getContacts] | 233 [getContacts] |
156 type=method | 234 type=method |
157 category=communication | 235 category=communication |
158 sig_in=s | 236 sig_in=s |
159 sig_out=a(sa{ss}as) | 237 sig_out=a(sa{ss}as) |
160 param_0_default="@DEFAULT@" | 238 param_0_default="@DEFAULT@" |
161 doc=Return informations about all contacts | 239 doc=Return informations about all contacts |
240 doc_param_0=%(doc_profile_key)s | |
241 doc_return=array of tuples with the following values: | |
242 - JID of the contact | |
243 - list of attributes as in [newContact] | |
244 - groups where the contact is | |
162 | 245 |
163 [getPresenceStatus] | 246 [getPresenceStatus] |
164 type=method | 247 type=method |
165 category=communication | 248 category=communication |
166 sig_in=s | 249 sig_in=s |
167 sig_out=a{sa{s(sia{ss})}} | 250 sig_out=a{sa{s(sia{ss})}} |
168 param_0_default="@DEFAULT@" | 251 param_0_default="@DEFAULT@" |
169 doc=Return presence informations of all contacts | 252 doc=Return presence informations of all contacts |
253 doc_param_0=%(doc_profile_key)s | |
254 doc_return=Dict of presence with bare JID of contact as key, and value as follow: | |
255 A dict where key is the resource and the value is a tuple with (show, priority, statuses) as for [presenceUpdate] | |
170 | 256 |
171 [getWaitingSub] | 257 [getWaitingSub] |
172 type=method | 258 type=method |
173 category=communication | 259 category=communication |
174 sig_in=s | 260 sig_in=s |
175 sig_out=a{ss} | 261 sig_out=a{ss} |
176 param_0_default="@DEFAULT@" | 262 param_0_default="@DEFAULT@" |
177 doc=Get subscription requests in queue | 263 doc=Get subscription requests in queue |
264 doc_param_0=%(doc_profile_key)s | |
265 doc_return=Dict where contact JID is the key, and value is the subscription type | |
178 | 266 |
179 [sendMessage] | 267 [sendMessage] |
180 type=method | 268 type=method |
181 category=communication | 269 category=communication |
182 sig_in=sssss | 270 sig_in=sssss |
183 sig_out= | 271 sig_out= |
272 param_2_default="" | |
273 param_3_default="chat" | |
184 param_4_default="@DEFAULT@" | 274 param_4_default="@DEFAULT@" |
185 doc=Send a message | 275 doc=Send a message |
276 doc_param_0=to_jid: JID of the recipient | |
277 doc_param_1=message: body of the message | |
278 doc_param_2=subject: Subject of the message ("" if no subject) | |
279 doc_param_3=mess_type: Type of the message (cf RFC 3921 #2.1.1) | |
280 doc_param_4=%(doc_profile_key)s | |
186 | 281 |
187 [setPresence] | 282 [setPresence] |
188 type=method | 283 type=method |
189 category=communication | 284 category=communication |
190 sig_in=ssia{ss}s | 285 sig_in=ssia{ss}s |
191 sig_out= | 286 sig_out= |
287 param_0_default="" | |
288 param_1_default="" | |
289 param_2_default=0 | |
290 param_3_default={} | |
192 param_4_default="@DEFAULT@" | 291 param_4_default="@DEFAULT@" |
193 doc=Set presence information for the profile | 292 doc=Set presence information for the profile |
293 doc_param_0=to_jid: the JID to who we send the presence data (emtpy string for broadcast) | |
294 doc_param_1=show: as for [presenceUpdate] | |
295 doc_param_2=priority: as for [presenceUpdate] | |
296 doc_param_3=statuses: as for [presenceUpdate] | |
297 doc_param_4=%(doc_profile_key)s | |
194 | 298 |
195 [subscription] | 299 [subscription] |
196 type=method | 300 type=method |
197 category=communication | 301 category=communication |
198 sig_in=sss | 302 sig_in=sss |
199 sig_out= | 303 sig_out= |
200 param_2_default="@DEFAULT@" | 304 param_2_default="@DEFAULT@" |
201 doc=Send subscription request/answer to a contact | 305 doc=Send subscription request/answer to a contact |
306 doc_param_0=sub_type: as for [subscribe] | |
307 doc_param_1=entity: as for [subscribe] | |
308 doc_param_2=%(doc_profile_key)s | |
202 | 309 |
203 [setParam] | 310 [setParam] |
204 type=method | 311 type=method |
205 category=communication | 312 category=communication |
206 sig_in=ssss | 313 sig_in=ssss |
207 sig_out= | 314 sig_out= |
208 param_3_default="@DEFAULT@" | 315 param_3_default="@DEFAULT@" |
209 doc=Change a parameter | 316 doc=Change a parameter |
317 doc_param_0=name: Name of the parameter to change | |
318 doc_param_1=value: New Value of the parameter | |
319 doc_param_2=category: Category of the parameter to change | |
320 doc_param_3=%(doc_profile_key)s | |
210 | 321 |
211 [getParamA] | 322 [getParamA] |
212 type=method | 323 type=method |
213 category=communication | 324 category=communication |
214 sig_in=sss | 325 sig_in=sss |
215 sig_out=s | 326 sig_out=s |
216 param_2_default="@DEFAULT@" | 327 param_2_default="@DEFAULT@" |
217 doc=Helper method to get a parameter's attribute | 328 doc=Helper method to get a parameter's attribute |
329 doc_param_0=name: as for [setParam] | |
330 doc_param_1=category: as for [setParam] | |
331 doc_param_2=%(doc_profile_key)s | |
218 | 332 |
219 [getParamsUI] | 333 [getParamsUI] |
220 type=method | 334 type=method |
221 category=communication | 335 category=communication |
222 sig_in=s | 336 sig_in=s |
223 sig_out=s | 337 sig_out=s |
224 param_0_default="@DEFAULT@" | 338 param_0_default="@DEFAULT@" |
225 doc=Return a SàT XMLUI for parameters | 339 doc=Return a SàT XMLUI for parameters |
340 doc_param_0=%(doc_profile_key)s | |
226 | 341 |
227 [getParams] | 342 [getParams] |
228 type=method | 343 type=method |
229 category=communication | 344 category=communication |
230 sig_in=s | 345 sig_in=s |
231 sig_out=s | 346 sig_out=s |
232 param_0_default="@DEFAULT@" | 347 param_0_default="@DEFAULT@" |
233 doc=Return XML of parameters | 348 doc=Return XML of parameters |
349 doc_param_0=%(doc_profile_key)s | |
234 | 350 |
235 [getParamsForCategory] | 351 [getParamsForCategory] |
236 type=method | 352 type=method |
237 category=communication | 353 category=communication |
238 sig_in=ss | 354 sig_in=ss |
239 sig_out=s | 355 sig_out=s |
240 param_1_default="@DEFAULT@" | 356 param_1_default="@DEFAULT@" |
241 doc=Return a xml of all params in a category | 357 doc=Return a xml of all params in a category |
358 doc_param_0=category: Category to get | |
359 doc_param_1=%(doc_profile_key)s | |
242 | 360 |
243 [getParamsCategories] | 361 [getParamsCategories] |
244 type=method | 362 type=method |
245 category=communication | 363 category=communication |
246 sig_in= | 364 sig_in= |
247 sig_out=as | 365 sig_out=as |
248 doc=Get all categories currently existing in parameters | 366 doc=Get all categories currently existing in parameters |
367 doc_return=list of categories | |
249 | 368 |
250 [getHistory] | 369 [getHistory] |
251 type=method | 370 type=method |
252 category=communication | 371 category=communication |
253 sig_in=ssi | 372 sig_in=ssi |
254 sig_out=a{i(ss)} | 373 sig_out=a{i(ss)} |
255 doc=Get history of a communication between two entities | 374 doc=Get history of a communication between two entities |
375 doc_param_0=from_jid: source JID | |
376 doc_param_1=to_jid: dest JID | |
377 doc_param_2=size: size of the history (0 for the whole history) | |
378 doc_return=Dict where key is timestamp (seconds this the Epoch), and value is a tuple (from_jid, to_jid) | |
256 | 379 |
257 [addContact] | 380 [addContact] |
258 type=method | 381 type=method |
259 category=communication | 382 category=communication |
260 sig_in=ss | 383 sig_in=ss |
261 sig_out= | 384 sig_out= |
262 param_1_default="@DEFAULT@" | 385 param_1_default="@DEFAULT@" |
263 doc=Add a contact to profile's roster list | 386 doc=Add a contact to profile's roster |
387 doc_param_0=entity: JID to add to roster | |
388 doc_param_1=%(doc_profile_key)s | |
264 | 389 |
265 [delContact] | 390 [delContact] |
266 type=method | 391 type=method |
267 category=communication | 392 category=communication |
268 sig_in=ss | 393 sig_in=ss |
269 sig_out= | 394 sig_out= |
270 param_1_default="@DEFAULT@" | 395 param_1_default="@DEFAULT@" |
271 doc=Remove a contact from profile's roster list | 396 doc=Remove a contact from profile's roster |
397 doc_param_0=entity: JID to remove from roster | |
398 doc_param_1=%(doc_profile_key)s | |
272 | 399 |
273 [launchAction] | 400 [launchAction] |
274 type=method | 401 type=method |
275 category=request | 402 category=request |
276 sig_in=sa{ss}s | 403 sig_in=sa{ss}s |
277 sig_out=s | 404 sig_out=s |
278 param_2_default="@DEFAULT@" | 405 param_2_default="@DEFAULT@" |
279 doc=Launch a specific action | 406 doc=Launch a specific action |
407 doc_param_0=action_type: type of the action which can be: | |
408 - button: A button is pushed | |
409 doc_param_1=data: action_type dependant data | |
410 doc_param_2=%(doc_profile_key)s | |
280 | 411 |
281 [confirmationAnswer] | 412 [confirmationAnswer] |
282 type=method | 413 type=method |
283 category=request | 414 category=request |
284 sig_in=sba{ss} | 415 sig_in=sba{ss} |
285 sig_out= | 416 sig_out= |
286 doc=Give answer to a confirmation request | 417 doc=Give answer to a confirmation request |
418 doc_param_0=id: id of the confirmation request | |
419 doc_param_1=accepted: True if the action is confirmed | |
420 doc_param_2=data: action specific data | |
287 | 421 |
288 [getProgress] | 422 [getProgress] |
289 type=method | 423 type=method |
290 category=request | 424 category=request |
291 sig_in=s | 425 sig_in=s |
292 sig_out=a{ss} | 426 sig_out=a{ss} |
293 doc=Get progress information for an action | 427 doc=Get progress information for an action |
428 doc_param_0=id: id of the progression status | |
429 doc_return=dict with progress information: | |
430 - position: current position | |
431 - size: end position | |
294 | 432 |
295 [getMenus] | 433 [getMenus] |
296 type=method | 434 type=method |
297 category=request | 435 category=request |
298 sig_in= | 436 sig_in= |
299 sig_out=a(sss) | 437 sig_out=a(sss) |
300 doc=Get all additional menus | 438 doc=Get all additional menus |
439 doc_return=list of tuple with the following value: | |
440 - category: Category of the menu | |
441 - name: Name of the menu | |
442 - menu_type: Type which can be: | |
443 * NORMAL: Classical application menu | |
301 | 444 |
302 [getMenuHelp] | 445 [getMenuHelp] |
303 type=method | 446 type=method |
304 category=request | 447 category=request |
305 sig_in=sss | 448 sig_in=sss |
306 sig_out=s | 449 sig_out=s |
307 param_2="NORMAL" | 450 param_2="NORMAL" |
308 doc=Get help informationd for a menu | 451 doc=Get help information for a menu |
452 doc_param_0=category: Category of the menu | |
453 doc_param_1=name: Name of the menu | |
454 doc_param_2=menu_type: Type of the menu as in [getMenus] return value | |
455 doc_return=Help string | |
309 | 456 |
310 [callMenu] | 457 [callMenu] |
311 type=method | 458 type=method |
312 category=request | 459 category=request |
313 sig_in=ssss | 460 sig_in=ssss |
314 sig_out=s | 461 sig_out=s |
315 doc=Execute action associated with a menu | 462 doc=Execute action associated with a menu |
316 | 463 doc_param_0=category: as in [getMenuHelp] |
464 doc_param_1=name: as in [getMenuHelp] | |
465 doc_param_2=menu_type: as in [getMenuHelp] | |
466 doc_param_3=%(doc_profile_key)s | |
467 doc_return=return an actionId or the empty string if something went wrong |