]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/acquire-item.h
apt manpage is built from xml nowadays like the rest
[apt.git] / apt-pkg / acquire-item.h
index df1380b5eda7211ad42959f81c9e6a53f0741d7a..c4bbfc7a1542b3568240118ddb6463c1b453d7fe 100644 (file)
@@ -276,7 +276,7 @@ class pkgAcquire::Item : public WeakPointable                               /*{{{*/
     *
     *  \param Owner The new owner of this item.
     */
-   Item(pkgAcquire * const Owner);
+   explicit Item(pkgAcquire * const Owner);
 
    /** \brief Remove this item from its owner's queue by invoking
     *  pkgAcquire::Remove.
@@ -336,7 +336,7 @@ class pkgAcquire::Item : public WeakPointable                               /*{{{*/
    virtual std::string GetFinalFilename() const;
 
    private:
-   void *d;
+   void * const d;
 
    friend class pkgAcqMetaBase;
 };
@@ -344,10 +344,10 @@ class pkgAcquire::Item : public WeakPointable                             /*{{{*/
 class APT_HIDDEN pkgAcqTransactionItem: public pkgAcquire::Item                /*{{{*/
 /** \brief baseclass for the indexes files to manage them all together */
 {
-   void *d;
+   void * const d;
    protected:
    IndexTarget const Target;
-   HashStringList GetExpectedHashesFor(std::string const MetaKey) const;
+   HashStringList GetExpectedHashesFor(std::string const &MetaKey) const;
 
    bool QueueURI(pkgAcquire::ItemDesc &Item);
 
@@ -370,7 +370,7 @@ class APT_HIDDEN pkgAcqTransactionItem: public pkgAcquire::Item             /*{{{*/
    virtual bool HashesRequired() const;
 
 
-   pkgAcqTransactionItem(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager, IndexTarget const Target);
+   pkgAcqTransactionItem(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager, IndexTarget const &Target);
    virtual ~pkgAcqTransactionItem();
 
    friend class pkgAcqMetaBase;
@@ -379,7 +379,7 @@ class APT_HIDDEN pkgAcqTransactionItem: public pkgAcquire::Item             /*{{{*/
 class APT_HIDDEN pkgAcqMetaBase : public pkgAcqTransactionItem         /*{{{*/
 /** \brief the manager of a transaction */
 {
-   void *d;
+   void * const d;
  protected:
    std::vector<pkgAcqTransactionItem*> Transaction;
 
@@ -474,7 +474,7 @@ class APT_HIDDEN pkgAcqMetaBase : public pkgAcqTransactionItem              /*{{{*/
    virtual std::string GetFinalFilename() const;
 
    pkgAcqMetaBase(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
-                 std::vector<IndexTarget> const IndexTargets,
+                 std::vector<IndexTarget> const &IndexTargets,
                  IndexTarget const &DataTarget,
                  indexRecords* const MetaIndexParser);
    virtual ~pkgAcqMetaBase();
@@ -492,7 +492,7 @@ class APT_HIDDEN pkgAcqMetaBase : public pkgAcqTransactionItem              /*{{{*/
  */
 class APT_HIDDEN pkgAcqMetaIndex : public pkgAcqMetaBase
 {
-   void *d;
+   void * const d;
    protected:
    IndexTarget const DetachedSigTarget;
 
@@ -511,7 +511,7 @@ class APT_HIDDEN pkgAcqMetaIndex : public pkgAcqMetaBase
    /** \brief Create a new pkgAcqMetaIndex. */
    pkgAcqMetaIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
                   IndexTarget const &DataTarget, IndexTarget const &DetachedSigTarget,
-                  std::vector<IndexTarget> const IndexTargets, indexRecords * const MetaIndexParser);
+                  std::vector<IndexTarget> const &IndexTargets, indexRecords * const MetaIndexParser);
    virtual ~pkgAcqMetaIndex();
 
    friend class pkgAcqMetaSig;
@@ -527,7 +527,7 @@ class APT_HIDDEN pkgAcqMetaIndex : public pkgAcqMetaBase
  */
 class APT_HIDDEN pkgAcqMetaSig : public pkgAcqTransactionItem
 {
-   void *d;
+   void * const d;
 
    pkgAcqMetaIndex * const MetaIndex;
 
@@ -548,7 +548,7 @@ class APT_HIDDEN pkgAcqMetaSig : public pkgAcqTransactionItem
                     pkgAcquire::MethodConfig const * const Cnf);
 
    /** \brief Create a new pkgAcqMetaSig. */
-   pkgAcqMetaSig(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager, IndexTarget const Target,
+   pkgAcqMetaSig(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager, IndexTarget const &Target,
         pkgAcqMetaIndex * const MetaIndex);
    virtual ~pkgAcqMetaSig();
 };
@@ -556,11 +556,10 @@ class APT_HIDDEN pkgAcqMetaSig : public pkgAcqTransactionItem
 /** \brief An item repsonsible for downloading clearsigned metaindexes {{{*/
 class APT_HIDDEN pkgAcqMetaClearSig : public pkgAcqMetaIndex
 {
-   void *d;
+   void * const d;
 
    IndexTarget const ClearsignedTarget;
    IndexTarget const DetachedDataTarget;
-   IndexTarget const DetachedSigTarget;
 
 public:
    virtual void Failed(std::string const &Message,pkgAcquire::MethodConfig const * const Cnf);
@@ -573,7 +572,7 @@ public:
                IndexTarget const &ClearsignedTarget,
                IndexTarget const &DetachedDataTarget,
                IndexTarget const &DetachedSigTarget,
-               std::vector<IndexTarget> const IndexTargets,
+               std::vector<IndexTarget> const &IndexTargets,
                indexRecords * const MetaIndexParser);
    virtual ~pkgAcqMetaClearSig();
 };
