diff 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
line wrap: on
line diff
--- a/src/bridge/bridge_constructor/bridge_template.ini	Thu Nov 19 11:15:06 2015 +0100
+++ b/src/bridge/bridge_constructor/bridge_template.ini	Thu Nov 19 18:13:26 2015 +0100
@@ -170,18 +170,28 @@
 [progressStarted]
 type=signal
 category=core
-sig_in=ss
+sig_in=sa{ss}s
 doc=A progressing operation has just started
 doc_param_0=id: id of the progression operation
-doc_param_1=%(doc_profile)s
+doc_param_1=metadata: dict of progress metadata, key can be:
+    - name: name of the progression, full path for a file
+    - direction: "in" for incoming data, "out" else
+    - type: type of the progression:
+        C.META_TYPE_FILE: file transfer
+doc_param_2=%(doc_profile)s
 
 [progressFinished]
 type=signal
 category=core
-sig_in=ss
+sig_in=sa{ss}s
 doc=A progressing operation is finished
 doc_param_0=id: id of the progression operation
-doc_param_1=%(doc_profile)s
+doc_param_1=metadata: dict of progress status metadata, key can be:
+    - hash: value of the computed hash
+    - hash_algo: alrorithm used to compute hash
+    - hash_verified: C.BOOL_TRUE if hash is verified and OK
+        C.BOOL_FALSE if hash was not received ([progressError] will be used if there is a mismatch)
+doc_param_2=%(doc_profile)s
 
 [progressError]
 type=signal
@@ -666,6 +676,17 @@
  - position: current position
  - size: end position
 
+[progressGetAllMetadata]
+type=method
+category=core
+sig_in=s
+sig_out=a{sa{sa{ss}}}
+doc=Get all active progress informations
+doc_param_0=%(doc_profile)s or C.PROF_KEY_ALL for all profiles
+doc_return= a dict which map profile to progress_dict
+    progress_dict map progress_id to progress_metadata
+    progress_metadata is the same dict as sent by [progressStarted]
+
 [progressGetAll]
 type=method
 category=core