+ // Iterate over queued Item URIs
+ class UriIterator;
+ /** \brief Get the head of the list of enqueued item URIs.
+ *
+ * This iterator will step over every element of every active
+ * queue.
+ */
+ UriIterator UriBegin();
+ /** \brief Get the end iterator of the list of enqueued item URIs. */
+ UriIterator UriEnd();
+
+ /** Deletes each entry in the given directory that is not being
+ * downloaded by this object. For instance, when downloading new
+ * list files, calling Clean() will delete the old ones.
+ *
+ * \param Dir The directory to be cleaned out.
+ *
+ * \return \b true if the directory exists and is readable.
+ */
+ bool Clean(string Dir);
+
+ /** \return the total size in bytes of all the items included in
+ * this download.
+ */
+ unsigned long long TotalNeeded();
+
+ /** \return the size in bytes of all non-local items included in
+ * this download.
+ */
+ unsigned long long FetchNeeded();
+
+ /** \return the amount of data to be fetched that is already
+ * present on the filesystem.
+ */
+ 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.
+ */
+ bool Setup(pkgAcquireStatus *Progress = NULL, string const &Lock = "");
+
+ /** \brief Construct a new pkgAcquire. */
+ pkgAcquire(pkgAcquireStatus *Log) __deprecated;
+ pkgAcquire();
+
+ /** \brief Destroy this pkgAcquire object.
+ *
+ * Destroys all queue, method, and item objects associated with
+ * this download.
+ */
+ virtual ~pkgAcquire();
+
+ private:
+ /** \brief FD of the Lock file we acquire in Setup (if any) */
+ int LockFD;