@@ -581,14 +580,14 @@ public:
 /** \brief Common base class for all classes that deal with fetching indexes   {{{*/
 class APT_HIDDEN pkgAcqBaseIndex : public pkgAcqTransactionItem
 {
-   void *d;
+   void * const d;
 
  public:
    /** \brief Get the full pathname of the final file for the current URI */
    virtual std::string GetFinalFilename() const;
 
    pkgAcqBaseIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
-                   IndexTarget const Target);
+                   IndexTarget const &Target);
    virtual ~pkgAcqBaseIndex();
 };
                                                                        /*}}}*/
@@ -603,7 +602,7 @@ class APT_HIDDEN pkgAcqBaseIndex : public pkgAcqTransactionItem
  */
 class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex
 {
-   void *d;
+   void * const d;
 
  protected:
    /** \brief If \b true, debugging information will be written to std::clog. */
@@ -652,7 +651,7 @@ class APT_HIDDEN pkgAcqDiffIndex : public pkgAcqBaseIndex
     *  \param ShortDesc A short description of the list file to download.
     */
    pkgAcqDiffIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
-                   IndexTarget const Target);
+                   IndexTarget const &Target);
    virtual ~pkgAcqDiffIndex();
  private:
    APT_HIDDEN void QueueOnIMSHit() const;
@@ -685,7 +684,7 @@ struct APT_HIDDEN DiffInfo {                                                /*{{{*/
  */
 class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex
 {
-   void *d;
+   void * const d;
 
    protected:
 
@@ -751,7 +750,7 @@ class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex
     *  check if it was the last one to complete the download step
     */
    pkgAcqIndexMergeDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
-                         IndexTarget const Target, DiffInfo const &patch,
+                         IndexTarget const &Target, DiffInfo const &patch,
                          std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches);
    virtual ~pkgAcqIndexMergeDiffs();
 };
@@ -769,7 +768,7 @@ class APT_HIDDEN pkgAcqIndexMergeDiffs : public pkgAcqBaseIndex
  */
 class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
 {
-   void *d;
+   void * const d;
 
    private:
 
@@ -865,7 +864,7 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
     *  that depends on it.
     */
    pkgAcqIndexDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
-                    IndexTarget const Target,
+                    IndexTarget const &Target,
                    std::vector<DiffInfo> const &diffs=std::vector<DiffInfo>());
    virtual ~pkgAcqIndexDiffs();
 };
@@ -879,7 +878,7 @@ class APT_HIDDEN pkgAcqIndexDiffs : public pkgAcqBaseIndex
  */
 class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex
 {
-   void *d;
+   void * const d;
 
    protected:
 
@@ -943,7 +942,7 @@ class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex
    virtual std::string GetMetaKey() const;
 
    pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
-               IndexTarget const Target);
+               IndexTarget const &Target);
    virtual ~pkgAcqIndex();
 
    private:
@@ -958,7 +957,7 @@ class APT_HIDDEN pkgAcqIndex : public pkgAcqBaseIndex
  */
 class pkgAcqArchive : public pkgAcquire::Item
 {
-   void *d;
+   void * const d;
 
    bool LocalSource;
    HashStringList ExpectedHashes;
@@ -1046,7 +1045,7 @@ class pkgAcqArchive : public pkgAcquire::Item
  */
 class pkgAcqChangelog : public pkgAcquire::Item
 {
-   void *d;
+   void * const d;
    std::string TemporaryDirectory;
    std::string const SrcName;
    std::string const SrcVersion;
@@ -1161,7 +1160,7 @@ private:
  */
 class pkgAcqFile : public pkgAcquire::Item
 {
-   void *d;
+   void * const d;
 
    /** \brief How many times to retry the download, set from
     *  Acquire::Retries.