comparison src/bridge/bridge_constructor/bridge_template.ini @ 773:eac23b1aad90

core: dynamics menus refactoring: - menu now use generic callback system, with extra data - asyncMenuCall is removed in favor of launchAction - menu_id (== callback_id) is used to identify menu instead of category/name/type tuple - i18n is managed throught deferred translation, and returned with _i18n suffix e.g.: menu (D_('File'), D_('Open')): (u'File', u'Open') is menu_path, (u'Fichier', u'Ouvrir') is french menu_path_i18n. - type actually can have the following values: - NORMAL: classical menu - JID_CONTEXT: contextual menu, used with any jid - ROSTER_JID_CONTEXT: like JID_CONTEXT, but restricted to jids in roster. - ROSTER_GROUP_CONTEXT: contextual menu, use with groups - security_limit is used, in the same way as for parameters - when using importMenu, callback can be an actual callback, or one already registered with registerCallback
author Goffi <goffi@goffi.org>
date Sun, 29 Dec 2013 17:10:14 +0100
parents 93bd868b8fb6
children 5642939d254e
comparison
equal deleted inserted replaced
772:dd07fc737d6c 773:eac23b1aad90
1 [DEFAULT] 1 [DEFAULT]
2 doc_profile=profile: Name of the profile. 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. 3 doc_profile_key=profile_key: Profile key which can be either a magic (eg: @DEFAULT@) or the name of an existing profile.
4 doc_security_limit=security_limit: -1 means no security then the higher the most secure
4 5
5 ;signals 6 ;signals
6 7
7 [connected] 8 [connected]
8 type=signal 9 type=signal
408 param_4_default="@DEFAULT@" 409 param_4_default="@DEFAULT@"
409 doc=Change a parameter 410 doc=Change a parameter
410 doc_param_0=name: Name of the parameter to change 411 doc_param_0=name: Name of the parameter to change
411 doc_param_1=value: New Value of the parameter 412 doc_param_1=value: New Value of the parameter
412 doc_param_2=category: Category of the parameter to change 413 doc_param_2=category: Category of the parameter to change
413 doc_param_3=security_limit: -1 means no security then the higher the most secure 414 doc_param_3=%(doc_security_limit)s
414 doc_param_4=%(doc_profile_key)s 415 doc_param_4=%(doc_profile_key)s
415 416
416 [getParamA] 417 [getParamA]
417 type=method 418 type=method
418 category=core 419 category=core
437 param_4_default="@DEFAULT@" 438 param_4_default="@DEFAULT@"
438 doc=Helper method to get a parameter's attribute 439 doc=Helper method to get a parameter's attribute
439 doc_param_0=name: as for [setParam] 440 doc_param_0=name: as for [setParam]
440 doc_param_1=category: as for [setParam] 441 doc_param_1=category: as for [setParam]
441 doc_param_2=attribute: Name of the attribute 442 doc_param_2=attribute: Name of the attribute
442 doc_param_3=security_limit: -1 means no security then the higher the most secure 443 doc_param_3=%(doc_security_limit)s
443 doc_param_4=%(doc_profile_key)s 444 doc_param_4=%(doc_profile_key)s
444 445
445 [getParamsUI] 446 [getParamsUI]
446 async= 447 async=
447 type=method 448 type=method
449 sig_in=is 450 sig_in=is
450 sig_out=s 451 sig_out=s
451 param_0_default=-1 452 param_0_default=-1
452 param_1_default="@DEFAULT@" 453 param_1_default="@DEFAULT@"
453 doc=Return a SàT XMLUI for parameters 454 doc=Return a SàT XMLUI for parameters
454 doc_param_0=security_limit: -1 means no security then the higher the most secure 455 doc_param_0=%(doc_security_limit)s
455 doc_param_1=%(doc_profile_key)s 456 doc_param_1=%(doc_profile_key)s
456 457
457 [getParams] 458 [getParams]
458 async= 459 async=
459 type=method 460 type=method
461 sig_in=is 462 sig_in=is
462 sig_out=s 463 sig_out=s
463 param_0_default=-1 464 param_0_default=-1
464 param_1_default="@DEFAULT@" 465 param_1_default="@DEFAULT@"
465 doc=Return XML of parameters 466 doc=Return XML of parameters
466 doc_param_0=security_limit: -1 means no security then the higher the most secure 467 doc_param_0=%(doc_security_limit)s
467 doc_param_1=%(doc_profile_key)s 468 doc_param_1=%(doc_profile_key)s
468 469
469 [getParamsForCategory] 470 [getParamsForCategory]
470 async= 471 async=
471 type=method 472 type=method
474 sig_out=s 475 sig_out=s
475 param_1_default=-1 476 param_1_default=-1
476 param_2_default="@DEFAULT@" 477 param_2_default="@DEFAULT@"
477 doc=Return a xml of all params in a category 478 doc=Return a xml of all params in a category
478 doc_param_0=category: Category to get 479 doc_param_0=category: Category to get
479 doc_param_1=security_limit: -1 means no security then the higher the most secure 480 doc_param_1=%(doc_security_limit)s
480 doc_param_2=%(doc_profile_key)s 481 doc_param_2=%(doc_profile_key)s
481 482
482 [getParamsCategories] 483 [getParamsCategories]
483 type=method 484 type=method
484 category=core 485 category=core
574 - size: end position 575 - size: end position
575 576
576 [getMenus] 577 [getMenus]
577 type=method 578 type=method
578 category=core 579 category=core
579 sig_in= 580 sig_in= si
580 sig_out=a(sss) 581 sig_out=a(ssasas)
581 doc=Get all additional menus 582 doc=Get all additional menus
583 doc_param_0=language: language in which the menu should be translated (empty string for default)
584 doc_param_1=security_limit: %(doc_security_limit)s
582 doc_return=list of tuple with the following value: 585 doc_return=list of tuple with the following value:
586 - menu_id: menu id (same as callback id)
583 - menu_type: Type which can be: 587 - menu_type: Type which can be:
584 * NORMAL: Classical application menu 588 * NORMAL: Classical application menu
585 - category: Category of the menu 589 - menu_path: raw path of the menu
586 - name: Name of the menu 590 - menu_path_i18n: translated path of the menu
587 591
588 [getMenuHelp] 592 [getMenuHelp]
589 type=method 593 type=method
590 category=core 594 category=core
591 sig_in=sss 595 sig_in=ss
592 sig_out=s 596 sig_out=s
593 param_2="NORMAL" 597 param_2="NORMAL"
594 doc=Get help information for a menu 598 doc=Get help information for a menu
595 doc_param_0=category: Category of the menu 599 doc_param_0=menu_id: id of the menu (same as callback_id)
596 doc_param_1=name: Name of the menu 600 doc_param_1=language: language in which the menu should be translated (empty string for default)
597 doc_param_2=menu_type: Type of the menu as in [getMenus] return value 601 doc_return=Translated help string
598 doc_return=Help string 602
599
600 [asyncCallMenu]
601 async=
602 type=method
603 category=core
604 sig_in=ssss
605 sig_out=s
606 doc=Execute action associated with a menu
607 doc_param_0=category: as in [getMenuHelp]
608 doc_param_1=name: as in [getMenuHelp]
609 doc_param_2=menu_type: as in [getMenuHelp]
610 doc_param_3=%(doc_profile_key)s
611 doc_return=return a XMLUI or empty string if it is a one shot action