Package Kit: Implement progress notifications.

- BJobStateListener: Add progress state and corresponding hook.
- FetchFileJob: Notify job progress hook on libcurl notifications.
- UserInteractionHandler: Add hooks for download progress and checksum
  validation progress.
- PackageManager: inherit from JobStateListener and watch for job
  notifications for internally generated jobs. Forward to corresponding
  UserInteractionHandler hooks as needed.
- Adapt pkgman, HaikuDepot and package_daemon to above changes.
  Neither HaikuDepot nor package_daemon's progress hooks are wired up to
  do anything yet though.
This commit is contained in:
Rene Gollent
2013-09-29 17:25:33 -04:00
parent fe39d2eb8d
commit 9345049af8
12 changed files with 293 additions and 56 deletions
+5
View File
@@ -29,6 +29,10 @@ public:
const BEntry& targetEntry);
virtual ~FetchFileJob();
float DownloadProgress() const;
const char* DownloadURL() const;
const char* DownloadFileName() const;
protected:
virtual status_t Execute();
virtual void Cleanup(status_t jobResult);
@@ -46,6 +50,7 @@ private:
BString fFileURL;
BEntry fTargetEntry;
BFile fTargetFile;
float fDownloadProgress;
};