]> git.saurik.com Git - apt.git/commitdiff
add a bunch of docstrings etc
authorMichael Vogt <mvo@ubuntu.com>
Thu, 2 Oct 2014 15:28:20 +0000 (17:28 +0200)
committerMichael Vogt <mvo@ubuntu.com>
Thu, 2 Oct 2014 15:28:20 +0000 (17:28 +0200)
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h

index afc7ae20b6ae2b4358cb106d776162619d3a88ec..b61a1d8330e560cb5cb531e60cc4d7f9444389cf 100644 (file)
@@ -1417,12 +1417,17 @@ void pkgAcqIndexTrans::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
    Item::Failed(Message,Cnf);
 }
                                                                        /*}}}*/
    Item::Failed(Message,Cnf);
 }
                                                                        /*}}}*/
-
+// AcqMetaBase::Add - Add a item to the current Transaction            /*{{{*/
+// ---------------------------------------------------------------------
+/* */
 void pkgAcqMetaBase::Add(Item *I)
 {
    Transaction.push_back(I);
 }
 void pkgAcqMetaBase::Add(Item *I)
 {
    Transaction.push_back(I);
 }
-
+                                                                       /*}}}*/
+// AcqMetaBase::AbortTransaction - Abort the current Transaction       /*{{{*/
+// ---------------------------------------------------------------------
+/* */
 void pkgAcqMetaBase::AbortTransaction()
 {
    if(_config->FindB("Debug::Acquire::Transaction", false) == true)
 void pkgAcqMetaBase::AbortTransaction()
 {
    if(_config->FindB("Debug::Acquire::Transaction", false) == true)
@@ -1447,6 +1452,9 @@ void pkgAcqMetaBase::AbortTransaction()
    }
 }
                                                                        /*}}}*/
    }
 }
                                                                        /*}}}*/
+// AcqMetaBase::TransactionHasError - Check for errors in Transaction          /*{{{*/
+// ---------------------------------------------------------------------
+/* */
 bool pkgAcqMetaBase::TransactionHasError()
 {
    for (pkgAcquire::ItemIterator I = Transaction.begin();
 bool pkgAcqMetaBase::TransactionHasError()
 {
    for (pkgAcquire::ItemIterator I = Transaction.begin();
@@ -1457,7 +1465,10 @@ bool pkgAcqMetaBase::TransactionHasError()
 
    return false;
 }
 
    return false;
 }
-// Acquire::CommitTransaction - Commit a transaction                   /*{{{*/
+                                                                       /*}}}*/
+// AcqMetaBase::CommitTransaction - Commit a transaction               /*{{{*/
+// ---------------------------------------------------------------------
+/* */
 void pkgAcqMetaBase::CommitTransaction()
 {
    if(_config->FindB("Debug::Acquire::Transaction", false) == true)
 void pkgAcqMetaBase::CommitTransaction()
 {
    if(_config->FindB("Debug::Acquire::Transaction", false) == true)
@@ -1491,7 +1502,10 @@ void pkgAcqMetaBase::CommitTransaction()
       (*I)->TransactionManager = 0;
    }
 }
       (*I)->TransactionManager = 0;
    }
 }
-
+                                                                       /*}}}*/
+// AcqMetaBase::CommitTransaction - Commit a transaction               /*{{{*/
+// ---------------------------------------------------------------------
+/* */
 void pkgAcqMetaBase::TransactionStageCopy(Item *I,
                                           const std::string &From,
                                           const std::string &To)
 void pkgAcqMetaBase::TransactionStageCopy(Item *I,
                                           const std::string &From,
                                           const std::string &To)
@@ -1499,16 +1513,21 @@ void pkgAcqMetaBase::TransactionStageCopy(Item *I,
    I->PartialFile = From;
    I->DestFile = To;
 }
    I->PartialFile = From;
    I->DestFile = To;
 }
