Libzypp/Refactoring/Implementation/ProgressReports
From openSUSE
< Libzypp | Refactoring
[edit]
Progress Reports
Current behavior: A callback function is passed to the task. From time to time the callback function is invoked, passing a single number as argument. The UI interprets this number as percentage, although not all jobs are able to estimate the length of the job.
E.g. reading a compressed file, we don't know the uncompressed size in advance. We can send a 'still alive' report, but we can't tell how much is still missing until we reach the end of file.
Most progress callbacks return a boolean, indicating whether the user/application requests to abort the current job.
Sketch how to improve:
[Attempt to unify and improve our progress reporting.]
[Long running actions aborted by user: Consider to throw AbortRequestException]

