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)
This commit is contained in:
parent
9b2055bd3f
commit
55c75bc304
1 changed files with 161 additions and 29 deletions
|
|
@ -170,18 +170,28 @@ doc_param_3=%(doc_profile)s
|
|||
[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 @@ doc_return=dict with progress informations:
|
|||
- 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue