summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/acquire.h')
-rw-r--r--apt-pkg/acquire.h43
1 files changed, 16 insertions, 27 deletions
diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h
index 1cf4da5bf..a5c10fd92 100644
--- a/apt-pkg/acquire.h
+++ b/apt-pkg/acquire.h
@@ -353,20 +353,6 @@ class pkgAcquire
*/
unsigned long long PartialPresent();
- /** \brief Delayed constructor
- *
- * \param Progress indicator associated with this download or
- * \b NULL for none. This object is not owned by the
- * download process and will not be deleted when the pkgAcquire
- * object is destroyed. Naturally, it should live for at least as
- * long as the pkgAcquire object does.
- * \param Lock defines a lock file that should be acquired to ensure
- * only one Acquire class is in action at the time or an empty string
- * if no lock file should be used. If set also all needed directories
- * will be created.
- */
- APT_DEPRECATED_MSG("Use constructors, .SetLog and .GetLock as needed") bool Setup(pkgAcquireStatus *Progress = NULL, std::string const &Lock = "");
-
void SetLog(pkgAcquireStatus *Progress) { Log = Progress; }
/** \brief acquire lock and perform directory setup
@@ -439,6 +425,21 @@ class pkgAcquire::Queue
/** \brief The underlying items interested in the download */
std::vector<Item*> Owners;
+ /** \brief How many bytes of the file have been downloaded. Zero
+ * if the current progress of the file cannot be determined.
+ */
+ unsigned long long CurrentSize = 0;
+
+ /** \brief The total number of bytes to be downloaded. Zero if the
+ * total size of the final is unknown.
+ */
+ unsigned long long TotalSize = 0;
+
+ /** \brief How much of the file was already downloaded prior to
+ * starting this worker.
+ */
+ unsigned long long ResumePoint = 0;
+
typedef std::vector<Item*>::const_iterator owner_iterator;
/** \brief Assign the ItemDesc portion of this QItem from
@@ -819,17 +820,13 @@ class pkgAcquireStatus
* success it will print for each change the message attached to it via GlobalError either as an
* error (if DefaultAction == false) or as a notice otherwise.
*
- * \b Note: To keep ABI compatibility for now this method isn't marked as
- * virtual, but you can derive your class from #pkgAcquireStatus2 which has it
- * marked as virtual. TODO on next ABI break: merge both classes.
- *
* @param LastRelease can be used to extract further information from the previous Release file
* @param CurrentRelease can be used to extract further information from the current Release file
* @param Changes is an array of changes alongside explanatory messages
* which should be presented in some way to the user.
* @return \b true if all changes are accepted by user, otherwise or if user can't be asked \b false
*/
- bool ReleaseInfoChanges(metaIndex const * const LastRelease, metaIndex const * const CurrentRelease, std::vector<ReleaseInfoChange> &&Changes);
+ virtual bool ReleaseInfoChanges(metaIndex const * const LastRelease, metaIndex const * const CurrentRelease, std::vector<ReleaseInfoChange> &&Changes);
APT_HIDDEN static bool ReleaseInfoChangesAsGlobalErrors(std::vector<ReleaseInfoChange> &&Changes);
/** \brief Invoked when an item is confirmed to be up-to-date.
@@ -872,14 +869,6 @@ class pkgAcquireStatus
pkgAcquireStatus();
virtual ~pkgAcquireStatus();
};
-class pkgAcquireStatus2: public pkgAcquireStatus
-{
-public:
- virtual bool ReleaseInfoChanges(metaIndex const * const LastRelease, metaIndex const * const CurrentRelease, std::vector<ReleaseInfoChange> &&Changes);
-
- pkgAcquireStatus2();
- virtual ~pkgAcquireStatus2();
-};
/*}}}*/
/** @} */