#include<iterator>
#include <iosfwd>
#include <string>
+#ifdef APT_PKG_EXPOSE_STRING_VIEW
+#include <apt-pkg/string_view.h>
+#endif
#include<string.h>
inline const char *Name() const {return S->Name == 0?0:Owner->StrP + S->Name;}
inline PkgIterator PackageList() const;
PkgIterator FindPkg(std::string Arch = "any") const;
+#ifdef APT_PKG_EXPOSE_STRING_VIEW
+ APT_HIDDEN PkgIterator FindPkg(APT::StringView Arch = APT::StringView("any", 3)) const;
+ APT_HIDDEN PkgIterator FindPkg(const char *Arch) const;
+#endif
/** \brief find the package with the "best" architecture
The best architecture is either the "native" or the first
inline DepIterator RevDependsList() const APT_PURE;
inline PrvIterator ProvidesList() const APT_PURE;
OkState State() const APT_PURE;
- const char *CandVersion() const APT_PURE;
+ APT_DEPRECATED_MSG("This method does not respect apt_preferences! Use pkgDepCache::GetCandidateVersion(Pkg)") const char *CandVersion() const APT_PURE;
const char *CurVersion() const APT_PURE;
//Nice printable representation
- friend std::ostream& operator <<(std::ostream& out, PkgIterator i);
+ APT_DEPRECATED_MSG("Use APT::PrettyPkg instead") friend std::ostream& operator <<(std::ostream& out, PkgIterator i);
std::string FullName(bool const &Pretty = false) const;
// Constructors
}
//Nice printable representation
- friend std::ostream& operator <<(std::ostream& out, DepIterator D);
+ APT_DEPRECATED_MSG("Use APT::PrettyDep instead") friend std::ostream& operator <<(std::ostream& out, DepIterator D);
inline DepIterator(pkgCache &Owner, Dependency *Trg, Version* = 0) :
Iterator<Dependency, DepIterator>(Owner, Trg), Type(DepVer), S2(Trg == 0 ? Owner.DepDataP : (Owner.DepDataP + Trg->DependencyData)) {