X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d7a4635391d9ff36152603ab6faa6eafa206750a..4c333a25a88b1afac2ed50bf1b9af61dc5b09343:/apt-pkg/deb/dpkgpm.h diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h index c31d56f8e..6bd6ce0ee 100644 --- a/apt-pkg/deb/dpkgpm.h +++ b/apt-pkg/deb/dpkgpm.h @@ -11,10 +11,20 @@ #define PKGLIB_DPKGPM_H #include +#include +#include + #include #include #include -#include +#include + +#ifndef APT_10_CLEANER_HEADERS +#include +#endif + +class pkgDepCache; +namespace APT { namespace Progress { class PackageManager; } } #ifndef APT_8_CLEANER_HEADERS using std::vector; @@ -23,6 +33,7 @@ using std::map; class pkgDPkgPMPrivate; + class pkgDPkgPM : public pkgPackageManager { private: @@ -80,9 +91,14 @@ class pkgDPkgPM : public pkgPackageManager // Helpers bool RunScriptsWithPkgs(const char *Cnf); - __deprecated bool SendV2Pkgs(FILE *F); + APT_DEPRECATED bool SendV2Pkgs(FILE *F); bool SendPkgsInfo(FILE * const F, unsigned int const &Version); void WriteHistoryTag(std::string const &tag, std::string value); + std::string ExpandShortPackageName(pkgDepCache &Cache, + const std::string &short_pkgname); + + // Terminal progress + void SendTerminalProgress(float percentage); // apport integration void WriteApportReport(const char *pkgpath, const char *errormsg); @@ -90,18 +106,27 @@ class pkgDPkgPM : public pkgPackageManager // dpkg log bool OpenLog(); bool CloseLog(); + + // helper + void BuildPackagesProgressMap(); + void StartPtyMagic(); + void SetupSlavePtyMagic(); + void StopPtyMagic(); // input processing void DoStdin(int master); void DoTerminalPty(int master); - void DoDpkgStatusFd(int statusfd, int OutStatusFd); - void ProcessDpkgStatusLine(int OutStatusFd, char *line); + void DoDpkgStatusFd(int statusfd); + void ProcessDpkgStatusLine(char *line); // The Actuall installation implementation virtual bool Install(PkgIterator Pkg,std::string File); virtual bool Configure(PkgIterator Pkg); virtual bool Remove(PkgIterator Pkg,bool Purge = false); + + virtual bool Go(APT::Progress::PackageManager *progress); virtual bool Go(int StatusFd=-1); + virtual void Reset(); public: