Mercurial > libervia-backend
diff src/bridge/bridge_constructor/bridge_template.ini @ 267:bdcd535e179e
Bridge constructor:
- moved constructor files in src/bridge/bridge_constructor
- frontend side can now be generated
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 24 Jan 2011 21:19:11 +0100 |
parents | src/bridge/bridge_template.ini@c4b84a2d2ad1 |
children | 1d2e0dfe7114 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/bridge/bridge_constructor/bridge_template.ini Mon Jan 24 21:19:11 2011 +0100 @@ -0,0 +1,468 @@ +[DEFAULT] +doc_profile=profile: Name of the profile. +doc_profile_key=profile_key: Profile key which can be either a magic (eg: @DEFAULT@) or the name of an existing profile. + +;signals + +[connected] +type=signal +category=communication +sig_in=s +doc=Connection is done +doc_param_0=%(doc_profile)s + +[disconnected] +type=signal +category=communication +sig_in=s +doc=Connection is finished or lost +doc_param_0=%(doc_profile)s + +[connection_error] +type=signal +category=communication +sig_in=ss +doc=Something went wront with the connection +doc_param_0=error_type: Why the connection got wrong, can be + - AUTH_ERROR: Authentification error +doc_param_1=%(doc_profile)s + +[newContact] +type=signal +category=communication +sig_in=sa{ss}ass +doc=New contact received in roster +doc_param_0=contact: JID from who the message is comming +doc_param_1=attributes: Dictionary of attributes where keys are: + - name: name of the contact + - to: "True" if the contact give its presence information to us + - from: "True" if contact is registred to our presence information + - ask: "True" is subscription is pending +doc_param_2=groups: Roster's groups where the contact is +doc_param_3=%(doc_profile)s + +[newMessage] +type=signal +category=communication +sig_in=sssss +doc=A message has been received +doc_param_0=from_jid: JID where the message is comming from +doc_param_1=message: Message itself +doc_param_2=mess_type: Type of the message (cf RFC 3921 #2.1.1) +doc_param_3=to_jid: JID where the message must be sent +doc_param_4=%(doc_profile)s + +[newAlert] +type=signal +category=communication +sig_in=ssss +doc=A new alert happened +doc_param_0=message: Body of the alert +doc_param_1=title: Title of the alert +doc_param_2=alert_type: Type of the alert, can be: + - INFO: Informative message + - ERROR: something went wrong +doc_param_3=%(doc_profile)s + +[presenceUpdate] +type=signal +category=communication +sig_in=ssia{ss}s +doc=Somebody changed his presence informations. +doc_param_0=entity: JID from which we have presence informations +doc_param_1=show: availability status (see RFC 3921 #2.2.2.1) +doc_param_2=priority: Priority level of the ressource (see RFC 3921 #2.2.2.3) +doc_param_3=statuses: Natural language description of the availability status (see RFC 3921 #2.2.2.2) +doc_param_4=%(doc_profile)s + +[subscribe] +type=signal +category=communication +sig_in=sss +doc=Somebody wants to be added in roster +doc_param_0=sub_type: Subscription states (see RFC 3921 #9) +doc_param_1=entity: JID from which the subscription is coming +doc_param_2=%(doc_profile)s + +[paramUpdate] +type=signal +category=communication +sig_in=ssss +doc=A parameter has been changed +doc_param_0=name: Name of the updated parameter +doc_param_1=value: New value of the parameter +doc_param_2=category: Category of the updated parameter +doc_param_3=%(doc_profile)s + +[contactDeleted] +type=signal +category=communication +sig_in=ss +doc=A contact has been supressed from roster +doc_param_0=entity: JID of the contact removed from roster +doc_param_1=%(doc_profile)s + +[askConfirmation] +type=signal +category=request +sig_in=ssa{ss} +doc=A confirmation is needed for an action +doc_param_0=conf_type: Type of the confirmation, can be: + - YES/NO: A question which need a yes or no answer + - FILE_TRANSFERT: A confirmation is needed before transfering a file +doc_param_1=id: Id of the confirmation query +doc_param_2=data: conf_type dependent data + +[actionResult] +type=signal +category=request +sig_in=ssa{ss} +doc=Requested result of an action +doc_param_0=answer_type: Type of the answer, can be: + - SUPPRESS: The action is managed, the id MUST be removed from queue + - XMLUI: A SàT XMLUI interface is sent + - ERROR: Something went wrong when doing the action + - RESULT: General result, interpretation depend of the action +doc_param_1=id: Id of the action +doc_param_2=data: answer_type specific data + +[actionResultExt] +type=signal +category=request +sig_in=ssa{sa{ss}} +doc=Requested result of an action (Extended) +doc_param_0=answer_type: Same as for [actionResult] but with the following additional one: + - DICT_DICT: As RESULT, but returned as a dictionary of dictionary +doc_param_1=id: Id of the action +doc_param_2=data: answer_type specific data + +[updatedValue] +type=signal +category=request +sig_in=sa{ss} +doc=A value has been updated +doc_param_0=name: Name of the updated value +doc_param_1=value: New value + +;methods + +[getVersion] +type=method +category=request +sig_in= +sig_out=s +doc=Get "Salut à Toi" version + +[getProfileName] +type=method +category=request +sig_in=s +sig_out=s +param_0_default="@DEFAULT@" +doc=Get real profile name from profile key +doc_param_0=%(doc_profile_key)s + +[getProfilesList] +type=method +category=request +sig_in= +sig_out=as +doc=Get all profiles + +[createProfile] +type=method +category=request +sig_in=s +sig_out=i +doc=Create a new profile +doc_param_0=%(doc_profile)s +doc_return=status of the creation: + - 0: Profile created + - 1: The profile name already exists + +[deleteProfile] +type=method +category=request +sig_in=s +sig_out=i +doc=Delete a profile +doc_param_0=%(doc_profile)s +doc_return=status of the deletion: + - 0: Profile deleted + - 1: The profile doesn't exists + +[registerNewAccount] +deprecated= +type=method +category=communication +sig_in=sssi +sig_out=s +param_3_default=5222 +doc=Register a new account on a given server +doc_param_0=login: login of the account +doc_param_1=password: password of the account +doc_param_2=host: host of the server to register to +doc_param_3=port: port of the server to register to + +[connect] +type=method +category=communication +sig_in=s +sig_out= +param_0_default="@DEFAULT@" +doc=Connect a profile +doc_param_0=%(doc_profile_key)s + +[disconnect] +type=method +category=communication +sig_in=s +sig_out= +param_0_default="@DEFAULT@" +doc=Disconnect a profile +doc_param_0=%(doc_profile_key)s + +[isConnected] +type=method +category=communication +sig_in=s +sig_out=b +param_0_default="@DEFAULT@" +doc=Tell if a profile is connected +doc_param_0=%(doc_profile_key)s + +[getContacts] +type=method +category=communication +sig_in=s +sig_out=a(sa{ss}as) +param_0_default="@DEFAULT@" +doc=Return informations about all contacts +doc_param_0=%(doc_profile_key)s +doc_return=array of tuples with the following values: + - JID of the contact + - list of attributes as in [newContact] + - groups where the contact is + +[getPresenceStatus] +type=method +category=communication +sig_in=s +sig_out=a{sa{s(sia{ss})}} +param_0_default="@DEFAULT@" +doc=Return presence informations of all contacts +doc_param_0=%(doc_profile_key)s +doc_return=Dict of presence with bare JID of contact as key, and value as follow: + A dict where key is the resource and the value is a tuple with (show, priority, statuses) as for [presenceUpdate] + +[getWaitingSub] +type=method +category=communication +sig_in=s +sig_out=a{ss} +param_0_default="@DEFAULT@" +doc=Get subscription requests in queue +doc_param_0=%(doc_profile_key)s +doc_return=Dict where contact JID is the key, and value is the subscription type + +[sendMessage] +type=method +category=communication +sig_in=sssss +sig_out= +param_2_default='' +param_3_default="chat" +param_4_default="@DEFAULT@" +doc=Send a message +doc_param_0=to_jid: JID of the recipient +doc_param_1=message: body of the message +doc_param_2=subject: Subject of the message ('' if no subject) +doc_param_3=mess_type: Type of the message (cf RFC 3921 #2.1.1) +doc_param_4=%(doc_profile_key)s + +[setPresence] +type=method +category=communication +sig_in=ssia{ss}s +sig_out= +param_0_default='' +param_1_default='' +param_2_default=0 +param_3_default={} +param_4_default="@DEFAULT@" +doc=Set presence information for the profile +doc_param_0=to_jid: the JID to who we send the presence data (emtpy string for broadcast) +doc_param_1=show: as for [presenceUpdate] +doc_param_2=priority: as for [presenceUpdate] +doc_param_3=statuses: as for [presenceUpdate] +doc_param_4=%(doc_profile_key)s + +[subscription] +type=method +category=communication +sig_in=sss +sig_out= +param_2_default="@DEFAULT@" +doc=Send subscription request/answer to a contact +doc_param_0=sub_type: as for [subscribe] +doc_param_1=entity: as for [subscribe] +doc_param_2=%(doc_profile_key)s + +[setParam] +type=method +category=communication +sig_in=ssss +sig_out= +param_3_default="@DEFAULT@" +doc=Change a parameter +doc_param_0=name: Name of the parameter to change +doc_param_1=value: New Value of the parameter +doc_param_2=category: Category of the parameter to change +doc_param_3=%(doc_profile_key)s + +[getParamA] +type=method +category=communication +sig_in=sss +sig_out=s +param_2_default="@DEFAULT@" +doc=Helper method to get a parameter's attribute +doc_param_0=name: as for [setParam] +doc_param_1=category: as for [setParam] +doc_param_2=%(doc_profile_key)s + +[getParamsUI] +type=method +category=communication +sig_in=s +sig_out=s +param_0_default="@DEFAULT@" +doc=Return a SàT XMLUI for parameters +doc_param_0=%(doc_profile_key)s + +[getParams] +type=method +category=communication +sig_in=s +sig_out=s +param_0_default="@DEFAULT@" +doc=Return XML of parameters +doc_param_0=%(doc_profile_key)s + +[getParamsForCategory] +type=method +category=communication +sig_in=ss +sig_out=s +param_1_default="@DEFAULT@" +doc=Return a xml of all params in a category +doc_param_0=category: Category to get +doc_param_1=%(doc_profile_key)s + +[getParamsCategories] +type=method +category=communication +sig_in= +sig_out=as +doc=Get all categories currently existing in parameters +doc_return=list of categories + +[getHistory] +type=method +category=communication +sig_in=ssi +sig_out=a{i(ss)} +doc=Get history of a communication between two entities +doc_param_0=from_jid: source JID +doc_param_1=to_jid: dest JID +doc_param_2=size: size of the history (0 for the whole history) +doc_return=Dict where key is timestamp (seconds this the Epoch), and value is a tuple (from_jid, to_jid) + +[addContact] +type=method +category=communication +sig_in=ss +sig_out= +param_1_default="@DEFAULT@" +doc=Add a contact to profile's roster +doc_param_0=entity: JID to add to roster +doc_param_1=%(doc_profile_key)s + +[delContact] +type=method +category=communication +sig_in=ss +sig_out= +param_1_default="@DEFAULT@" +doc=Remove a contact from profile's roster +doc_param_0=entity: JID to remove from roster +doc_param_1=%(doc_profile_key)s + +[launchAction] +type=method +category=request +sig_in=sa{ss}s +sig_out=s +param_2_default="@DEFAULT@" +doc=Launch a specific action +doc_param_0=action_type: type of the action which can be: + - button: A button is pushed +doc_param_1=data: action_type dependant data +doc_param_2=%(doc_profile_key)s + +[confirmationAnswer] +type=method +category=request +sig_in=sba{ss} +sig_out= +doc=Give answer to a confirmation request +doc_param_0=id: id of the confirmation request +doc_param_1=accepted: True if the action is confirmed +doc_param_2=data: action specific data + +[getProgress] +type=method +category=request +sig_in=s +sig_out=a{ss} +doc=Get progress information for an action +doc_param_0=id: id of the progression status +doc_return=dict with progress information: + - position: current position + - size: end position + +[getMenus] +type=method +category=request +sig_in= +sig_out=a(sss) +doc=Get all additional menus +doc_return=list of tuple with the following value: + - category: Category of the menu + - name: Name of the menu + - menu_type: Type which can be: + * NORMAL: Classical application menu + +[getMenuHelp] +type=method +category=request +sig_in=sss +sig_out=s +param_2="NORMAL" +doc=Get help information for a menu +doc_param_0=category: Category of the menu +doc_param_1=name: Name of the menu +doc_param_2=menu_type: Type of the menu as in [getMenus] return value +doc_return=Help string + +[callMenu] +type=method +category=request +sig_in=ssss +sig_out=s +doc=Execute action associated with a menu +doc_param_0=category: as in [getMenuHelp] +doc_param_1=name: as in [getMenuHelp] +doc_param_2=menu_type: as in [getMenuHelp] +doc_param_3=%(doc_profile_key)s +doc_return=return an actionId or the empty string if something went wrong