return Owner;
}
/*}}}*/
-pkgAcquire::ItemDesc &pkgAcquire::Item::GetItemDesc() /*{{{*/
+APT_CONST pkgAcquire::ItemDesc &pkgAcquire::Item::GetItemDesc() /*{{{*/
{
return Desc;
}
return true;
}
/*}}}*/
+pkgAcqMetaBase::~pkgAcqMetaBase() {}
pkgAcqMetaClearSig::pkgAcqMetaClearSig(pkgAcquire * const Owner, /*{{{*/
IndexTarget const &ClearsignedTarget,
return Target.URI;
}
/*}}}*/
+pkgAcqMetaIndex::~pkgAcqMetaIndex() {}
// AcqMetaSig::AcqMetaSig - Constructor /*{{{*/
pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire * const Owner,
{
}
/*}}}*/
+pkgAcqBaseIndex::~pkgAcqBaseIndex() {}
// AcqDiffIndex::AcqDiffIndex - Constructor /*{{{*/
// ---------------------------------------------------------------------
return;
}
/*}}}*/
+pkgAcqDiffIndex::~pkgAcqDiffIndex() {}
// AcqIndexDiffs::AcqIndexDiffs - Constructor /*{{{*/
// ---------------------------------------------------------------------
return patchhashes.str();
}
/*}}}*/
+pkgAcqIndexDiffs::~pkgAcqIndexDiffs() {}
// AcqIndexMergeDiffs::AcqIndexMergeDiffs - Constructor /*{{{*/
pkgAcqIndexMergeDiffs::pkgAcqIndexMergeDiffs(pkgAcquire * const Owner,
return patchhashes.str();
}
/*}}}*/
+pkgAcqIndexMergeDiffs::~pkgAcqIndexMergeDiffs() {}
// AcqIndex::AcqIndex - Constructor /*{{{*/
pkgAcqIndex::pkgAcqIndex(pkgAcquire * const Owner,
return;
}
/*}}}*/
+pkgAcqIndex::~pkgAcqIndex() {}
// AcqArchive::AcqArchive - Constructor /*{{{*/
return Desc.ShortDesc;
}
/*}}}*/
+pkgAcqArchive::~pkgAcqArchive() {}
// AcqChangelog::pkgAcqChangelog - Constructors /*{{{*/
pkgAcqChangelog::pkgAcqChangelog(pkgAcquire * const Owner, pkgCache::VerIterator const &Ver,
return "";
}
/*}}}*/
+pkgAcqFile::~pkgAcqFile() {}
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-item.h,v 1.26.2.3 2004/01/02 18:51:00 mdz Exp $
/* ######################################################################
Acquire Item - Item to acquire
class APT_HIDDEN pkgAcqTransactionItem: public pkgAcquire::Item /*{{{*/
/** \brief baseclass for the indexes files to manage them all together */
{
+ void *d;
protected:
IndexTarget const Target;
HashStringList GetExpectedHashesFor(std::string const MetaKey) const;
/** \brief the manager of a transaction */
{
void *d;
-
protected:
std::vector<pkgAcqTransactionItem*> Transaction;
std::vector<IndexTarget> const IndexTargets,
IndexTarget const &DataTarget,
indexRecords* const MetaIndexParser);
+ virtual ~pkgAcqMetaBase();
};
/*}}}*/
/** \brief An item that is responsible for downloading the meta-index {{{
class APT_HIDDEN pkgAcqMetaIndex : public pkgAcqMetaBase
{
void *d;
-
protected:
IndexTarget const DetachedSigTarget;
pkgAcqMetaIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
IndexTarget const &DataTarget, IndexTarget const &DetachedSigTarget,
std::vector<IndexTarget> const IndexTargets, indexRecords * const MetaIndexParser);
+ virtual ~pkgAcqMetaIndex();
friend class pkgAcqMetaSig;
};
pkgAcqBaseIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
IndexTarget const Target);
+ virtual ~pkgAcqBaseIndex();
};
/*}}}*/
/** \brief An item that is responsible for fetching an index file of {{{
*/
pkgAcqDiffIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
IndexTarget const Target);
+ virtual ~pkgAcqDiffIndex();
private:
APT_HIDDEN void QueueOnIMSHit() const;
};
pkgAcqIndexMergeDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
IndexTarget const Target, DiffInfo const &patch,
std::vector<pkgAcqIndexMergeDiffs*> const * const allPatches);
+ virtual ~pkgAcqIndexMergeDiffs();
};
/*}}}*/
/** \brief An item that is responsible for fetching server-merge patches {{{
pkgAcqIndexDiffs(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
IndexTarget const Target,
std::vector<DiffInfo> const &diffs=std::vector<DiffInfo>());
+ virtual ~pkgAcqIndexDiffs();
};
/*}}}*/
/** \brief An acquire item that is responsible for fetching an index {{{
pkgAcqIndex(pkgAcquire * const Owner, pkgAcqMetaBase * const TransactionManager,
IndexTarget const Target);
+ virtual ~pkgAcqIndex();
- void Init(std::string const &URI, std::string const &URIDesc,
+ private:
+ APT_HIDDEN void Init(std::string const &URI, std::string const &URIDesc,
std::string const &ShortDesc);
};
/*}}}*/
pkgAcqArchive(pkgAcquire * const Owner,pkgSourceList * const Sources,
pkgRecords * const Recs,pkgCache::VerIterator const &Version,
std::string &StoreFilename);
+ virtual ~pkgAcqArchive();
};
/*}}}*/
/** \brief Retrieve the changelog for the given version {{{
std::string const &Desc, std::string const &ShortDesc,
std::string const &DestDir="", std::string const &DestFilename="",
bool const IsIndexFile=false);
+ virtual ~pkgAcqFile();
};
/*}}}*/
/** @} */
delete Tmp;
}
/*}}}*/
-
pkgAcqMethod::~pkgAcqMethod() {}
+
+pkgAcqMethod::FetchItem::FetchItem() {}
+pkgAcqMethod::FetchItem::~FetchItem() {}
+
+pkgAcqMethod::FetchResult::~FetchResult() {}
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-method.h,v 1.15.2.1 2003/12/24 23:09:17 mdz Exp $
/* ######################################################################
Acquire Method - Method helper class + functions
// for when we know it or a arbitrary limit when we don't know the
// filesize (like a InRelease file)
unsigned long long MaximumSize;
+
+ FetchItem();
+ virtual ~FetchItem();
+ private:
+ void *d;
};
struct FetchResult
void TakeHashes(class Hashes &Hash);
FetchResult();
+ virtual ~FetchResult();
+ private:
+ void *d;
};
// State
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-worker.h,v 1.12 2001/02/20 07:03:17 jgg Exp $
/* ######################################################################
Acquire Worker - Worker process manager
}
/*}}}*/
+pkgAcquire::UriIterator::UriIterator(pkgAcquire::Queue *Q) : d(NULL), CurQ(Q), CurItem(0)
+{
+ while (CurItem == 0 && CurQ != 0)
+ {
+ CurItem = CurQ->Items;
+ CurQ = CurQ->Next;
+ }
+}
+
APT_CONST pkgAcquire::UriIterator::~UriIterator() {}
APT_CONST pkgAcquire::MethodConfig::~MethodConfig() {}
APT_CONST pkgAcquireStatus::~pkgAcquireStatus() {}
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire.h,v 1.29.2.1 2003/12/24 23:09:17 mdz Exp $
/* ######################################################################
Acquire - File Acquiration
*
* \param Q The queue over which this UriIterator should iterate.
*/
- UriIterator(pkgAcquire::Queue *Q) : d(NULL), CurQ(Q), CurItem(0)
- {
- while (CurItem == 0 && CurQ != 0)
- {
- CurItem = CurQ->Items;
- CurQ = CurQ->Next;
- }
- }
+ UriIterator(pkgAcquire::Queue *Q);
virtual ~UriIterator();
};
/*}}}*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: algorithms.h,v 1.10 2001/05/22 04:17:41 jgg Exp $
/* ######################################################################
Algorithms - A set of misc algorithms
class pkgSimulate : public pkgPackageManager /*{{{*/
{
+ void *d;
protected:
class Policy : public pkgDepCache::Policy
public:
pkgSimulate(pkgDepCache *Cache);
- ~pkgSimulate();
+ virtual ~pkgSimulate();
};
/*}}}*/
class pkgProblemResolver /*{{{*/
APT_DEPRECATED void InstallProtect();
pkgProblemResolver(pkgDepCache *Cache);
- ~pkgProblemResolver();
+ virtual ~pkgProblemResolver();
};
/*}}}*/
bool pkgApplyStatus(pkgDepCache &Cache);
#include <limits>
/*}}}*/
namespace APT {
-class Configuration { /*{{{*/
-public: /*{{{*/
+namespace Configuration { /*{{{*/
/** \brief Returns a vector of usable Compression Types
*
* Files can be compressed in various ways to decrease the size of the
*
* \return a vector of the compression types in the preferred usage order
*/
- std::vector<std::string> static const getCompressionTypes(bool const &Cached = true);
+ std::vector<std::string> const getCompressionTypes(bool const &Cached = true);
/** \brief Returns a vector of Language Codes
*
*
* \return a vector of (all) Language Codes in the preferred usage order
*/
- std::vector<std::string> static const getLanguages(bool const &All = false,
+ std::vector<std::string> const getLanguages(bool const &All = false,
bool const &Cached = true, char const ** const Locale = 0);
/** \brief Are we interested in the given Language?
* \param All defines if we check against all codes or only against used codes
* \return true if we are interested, false otherwise
*/
- bool static checkLanguage(std::string Lang, bool const All = false);
+ bool checkLanguage(std::string Lang, bool const All = false);
/** \brief Returns a vector of Architectures we support
*
*
* \return a vector of Architectures in preferred order
*/
- std::vector<std::string> static const getArchitectures(bool const &Cached = true);
+ std::vector<std::string> const getArchitectures(bool const &Cached = true);
/** \brief Are we interested in the given Architecture?
*
* \param Arch we want to check
* \return true if we are interested, false otherwise
*/
- bool static checkArchitecture(std::string const &Arch);
+ bool checkArchitecture(std::string const &Arch);
/** \brief Representation of supported compressors */
struct Compressor {
*
* \return a vector of Compressors
*/
- std::vector<Compressor> static const getCompressors(bool const Cached = true);
+ std::vector<Compressor> const getCompressors(bool const Cached = true);
/** \brief Return a vector of extensions supported for data.tar's */
- std::vector<std::string> static const getCompressorExtensions();
+ std::vector<std::string> const getCompressorExtensions();
/** \return Return a vector of enabled build profile specifications */
- std::vector<std::string> static const getBuildProfiles();
+ std::vector<std::string> const getBuildProfiles();
/** \return Return a comma-separated list of enabled build profile specifications */
- std::string static const getBuildProfilesString();
+ std::string const getBuildProfilesString();
/*}}}*/
};
/*}}}*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: cachefile.h,v 1.5 2002/04/27 04:28:04 jgg Exp $
/* ######################################################################
CacheFile - Simple wrapper class for opening, generating and whatnot
#include <apti18n.h>
/*}}}*/
namespace APT {
-
// PackageFrom - selecting the appropriate method for package selection /*{{{*/
bool CacheSetHelper::PackageFrom(enum PkgSelector const select, PackageContainerInterface * const pci,
pkgCacheFile &Cache, std::string const &pattern) {
bool const /*verIsRel*/) {
}
/*}}}*/
+
+CacheSetHelper::CacheSetHelper(bool const ShowError, GlobalError::MsgType ErrorType) :
+ ShowError(ShowError), ErrorType(ErrorType) {}
+CacheSetHelper::~CacheSetHelper() {}
+
+PackageContainerInterface::PackageContainerInterface() : ConstructedBy(CacheSetHelper::UNKNOWN) {}
+PackageContainerInterface::PackageContainerInterface(CacheSetHelper::PkgSelector const by) : ConstructedBy(by) {}
+PackageContainerInterface::~PackageContainerInterface() {}
+
+PackageUniverse::PackageUniverse(pkgCache * const Owner) : _cont(Owner) { }
+PackageUniverse::~PackageUniverse() {}
+
+VersionContainerInterface::VersionContainerInterface() {}
+VersionContainerInterface::~VersionContainerInterface() {}
}
*/
public: /*{{{*/
CacheSetHelper(bool const ShowError = true,
- GlobalError::MsgType ErrorType = GlobalError::ERROR) :
- ShowError(ShowError), ErrorType(ErrorType) {}
- virtual ~CacheSetHelper() {}
+ GlobalError::MsgType ErrorType = GlobalError::ERROR);
+ virtual ~CacheSetHelper();
enum PkgSelector { UNKNOWN, REGEX, TASK, FNMATCH, PACKAGENAME, STRING };
bool PackageFromFnmatch(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
bool PackageFromPackageName(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern);
bool PackageFromString(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string const &pattern);
+private:
+ void *d;
}; /*}}}*/
class PackageContainerInterface { /*{{{*/
void setConstructor(CacheSetHelper::PkgSelector const by) { ConstructedBy = by; }
CacheSetHelper::PkgSelector getConstructor() const { return ConstructedBy; }
- PackageContainerInterface() : ConstructedBy(CacheSetHelper::UNKNOWN) {}
- PackageContainerInterface(CacheSetHelper::PkgSelector const by) : ConstructedBy(by) {}
+ PackageContainerInterface();
+ PackageContainerInterface(CacheSetHelper::PkgSelector const by);
+ virtual ~PackageContainerInterface();
APT_DEPRECATED static bool FromTask(PackageContainerInterface * const pci, pkgCacheFile &Cache, std::string pattern, CacheSetHelper &helper) {
return helper.PackageFrom(CacheSetHelper::TASK, pci, Cache, pattern); }
private:
CacheSetHelper::PkgSelector ConstructedBy;
+ void *d;
};
/*}}}*/
template<class Container> class PackageContainer : public PackageContainerInterface {/*{{{*/
iterator end() { return iterator(_cont.end()); }
const_iterator find(pkgCache::PkgIterator const &P) const { return const_iterator(_cont.find(P)); }
- PackageContainer() : PackageContainerInterface() {}
+ PackageContainer() : PackageContainerInterface(CacheSetHelper::UNKNOWN) {}
PackageContainer(CacheSetHelper::PkgSelector const &by) : PackageContainerInterface(by) {}
APT_IGNORE_DEPRECATED_PUSH
APT_DEPRECATED PackageContainer(Constructor const &by) : PackageContainerInterface((CacheSetHelper::PkgSelector)by) {}
private methods. */
class APT_HIDDEN PackageUniverse : public PackageContainerInterface {
pkgCache * const _cont;
+ void *d;
public:
typedef pkgCache::PkgIterator iterator;
typedef pkgCache::PkgIterator const_iterator;
APT_PUBLIC iterator begin() { return _cont->PkgBegin(); }
APT_PUBLIC iterator end() { return _cont->PkgEnd(); }
- APT_PUBLIC PackageUniverse(pkgCache * const Owner) : _cont(Owner) { }
+ APT_PUBLIC PackageUniverse(pkgCache * const Owner);
+ APT_PUBLIC virtual ~PackageUniverse();
private:
bool insert(pkgCache::PkgIterator const &) { return true; }
}
APT_IGNORE_DEPRECATED_POP
+ VersionContainerInterface();
+ virtual ~VersionContainerInterface();
+private:
+ void *d;
+
protected: /*{{{*/
/** \brief returns the candidate version of the package
dlclose(libudev_handle);
}
/*}}}*/
+
+pkgCdromStatus::pkgCdromStatus() : totalSteps(0) {}
+pkgCdromStatus::~pkgCdromStatus() {}
+
+pkgCdrom::pkgCdrom() {}
+pkgCdrom::~pkgCdrom() {}
class pkgCdromStatus /*{{{*/
{
+ void *d;
protected:
int totalSteps;
public:
- pkgCdromStatus() : totalSteps(0) {};
- virtual ~pkgCdromStatus() {};
+ pkgCdromStatus();
+ virtual ~pkgCdromStatus();
// total steps
virtual void SetTotal(int total) { totalSteps = total; };
bool Ident(std::string &ident, pkgCdromStatus *log);
bool Add(pkgCdromStatus *log);
+ pkgCdrom();
+ virtual ~pkgCdrom();
+
private:
+ void *d;
+
APT_HIDDEN bool MountAndIdentCDROM(Configuration &Database, std::string &CDROM,
std::string &ident, pkgCdromStatus * const log, bool const interactive);
APT_HIDDEN bool UnmountCDROM(std::string const &CDROM, pkgCdromStatus * const log);
/*}}}*/
class pkgUdevCdromDevices /*{{{*/
{
+ void *d;
protected:
// libudev dlopen structure
void *libudev_handle;
}
/*}}}*/
+pkgArchiveCleaner::pkgArchiveCleaner() {}
APT_CONST pkgArchiveCleaner::~pkgArchiveCleaner() {}
public:
bool Go(std::string Dir,pkgCache &Cache);
+
+ pkgArchiveCleaner();
virtual ~pkgArchiveCleaner();
};
debSourcesIndex::~debSourcesIndex() {}
debDebPkgFileIndex::~debDebPkgFileIndex() {}
+debDscFileIndex::~debDscFileIndex() {}
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: debindexfile.h,v 1.3.2.1 2003/12/24 23:09:17 mdz Exp $
/* ######################################################################
Debian Index Files
class APT_HIDDEN debStatusIndex : public pkgIndexFile
{
+ void *d;
protected:
std::string File;
class APT_HIDDEN debPackagesIndex : public pkgIndexTargetFile
{
+ void *d;
public:
virtual const Type *GetType() const APT_CONST;
class APT_HIDDEN debTranslationsIndex : public pkgIndexTargetFile
{
+ void *d;
public:
virtual const Type *GetType() const APT_CONST;
class APT_HIDDEN debSourcesIndex : public pkgIndexTargetFile
{
+ void *d;
public:
virtual const Type *GetType() const APT_CONST;
class APT_HIDDEN debDscFileIndex : public pkgIndexFile
{
private:
+ void *d;
std::string DscFile;
public:
virtual const Type *GetType() const APT_CONST;
};
debDscFileIndex(std::string &DscFile);
- virtual ~debDscFileIndex() {};
+ virtual ~debDscFileIndex();
};
class APT_HIDDEN debDebianSourceDirIndex : public debDscFileIndex
}
/*}}}*/
+debDebFileMetaIndex::~debDebFileMetaIndex() {}
+
class APT_HIDDEN debSLTypeDebian : public pkgSourceList::Type
{
protected:
class APT_HIDDEN debDebFileMetaIndex : public metaIndex
{
private:
+ void *d;
std::string DebFile;
debDebPkgFileIndex *DebIndex;
public:
return true;
}
debDebFileMetaIndex(std::string const &DebFile);
- virtual ~debDebFileMetaIndex() {};
+ virtual ~debDebFileMetaIndex();
};
/*}}}*/
debRecordParser::~debRecordParser() {}
+debRecordParserBase::debRecordParserBase() : Parser() {}
// RecordParserBase::FileName - Return the archive filename on the site /*{{{*/
string debRecordParserBase::FileName()
{
return _error->Error(_("Unable to parse package file %s (%d)"), debFileName.c_str(), 3);
return true;
}
+bool debDebFileRecordParser::Jump(pkgCache::VerFileIterator const &) { return LoadContent(); }
+bool debDebFileRecordParser::Jump(pkgCache::DescFileIterator const &) { return LoadContent(); }
+std::string debDebFileRecordParser::FileName() { return debFileName; }
+
+debDebFileRecordParser::debDebFileRecordParser(std::string FileName) : debRecordParserBase(), debFileName(FileName) {}
+debDebFileRecordParser::~debDebFileRecordParser() {}
class APT_HIDDEN debRecordParserBase : public pkgRecords::Parser
{
+ void *d;
protected:
pkgTagSection Section;
virtual void GetRec(const char *&Start,const char *&Stop);
- debRecordParserBase() : Parser() {}
+ debRecordParserBase();
virtual ~debRecordParserBase();
};
class APT_HIDDEN debRecordParser : public debRecordParserBase
{
+ void *d;
protected:
FileFd File;
pkgTagFile Tags;
// custom record parser that reads deb files directly
class APT_HIDDEN debDebFileRecordParser : public debRecordParserBase
{
+ void *d;
std::string debFileName;
std::string controlContent;
APT_HIDDEN bool LoadContent();
protected:
// single file files, so no jumping whatsoever
- bool Jump(pkgCache::VerFileIterator const &) { return LoadContent(); }
- bool Jump(pkgCache::DescFileIterator const &) { return LoadContent(); }
+ bool Jump(pkgCache::VerFileIterator const &);
+ bool Jump(pkgCache::DescFileIterator const &);
public:
- virtual std::string FileName() { return debFileName; }
+ virtual std::string FileName();
- debDebFileRecordParser(std::string FileName)
- : debRecordParserBase(), debFileName(FileName) {};
+ debDebFileRecordParser(std::string FileName);
+ virtual ~debDebFileRecordParser();
};
#endif
using std::max;
using std::string;
+debSrcRecordParser::debSrcRecordParser(std::string const &File,pkgIndexFile const *Index)
+ : Parser(Index), Fd(File,FileFd::ReadOnly, FileFd::Extension), Tags(&Fd,102400),
+ iOffset(0), Buffer(NULL) {}
+
// SrcRecordParser::Binaries - Return the binaries field /*{{{*/
// ---------------------------------------------------------------------
/* This member parses the binaries field into a pair of class arrays and
virtual bool Files(std::vector<pkgSrcRecords::File> &F);
bool Files2(std::vector<pkgSrcRecords::File2> &F);
- debSrcRecordParser(std::string const &File,pkgIndexFile const *Index)
- : Parser(Index), Fd(File,FileFd::ReadOnly, FileFd::Extension), Tags(&Fd,102400),
- iOffset(0), Buffer(NULL) {}
+ debSrcRecordParser(std::string const &File,pkgIndexFile const *Index);
virtual ~debSrcRecordParser();
};
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: debversion.h,v 1.3 2001/05/03 05:25:04 jgg Exp $
/* ######################################################################
Debian Version - Versioning system for Debian
// -*- mode: c++; mode: fold -*-
// Description /*{{{*/
-// $Id: depcache.h,v 1.14 2001/02/20 07:03:17 jgg Exp $
/* ######################################################################
DepCache - Dependency Extension data for the cache
*/
class ActionGroup
{
+ void *d;
pkgDepCache &cache;
bool released;
* If this is the last action group, the automatic cache
* cleanup operations will be undertaken.
*/
- ~ActionGroup();
+ virtual ~ActionGroup();
};
/** \brief Returns \b true for packages matching a regular
bool const rPurge, unsigned long const Depth, bool const FromUser);
private:
+ void *d;
+
APT_HIDDEN bool IsModeChangeOk(ModeList const mode, PkgIterator const &Pkg,
unsigned long const Depth, bool const FromUser);
};
using std::string;
// we could use pkgCache::DepType and ::Priority, but these would be localized strings…
-const char * const EDSP::PrioMap[] = {0, "important", "required", "standard",
+const char * const PrioMap[] = {0, "important", "required", "standard",
"optional", "extra"};
-const char * const EDSP::DepMap[] = {"", "Depends", "Pre-Depends", "Suggests",
+const char * const DepMap[] = {"", "Depends", "Pre-Depends", "Suggests",
"Recommends" , "Conflicts", "Replaces",
"Obsoletes", "Breaks", "Enhances"};
-// EDSP::WriteScenario - to the given file descriptor /*{{{*/
-bool EDSP::WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress)
-{
- if (Progress != NULL)
- Progress->SubProgress(Cache.Head().VersionCount, _("Send scenario to solver"));
- unsigned long p = 0;
- std::vector<std::string> archs = APT::Configuration::getArchitectures();
- for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); Pkg.end() == false; ++Pkg)
- {
- std::string const arch = Pkg.Arch();
- if (std::find(archs.begin(), archs.end(), arch) == archs.end())
- continue;
- for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver, ++p)
- {
- WriteScenarioVersion(Cache, output, Pkg, Ver);
- WriteScenarioDependency(output, Ver);
- fprintf(output, "\n");
- if (Progress != NULL && p % 100 == 0)
- Progress->Progress(p);
- }
- }
- return true;
-}
- /*}}}*/
-// EDSP::WriteLimitedScenario - to the given file descriptor /*{{{*/
-bool EDSP::WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
- APT::PackageSet const &pkgset,
- OpProgress *Progress)
-{
- if (Progress != NULL)
- Progress->SubProgress(Cache.Head().VersionCount, _("Send scenario to solver"));
- unsigned long p = 0;
- for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg, ++p)
- for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver)
- {
- WriteScenarioVersion(Cache, output, Pkg, Ver);
- WriteScenarioLimitedDependency(output, Ver, pkgset);
- fprintf(output, "\n");
- if (Progress != NULL && p % 100 == 0)
- Progress->Progress(p);
- }
- if (Progress != NULL)
- Progress->Done();
- return true;
-}
- /*}}}*/
-// EDSP::WriteScenarioVersion /*{{{*/
-void EDSP::WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgIterator const &Pkg,
+
+// WriteScenarioVersion /*{{{*/
+static void WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::PkgIterator const &Pkg,
pkgCache::VerIterator const &Ver)
{
fprintf(output, "Package: %s\n", Pkg.Name());
fprintf(output, "APT-Automatic: yes\n");
}
/*}}}*/
-// EDSP::WriteScenarioDependency /*{{{*/
-void EDSP::WriteScenarioDependency( FILE* output, pkgCache::VerIterator const &Ver)
+// WriteScenarioDependency /*{{{*/
+static void WriteScenarioDependency( FILE* output, pkgCache::VerIterator const &Ver)
{
std::string dependencies[pkgCache::Dep::Enhances + 1];
bool orGroup = false;
fprintf(output, "Provides: %s\n", provides.c_str()+2);
}
/*}}}*/
-// EDSP::WriteScenarioLimitedDependency /*{{{*/
-void EDSP::WriteScenarioLimitedDependency(FILE* output,
+// WriteScenarioLimitedDependency /*{{{*/
+static void WriteScenarioLimitedDependency(FILE* output,
pkgCache::VerIterator const &Ver,
APT::PackageSet const &pkgset)
{
fprintf(output, "Provides: %s\n", provides.c_str()+2);
}
/*}}}*/
+// EDSP::WriteScenario - to the given file descriptor /*{{{*/
+bool EDSP::WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress)
+{
+ if (Progress != NULL)
+ Progress->SubProgress(Cache.Head().VersionCount, _("Send scenario to solver"));
+ unsigned long p = 0;
+ std::vector<std::string> archs = APT::Configuration::getArchitectures();
+ for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); Pkg.end() == false; ++Pkg)
+ {
+ std::string const arch = Pkg.Arch();
+ if (std::find(archs.begin(), archs.end(), arch) == archs.end())
+ continue;
+ for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver, ++p)
+ {
+ WriteScenarioVersion(Cache, output, Pkg, Ver);
+ WriteScenarioDependency(output, Ver);
+ fprintf(output, "\n");
+ if (Progress != NULL && p % 100 == 0)
+ Progress->Progress(p);
+ }
+ }
+ return true;
+}
+ /*}}}*/
+// EDSP::WriteLimitedScenario - to the given file descriptor /*{{{*/
+bool EDSP::WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
+ APT::PackageSet const &pkgset,
+ OpProgress *Progress)
+{
+ if (Progress != NULL)
+ Progress->SubProgress(Cache.Head().VersionCount, _("Send scenario to solver"));
+ unsigned long p = 0;
+ for (APT::PackageSet::const_iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg, ++p)
+ for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver)
+ {
+ WriteScenarioVersion(Cache, output, Pkg, Ver);
+ WriteScenarioLimitedDependency(output, Ver, pkgset);
+ fprintf(output, "\n");
+ if (Progress != NULL && p % 100 == 0)
+ Progress->Progress(p);
+ }
+ if (Progress != NULL)
+ Progress->Done();
+ return true;
+}
+ /*}}}*/
// EDSP::WriteRequest - to the given file descriptor /*{{{*/
bool EDSP::WriteRequest(pkgDepCache &Cache, FILE* output, bool const Upgrade,
bool const DistUpgrade, bool const AutoRemove,
return true;
}
/*}}}*/
-// EDSP::ReadLine - first line from the given file descriptor /*{{{*/
+// ReadLine - first line from the given file descriptor /*{{{*/
// ---------------------------------------------------------------------
/* Little helper method to read a complete line into a string. Similar to
fgets but we need to use the low-level read() here as otherwise the
listparser will be confused later on as mixing of fgets and read isn't
a supported action according to the manpages and results are undefined */
-bool EDSP::ReadLine(int const input, std::string &line) {
+static bool ReadLine(int const input, std::string &line) {
char one;
ssize_t data = 0;
line.erase();
return false;
}
/*}}}*/
-// EDSP::StringToBool - convert yes/no to bool /*{{{*/
+// StringToBool - convert yes/no to bool /*{{{*/
// ---------------------------------------------------------------------
/* we are not as lazy as we are in the global StringToBool as we really
only accept yes/no here - but we will ignore leading spaces */
-bool EDSP::StringToBool(char const *answer, bool const defValue) {
+static bool StringToBool(char const *answer, bool const defValue) {
for (; isspace(*answer) != 0; ++answer);
if (strncasecmp(answer, "yes", 3) == 0)
return true;
request = &remove;
}
else if (line.compare(0, 8, "Upgrade:") == 0)
- upgrade = EDSP::StringToBool(line.c_str() + 9, false);
+ upgrade = StringToBool(line.c_str() + 9, false);
else if (line.compare(0, 13, "Dist-Upgrade:") == 0)
- distUpgrade = EDSP::StringToBool(line.c_str() + 14, false);
+ distUpgrade = StringToBool(line.c_str() + 14, false);
else if (line.compare(0, 11, "Autoremove:") == 0)
- autoRemove = EDSP::StringToBool(line.c_str() + 12, false);
+ autoRemove = StringToBool(line.c_str() + 12, false);
else if (line.compare(0, 13, "Architecture:") == 0)
_config->Set("APT::Architecture", line.c_str() + 14);
else if (line.compare(0, 14, "Architectures:") == 0)
class pkgDepCache;
class OpProgress;
-class EDSP /*{{{*/
+namespace EDSP /*{{{*/
{
- // we could use pkgCache::DepType and ::Priority, but these would be localized strings…
- static const char * const PrioMap[];
- static const char * const DepMap[];
-
- APT_HIDDEN bool static ReadLine(int const input, std::string &line);
- APT_HIDDEN bool static StringToBool(char const *answer, bool const defValue);
-
- APT_HIDDEN void static WriteScenarioVersion(pkgDepCache &Cache, FILE* output,
- pkgCache::PkgIterator const &Pkg,
- pkgCache::VerIterator const &Ver);
- APT_HIDDEN void static WriteScenarioDependency(FILE* output,
- pkgCache::VerIterator const &Ver);
- APT_HIDDEN void static WriteScenarioLimitedDependency(FILE* output,
- pkgCache::VerIterator const &Ver,
- APT::PackageSet const &pkgset);
-public:
/** \brief creates the EDSP request stanza
*
* In the EDSP protocol the first thing send to the resolver is a stanza
*
* \return true if request was composed successfully, otherwise false
*/
- bool static WriteRequest(pkgDepCache &Cache, FILE* output,
+ bool WriteRequest(pkgDepCache &Cache, FILE* output,
bool const upgrade = false,
bool const distUpgrade = false,
bool const autoRemove = false,
*
* \return true if universe was composed successfully, otherwise false
*/
- bool static WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress = NULL);
+ bool WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress = NULL);
/** \brief creates a limited scenario representing the package universe
*
*
* \return true if universe was composed successfully, otherwise false
*/
- bool static WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
+ bool WriteLimitedScenario(pkgDepCache &Cache, FILE* output,
APT::PackageSet const &pkgset,
OpProgress *Progress = NULL);
*
* \return true if a solution is found and applied correctly, otherwise false
*/
- bool static ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progress = NULL);
+ bool ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progress = NULL);
/** \brief search and read the request stanza for action later
*
*
* \return true if the request could be found and worked on, otherwise false
*/
- bool static ReadRequest(int const input, std::list<std::string> &install,
+ bool ReadRequest(int const input, std::list<std::string> &install,
std::list<std::string> &remove, bool &upgrade,
bool &distUpgrade, bool &autoRemove);
*
* \return false if the request couldn't be applied, true otherwise
*/
- bool static ApplyRequest(std::list<std::string> const &install,
+ bool ApplyRequest(std::list<std::string> const &install,
std::list<std::string> const &remove,
pkgDepCache &Cache);
*
* \return true if solution could be written, otherwise false
*/
- bool static WriteSolution(pkgDepCache &Cache, FILE* output);
+ bool WriteSolution(pkgDepCache &Cache, FILE* output);
/** \brief sends a progress report
*
* \param message the solver wants the user to see
* \param output the front-end listens for progress report
*/
- bool static WriteProgress(unsigned short const percent, const char* const message, FILE* output);
+ bool WriteProgress(unsigned short const percent, const char* const message, FILE* output);
/** \brief sends an error report
*
* \param message is free form text to describe the error
* \param output the front-end listens for error messages
*/
- bool static WriteError(char const * const uuid, std::string const &message, FILE* output);
+ bool WriteError(char const * const uuid, std::string const &message, FILE* output);
/** \brief executes the given solver and returns the pipe ends
*
* \return PID of the started solver or 0 if failure occurred
*/
- pid_t static ExecuteSolver(const char* const solver, int * const solver_in, int * const solver_out, bool /*overload*/);
- APT_DEPRECATED bool static ExecuteSolver(const char* const solver, int *solver_in, int *solver_out);
+ pid_t ExecuteSolver(const char* const solver, int * const solver_in, int * const solver_out, bool /*overload*/);
+ APT_DEPRECATED bool ExecuteSolver(const char* const solver, int *solver_in, int *solver_out);
/** \brief call an external resolver to handle the request
*
* \return true if the solver has successfully solved the problem,
* otherwise false
*/
- bool static ResolveExternal(const char* const solver, pkgDepCache &Cache,
+ bool ResolveExternal(const char* const solver, pkgDepCache &Cache,
bool const upgrade, bool const distUpgrade,
bool const autoRemove, OpProgress *Progress = NULL);
};
return &_apt_Universe;
}
/*}}}*/
+
+edspIndex::~edspIndex() {}
virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
edspIndex(std::string File);
+ virtual ~edspIndex();
};
#endif
return true;
}
/*}}}*/
+
+edspListParser::~edspListParser() {}
class APT_HIDDEN edspListParser : public debListParser
{
+ void *d;
public:
virtual bool NewVersion(pkgCache::VerIterator &Ver);
virtual std::string Description();
std::string const §ion);
edspListParser(FileFd *File, std::string const &Arch = "");
+ virtual ~edspListParser();
protected:
virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver);
pkgIndexFile *&Found) const;
edspSystem();
- ~edspSystem();
+ virtual ~edspSystem();
};
#endif
}
/*}}}*/
+IndexCopy::IndexCopy() {}
APT_CONST IndexCopy::~IndexCopy() {}
+
+PackageCopy::PackageCopy() : IndexCopy() {}
+APT_CONST PackageCopy::~PackageCopy() {}
+SourceCopy::SourceCopy() : IndexCopy() {}
+APT_CONST SourceCopy::~SourceCopy() {}
+TranslationsCopy::TranslationsCopy() {}
+APT_CONST TranslationsCopy::~TranslationsCopy() {}
+SigVerify::SigVerify() {}
+APT_CONST SigVerify::~SigVerify() {}
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: indexcopy.h,v 1.3 2001/05/27 04:46:54 jgg Exp $
/* ######################################################################
Index Copying - Aid for copying and verifying the index files
bool CopyPackages(std::string CDROM,std::string Name,std::vector<std::string> &List,
pkgCdromStatus *log);
+ IndexCopy();
virtual ~IndexCopy();
};
/*}}}*/
class PackageCopy : public IndexCopy /*{{{*/
{
+ void *d;
protected:
-
+
virtual bool GetFile(std::string &Filename,unsigned long long &Size);
virtual bool RewriteEntry(FileFd &Target, std::string const &File);
virtual const char *GetFileName() {return "Packages";};
virtual const char *Type() {return "Package";};
-
+
+ public:
+ PackageCopy();
+ virtual ~PackageCopy();
};
/*}}}*/
class SourceCopy : public IndexCopy /*{{{*/
{
+ void *d;
protected:
virtual bool GetFile(std::string &Filename,unsigned long long &Size);
virtual bool RewriteEntry(FileFd &Target, std::string const &File);
virtual const char *GetFileName() {return "Sources";};
virtual const char *Type() {return "Source";};
-
+
+ public:
+ SourceCopy();
+ virtual ~SourceCopy();
};
/*}}}*/
class TranslationsCopy /*{{{*/
{
+ void *d;
protected:
pkgTagSection *Section;
public:
bool CopyTranslations(std::string CDROM,std::string Name,std::vector<std::string> &List,
pkgCdromStatus *log);
+
+ TranslationsCopy();
+ virtual ~TranslationsCopy();
};
/*}}}*/
class SigVerify /*{{{*/
int const &statusfd, int fd[2]);
APT_DEPRECATED static bool RunGPGV(std::string const &File, std::string const &FileOut,
int const &statusfd = -1);
+
+ SigVerify();
+ virtual ~SigVerify();
};
/*}}}*/
return FileExists(IndexFileName());
}
/*}}}*/
+
+APT_CONST pkgIndexFile::~pkgIndexFile() {}
+APT_CONST pkgIndexTargetFile::~pkgIndexTargetFile() {}
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: indexfile.h,v 1.6.2.1 2003/12/24 23:09:17 mdz Exp $
/* ######################################################################
Index File - Abstraction for an index of archive/source file.
class pkgIndexFile
{
+ void *d;
protected:
bool Trusted;
bool IsTrusted() const { return Trusted; };
pkgIndexFile(bool Trusted);
- virtual ~pkgIndexFile() {};
+ virtual ~pkgIndexFile();
};
class pkgIndexTargetFile : public pkgIndexFile
{
+ void *d;
protected:
IndexTarget const Target;
virtual unsigned long Size() const;
pkgIndexTargetFile(IndexTarget const &Target, bool const Trusted);
+ virtual ~pkgIndexTargetFile();
};
#endif
// -*- mode: cpp; mode: fold -*-
-// Description /*{{{*/
-// $Id: indexrecords.h,v 1.1.2.1 2003/12/24 23:09:17 mdz Exp $
- /*}}}*/
#ifndef PKGLIB_INDEXRECORDS_H
#define PKGLIB_INDEXRECORDS_H
{
OutStatusFd = progress_fd;
}
+PackageManagerProgressFd::~PackageManagerProgressFd() {}
void PackageManagerProgressFd::WriteToStatusFd(std::string s)
{
{
OutStatusFd = progress_fd;
}
+PackageManagerProgressDeb822Fd::~PackageManagerProgressDeb822Fd() {}
void PackageManagerProgressDeb822Fd::WriteToStatusFd(std::string s)
{
return true;
}
+PackageManagerText::PackageManagerText() : PackageManager() {}
+PackageManagerText::~PackageManagerText() {}
+
+
} // namespace progress
class PackageManagerProgressFd : public PackageManager
{
+ void *d;
protected:
int OutStatusFd;
int StepsDone;
public:
PackageManagerProgressFd(int progress_fd);
+ virtual ~PackageManagerProgressFd();
virtual void StartDpkg();
virtual void Stop();
class PackageManagerProgressDeb822Fd : public PackageManager
{
+ void *d;
protected:
int OutStatusFd;
int StepsDone;
public:
PackageManagerProgressDeb822Fd(int progress_fd);
+ virtual ~PackageManagerProgressDeb822Fd();
virtual void StartDpkg();
virtual void Stop();
class PackageManagerFancy : public PackageManager
{
+ void *d;
private:
APT_HIDDEN static void staticSIGWINCH(int);
static std::vector<PackageManagerFancy*> instances;
public:
PackageManagerFancy();
- ~PackageManagerFancy();
+ virtual ~PackageManagerFancy();
virtual void Start(int child_pty=-1);
virtual void Stop();
virtual bool StatusChanged(std::string PackageName,
class PackageManagerText : public PackageManager
{
+ void *d;
public:
virtual bool StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps,
std::string HumanReadableAction);
+
+ PackageManagerText();
+ virtual ~PackageManagerText();
};
class metaIndex
{
+ void *d;
protected:
std::vector <pkgIndexFile *> *Indexes;
const char *Type;
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: orderlist.h,v 1.9 2001/02/20 07:03:17 jgg Exp $
/* ######################################################################
Order List - Represents and Manipulates an ordered list of packages.
class pkgDepCache;
class pkgOrderList : protected pkgCache::Namespace
{
+ void *d;
protected:
pkgDepCache &Cache;
int Score(PkgIterator Pkg);
pkgOrderList(pkgDepCache *Cache);
- ~pkgOrderList();
+ virtual ~pkgOrderList();
};
#endif
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: packagemanager.h,v 1.14 2001/05/07 04:24:08 jgg Exp $
/* ######################################################################
Package Manager - Abstacts the package manager
virtual ~pkgPackageManager();
private:
+ void *d;
enum APT_HIDDEN SmartAction { UNPACK_IMMEDIATE, UNPACK, CONFIGURE };
APT_HIDDEN bool NonLoopingSmart(SmartAction const action, pkgCache::PkgIterator &Pkg,
pkgCache::PkgIterator DepPkg, int const Depth, bool const PkgLoop,
return false;
}
/*}}}*/
+
+pkgCache::~pkgCache() {}
static const char *CompTypeDeb(unsigned char Comp) APT_CONST;
static const char *CompType(unsigned char Comp) APT_CONST;
static const char *DepType(unsigned char Dep);
-
+
pkgCache(MMap *Map,bool DoMap = true);
- virtual ~pkgCache() {}
+ virtual ~pkgCache();
private:
+ void *d;
bool MultiArchEnabled;
APT_HIDDEN PkgIterator SingleArchFindPkg(const std::string &Name);
};
return true;
}
/*}}}*/
+
+pkgCacheGenerator::ListParser::ListParser() : Owner(NULL), OldDepLast(NULL), FoundFileDeps(false) {}
+pkgCacheGenerator::ListParser::~ListParser() {}
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcachegen.h,v 1.19 2002/07/08 03:13:30 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
void ReMap(void const * const oldMap, void const * const newMap);
pkgCacheGenerator(DynamicMMap *Map,OpProgress *Progress);
- ~pkgCacheGenerator();
+ virtual ~pkgCacheGenerator();
private:
+ void *d;
APT_HIDDEN bool MergeListGroup(ListParser &List, std::string const &GrpName);
APT_HIDDEN bool MergeListPackage(ListParser &List, pkgCache::PkgIterator &Pkg);
APT_HIDDEN bool MergeListVersion(ListParser &List, pkgCache::PkgIterator &Pkg,
// Flag file dependencies
bool FoundFileDeps;
-
+
+ void *d;
+
protected:
inline map_stringitem_t StoreString(pkgCacheGenerator::StringType const type, std::string const &S) {return Owner->StoreString(type, S);};
* \param Hash of the currently parsed version
* \param Ver to compare with
*/
-#if APT_PKG_ABI >= 413
- virtual
-#endif
- APT_PURE bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver);
+ virtual bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver);
virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
pkgCache::VerIterator &Ver) = 0;
virtual map_filesize_t Offset() = 0;
virtual bool CollectFileProvides(pkgCache &/*Cache*/,
pkgCache::VerIterator &/*Ver*/) {return true;};
- ListParser() : Owner(NULL), OldDepLast(NULL), FoundFileDeps(false) {};
- virtual ~ListParser() {};
+ ListParser();
+ virtual ~ListParser();
};
/*}}}*/
return *Files[Desc.File()->ID];
}
/*}}}*/
+
+pkgRecords::Parser::Parser() {}
+pkgRecords::Parser::~Parser() {}
// Construct destruct
pkgRecords(pkgCache &Cache);
- ~pkgRecords();
+ virtual ~pkgRecords();
};
/*}}}*/
class pkgRecords::Parser /*{{{*/
// The record in binary form
virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;};
-
- virtual ~Parser() {};
+
+ Parser();
+ virtual ~Parser();
private:
+ void *d;
APT_HIDDEN std::string GetHashFromHashes(char const * const type) const
{
HashStringList const hashes = Hashes();
return 0;
}
/*}}}*/
+
+pkgSystem::~pkgSystem() {}
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgsystem.h,v 1.6 2002/11/11 06:55:50 doogie Exp $
/* ######################################################################
System - Abstraction for running on different systems.
};
pkgSystem();
- virtual ~pkgSystem() {};
+ virtual ~pkgSystem();
+ private:
+ void *d;
};
// The environment we are operating in.
return true;
}
/*}}}*/
+
+pkgPolicy::~pkgPolicy() {delete [] PFPriority; delete [] Pins;}
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: policy.h,v 1.4 2001/05/07 04:24:08 jgg Exp $
/* ######################################################################
Package Version Policy implementation
bool InitDefaults();
pkgPolicy(pkgCache *Owner);
- virtual ~pkgPolicy() {delete [] PFPriority; delete [] Pins;};
+ virtual ~pkgPolicy();
+ private:
+ void *d;
};
bool ReadPinFile(pkgPolicy &Plcy, std::string File = "");
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: sourcelist.h,v 1.12.2.1 2003/12/24 23:09:17 mdz Exp $
/* ######################################################################
SourceList - Manage a list of sources
class pkgSourceList
{
+ void *d;
public:
// List of supported source list types
pkgSourceList();
pkgSourceList(std::string File);
- ~pkgSourceList();
+ virtual ~pkgSourceList();
};
#endif
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: srcrecords.h,v 1.8.2.1 2003/12/26 16:27:34 mdz Exp $
/* ######################################################################
Source Package Records - Allows access to source package records
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: tagfile.h,v 1.20 2003/05/19 17:13:57 doogie Exp $
/* ######################################################################
Fast scanner for RFC-822 type header information
APT_DEPRECATED unsigned int TagCount;
#endif
- // dpointer placeholder (for later in case we need it)
pkgTagSectionPrivate *d;
protected:
return 0;
}
/*}}}*/
+
+
+pkgVersioningSystem::~pkgVersioningSystem() {}
APT_MKSTRCMP(CmpReleaseVer,DoCmpReleaseVer);
pkgVersioningSystem();
- virtual ~pkgVersioningSystem() {};
+ virtual ~pkgVersioningSystem();
};
#endif
AcqTextStatus Stat(out, width, 0);
Stat.Start();
+ pkgAcquire Acq(&Stat);
pkgAcquire::ItemDesc hit;
hit.URI = "http://example.org/file";
hit.Description = "Example File from example.org";
hit.ShortDesc = "Example File";
- hit.Owner = NULL;
+ TestItem hitO(&Acq);
+ hit.Owner = &hitO;
EXPECT_EQ("", out.str());
Stat.IMSHit(hit);
- EXPECT_EQ("Hit Example File from example.org\n", out.str());
+ EXPECT_EQ("Hit:1 Example File from example.org\n", out.str());
Stat.IMSHit(hit);
- EXPECT_EQ("Hit Example File from example.org\n"
- "Hit Example File from example.org\n", out.str());
+ EXPECT_EQ("Hit:1 Example File from example.org\n"
+ "Hit:1 Example File from example.org\n", out.str());
Stat.Stop();
- EXPECT_EQ("Hit Example File from example.org\n"
- "Hit Example File from example.org\n", out.str());
+ EXPECT_EQ("Hit:1 Example File from example.org\n"
+ "Hit:1 Example File from example.org\n", out.str());
}
TEST(AcqProgress, FetchNoFileSize)
{
EXPECT_EQ("Get:1 Example File from example.org\n", out.str());
Stat.Fetch(fetch);
EXPECT_EQ("Get:1 Example File from example.org\n"
- "Get:2 Example File from example.org\n", out.str());
+ "Get:1 Example File from example.org\n", out.str());
Stat.Stop();
EXPECT_EQ("Get:1 Example File from example.org\n"
- "Get:2 Example File from example.org\n", out.str());
+ "Get:1 Example File from example.org\n", out.str());
}
TEST(AcqProgress, FetchFileSize)
{
fetchO.FileSize = 42;
Stat.Fetch(fetch);
EXPECT_EQ("Get:1 Example File from example.org [100 B]\n"
- "Get:2 Example File from example.org [42 B]\n", out.str());
+ "Get:1 Example File from example.org [42 B]\n", out.str());
Stat.Stop();
EXPECT_EQ("Get:1 Example File from example.org [100 B]\n"
- "Get:2 Example File from example.org [42 B]\n", out.str());
+ "Get:1 Example File from example.org [42 B]\n", out.str());
}
TEST(AcqProgress, Fail)
{
EXPECT_EQ("", out.str());
Stat.Fail(fetch);
- EXPECT_EQ("", out.str());
+ EXPECT_EQ("Ign:1 Example File from example.org\n", out.str());
fetchO.Status = pkgAcquire::Item::StatDone;
Stat.Fail(fetch);
- EXPECT_EQ("Ign Example File from example.org\n", out.str());
+ EXPECT_EQ("Ign:1 Example File from example.org\n"
+ "Ign:1 Example File from example.org\n", out.str());
fetchO.Status = pkgAcquire::Item::StatError;
fetchO.ErrorText = "An error test!";
Stat.Fail(fetch);
- EXPECT_EQ("Ign Example File from example.org\n"
- "Err Example File from example.org\n"
+ EXPECT_EQ("Ign:1 Example File from example.org\n"
+ "Ign:1 Example File from example.org\n"
+ "Err:1 Example File from example.org\n"
" An error test!\n", out.str());
_config->Set("Acquire::Progress::Ignore::ShowErrorText", true);
fetchO.Status = pkgAcquire::Item::StatDone;
Stat.Fail(fetch);
- EXPECT_EQ("Ign Example File from example.org\n"
- "Err Example File from example.org\n"
+ EXPECT_EQ("Ign:1 Example File from example.org\n"
+ "Ign:1 Example File from example.org\n"
+ "Err:1 Example File from example.org\n"
" An error test!\n"
- "Ign Example File from example.org\n"
+ "Ign:1 Example File from example.org\n"
" An error test!\n", out.str());
_config->Set("Acquire::Progress::Ignore::ShowErrorText", true);
Stat.Stop();
- EXPECT_EQ("Ign Example File from example.org\n"
- "Err Example File from example.org\n"
+ EXPECT_EQ("Ign:1 Example File from example.org\n"
+ "Ign:1 Example File from example.org\n"
+ "Err:1 Example File from example.org\n"
" An error test!\n"
- "Ign Example File from example.org\n"
+ "Ign:1 Example File from example.org\n"
" An error test!\n", out.str());
}
TEST(AcqProgress, Pulse)