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:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user