-
+                                                                       /*}}}*/
+// AcqMetaBase::CommitTransaction - Commit a transaction               /*{{{*/
+// ---------------------------------------------------------------------
+/* */
 void pkgAcqMetaBase::TransactionStageRemoval(Item *I,
                                              const std::string &FinalFile)
 {
    I->PartialFile = "";
    I->DestFile = FinalFile; 
 }
 void pkgAcqMetaBase::TransactionStageRemoval(Item *I,
                                              const std::string &FinalFile)
 {
    I->PartialFile = "";
    I->DestFile = FinalFile; 
 }
-
-
+                                                                       /*}}}*/
                                                                        /*{{{*/
                                                                        /*{{{*/
+// AcqMetaBase::GenerateAuthWarning - Check gpg authentication error   /*{{{*/
+// ---------------------------------------------------------------------
+/* */
 bool pkgAcqMetaBase::GenerateAuthWarning(const std::string &RealURI,
                                          const std::string &Message)
 {
 bool pkgAcqMetaBase::GenerateAuthWarning(const std::string &RealURI,
                                          const std::string &Message)
 {
@@ -1542,9 +1561,10 @@ bool pkgAcqMetaBase::GenerateAuthWarning(const std::string &RealURI,
    return false;
 }
                                                                        /*}}}*/
    return false;
 }
                                                                        /*}}}*/
-
-
-pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner,                        /*{{{*/
+// AcqMetaSig::AcqMetaSig - Constructor                                /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner,
                              pkgAcqMetaBase *TransactionManager,
                             string URI,string URIDesc,string ShortDesc,
                              string MetaIndexFile,
                              pkgAcqMetaBase *TransactionManager,
                             string URI,string URIDesc,string ShortDesc,
                              string MetaIndexFile,
@@ -1595,8 +1615,12 @@ string pkgAcqMetaSig::Custom600Headers() const
 
    return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
 }
 
    return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
 }
-
-void pkgAcqMetaSig::Done(string Message,unsigned long long Size, HashStringList const &Hashes,
+                                                                       /*}}}*/
+// pkgAcqMetaSig::Done - The signature was downloaded/verified         /*{{{*/
+// ---------------------------------------------------------------------
+/* The only header we use is the last-modified header. */
+void pkgAcqMetaSig::Done(string Message,unsigned long long Size,
+                         HashStringList const &Hashes,
                         pkgAcquire::MethodConfig *Cfg)
 {
    Item::Done(Message, Size, Hashes, Cfg);
                         pkgAcquire::MethodConfig *Cfg)
 {
    Item::Done(Message, Size, Hashes, Cfg);
index fbbca8bf28776c3178edcfa51357775eaef54498..97236f90aa22c25e47196ed7d6f553026e4abc40 100644 (file)
@@ -443,7 +443,8 @@ class pkgAcqMetaSig : public pkgAcqMetaBase
    
    // Specialized action members
    virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
    
    // Specialized action members
    virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
-   virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes,
+   virtual void Done(std::string Message,unsigned long long Size,
+                     HashStringList const &Hashes,
                     pkgAcquire::MethodConfig *Cnf);
    virtual std::string Custom600Headers() const;
    virtual std::string DescURI() {return RealURI; };
                     pkgAcquire::MethodConfig *Cnf);
    virtual std::string Custom600Headers() const;
    virtual std::string DescURI() {return RealURI; };
@@ -575,7 +576,8 @@ class pkgAcqMetaClearSig : public pkgAcqMetaIndex
 public:
    virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
    virtual std::string Custom600Headers() const;
 public:
    virtual void Failed(std::string Message,pkgAcquire::MethodConfig *Cnf);
    virtual std::string Custom600Headers() const;
-   virtual void Done(std::string Message,unsigned long long Size, HashStringList const &Hashes,
+   virtual void Done(std::string Message,unsigned long long Size,
+                     HashStringList const &Hashes,
                     pkgAcquire::MethodConfig *Cnf);
 
    /** \brief Create a new pkgAcqMetaClearSig. */
                     pkgAcquire::MethodConfig *Cnf);
 
    /** \brief Create a new pkgAcqMetaClearSig. */