comparison src/bridge/bridge_constructor/bridge_template.ini @ 1626:63cef4dbf2a4

core, plugins file, XEP-0234, bridge: progression api enhancement: - progressStarted have a new metadata parameter, useful to know the kind of progression, direction, etc. Check bridge doc - progressGetAllMetadata can be used to retrieve this data and discover on currently running progressions - progressFinished also have a new metadata parameter, used to e.g. indicate that hash is checked - core: fixed progressGetAll - file, XEP-0234: implemented the API modifications, hash is returned on progressFinished - file: SatFile.checkSize allows to check size independently of close (be sure that all the data have been transfered though)
author Goffi <goffi@goffi.org>
date Thu, 19 Nov 2015 18:13:26 +0100
parents 5b24d6bf5d15
children d470affbe65c
comparison
equal deleted inserted replaced
1625:8b8b1af5905f 1626:63cef4dbf2a4
168 doc_param_3=%(doc_profile)s 168 doc_param_3=%(doc_profile)s
169 169
170 [progressStarted] 170 [progressStarted]
171 type=signal 171 type=signal
172 category=core 172 category=core
173 sig_in=ss 173 sig_in=sa{ss}s
174 doc=A progressing operation has just started 174 doc=A progressing operation has just started
175 doc_param_0=id: id of the progression operation 175 doc_param_0=id: id of the progression operation
176 doc_param_1=%(doc_profile)s 176 doc_param_1=metadata: dict of progress metadata, key can be:
177 - name: name of the progression, full path for a file
178 - direction: "in" for incoming data, "out" else
179 - type: type of the progression:
180 C.META_TYPE_FILE: file transfer
181 doc_param_2=%(doc_profile)s
177 182
178 [progressFinished] 183 [progressFinished]
179 type=signal 184 type=signal
180 category=core 185 category=core
181 sig_in=ss 186 sig_in=sa{ss}s
182 doc=A progressing operation is finished 187 doc=A progressing operation is finished
183 doc_param_0=id: id of the progression operation 188 doc_param_0=id: id of the progression operation
184 doc_param_1=%(doc_profile)s 189 doc_param_1=metadata: dict of progress status metadata, key can be:
190 - hash: value of the computed hash
191 - hash_algo: alrorithm used to compute hash
192 - hash_verified: C.BOOL_TRUE if hash is verified and OK
193 C.BOOL_FALSE if hash was not received ([progressError] will be used if there is a mismatch)
194 doc_param_2=%(doc_profile)s
185 195
186 [progressError] 196 [progressError]
187 type=signal 197 type=signal
188 category=core 198 category=core
189 sig_in=sss 199 sig_in=sss
663 doc_param_0=id: id of the progression status 673 doc_param_0=id: id of the progression status
664 doc_param_1=%(doc_profile)s 674 doc_param_1=%(doc_profile)s
665 doc_return=dict with progress informations: 675 doc_return=dict with progress informations:
666 - position: current position 676 - position: current position
667 - size: end position 677 - size: end position
678
679 [progressGetAllMetadata]
680 type=method
681 category=core
682 sig_in=s
683 sig_out=a{sa{sa{ss}}}
684 doc=Get all active progress informations
685 doc_param_0=%(doc_profile)s or C.PROF_KEY_ALL for all profiles
686 doc_return= a dict which map profile to progress_dict
687 progress_dict map progress_id to progress_metadata
688 progress_metadata is the same dict as sent by [progressStarted]
668 689
669 [progressGetAll] 690 [progressGetAll]
670 type=method 691 type=method
671 category=core 692 category=core
672 sig_in=s 693 sig_in=s