Package Kit: FetchFileJob now contains package size.
* So that you know how much already was, and still has to be downloaded. * Automatic whitespace cleanup. * The link in FetchFileJob.h did not fetch the correct header under Haiku anymore (since the addition of the private headers to the image).
This commit is contained in:
@@ -1 +1 @@
|
||||
#include <../private/package/FetchFileJob.h>
|
||||
#include <../../../private/package/FetchFileJob.h>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Copyright 2011, Oliver Tappe <[email protected]>
|
||||
* Copyright 2013, Rene Gollent <[email protected]>
|
||||
* Copyright 2015, Axel Dörfler <[email protected]>
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef _PACKAGE__PRIVATE__FETCH_FILE_JOB_H_
|
||||
@@ -32,6 +33,8 @@ public:
|
||||
float DownloadProgress() const;
|
||||
const char* DownloadURL() const;
|
||||
const char* DownloadFileName() const;
|
||||
off_t DownloadBytes() const;
|
||||
off_t DownloadTotalBytes() const;
|
||||
|
||||
protected:
|
||||
virtual status_t Execute();
|
||||
@@ -39,18 +42,20 @@ protected:
|
||||
|
||||
private:
|
||||
// libcurl callbacks
|
||||
static int _ProgressCallback(void *clientp,
|
||||
double dltotal, double dlnow,
|
||||
double ultotal, double ulnow);
|
||||
static int _TransferCallback(void* _job,
|
||||
off_t downloadTotal, off_t downloaded,
|
||||
off_t uploadTotal, off_t uploaded);
|
||||
|
||||
static size_t _WriteCallback(void *buffer, size_t size,
|
||||
size_t nmemb, void *userp);
|
||||
static size_t _WriteCallback(void* buffer, size_t size,
|
||||
size_t nmemb, void* userp);
|
||||
|
||||
private:
|
||||
BString fFileURL;
|
||||
BEntry fTargetEntry;
|
||||
BFile fTargetFile;
|
||||
float fDownloadProgress;
|
||||
off_t fBytes;
|
||||
off_t fTotalBytes;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014, Haiku, Inc. All Rights Reserved.
|
||||
* Copyright 2013-2015, Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@@ -319,7 +319,8 @@ public:
|
||||
const char* packageName);
|
||||
virtual void ProgressPackageDownloadActive(
|
||||
const char* packageName,
|
||||
float completionPercentage);
|
||||
float completionPercentage,
|
||||
off_t bytes, off_t totalBytes);
|
||||
virtual void ProgressPackageDownloadComplete(
|
||||
const char* packageName);
|
||||
virtual void ProgressPackageChecksumStarted(
|
||||
|
||||
Reference in New Issue
Block a user