X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/e45c4617e496b49f8d7225546a751022f246a2f3..2f0ae309be91f0a4d92c32b815f5f8ae10ab3221:/apt-pkg/install-progress.h diff --git a/apt-pkg/install-progress.h b/apt-pkg/install-progress.h index 5291039d8..8a5b68a8f 100644 --- a/apt-pkg/install-progress.h +++ b/apt-pkg/install-progress.h @@ -3,7 +3,8 @@ #include #include - +#include +#include namespace APT { namespace Progress { @@ -28,7 +29,7 @@ namespace Progress { virtual ~PackageManager() {}; /* Global Start/Stop */ - virtual void Start() {}; + virtual void Start(int child_pty=-1) {}; virtual void Stop() {}; /* When dpkg is invoked (may happen multiple times for each @@ -97,7 +98,7 @@ namespace Progress { public: PackageManagerProgressDeb822Fd(int progress_fd); - virtual void Start(); + virtual void StartDpkg(); virtual void Stop(); virtual bool StatusChanged(std::string PackageName, @@ -116,13 +117,22 @@ namespace Progress { class PackageManagerFancy : public PackageManager { + private: + static void staticSIGWINCH(int); + static std::vector instances; + protected: - int nr_terminal_rows; void SetupTerminalScrollArea(int nr_rows); + void HandleSIGWINCH(int); + + int GetNumberTerminalRows(); + sighandler_t old_SIGWINCH; + int child_pty; public: PackageManagerFancy(); - virtual void Start(); + ~PackageManagerFancy(); + virtual void Start(int child_pty=-1); virtual void Stop(); virtual bool StatusChanged(std::string PackageName, unsigned int StepsDone,