diff options
author | Michael Vogt <mvo@debian.org> | 2014-01-06 07:51:45 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2014-01-06 07:51:45 +0100 |
commit | 1b4560fec66a6e7b2dff9aaa19095fb8423f69a0 (patch) | |
tree | 7fb2b63e31f356ef87af4699ba87b4f1443f508c /apt-pkg/install-progress.h | |
parent | 81d183681aea972fddd453d62109f8ccda3f447a (diff) | |
parent | 74d4bb26e09146b9d5f01889a676dc58ff5d63cd (diff) |
Merge branch 'debian/sid' into feature/apt-manpage
Diffstat (limited to 'apt-pkg/install-progress.h')
-rw-r--r-- | apt-pkg/install-progress.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/apt-pkg/install-progress.h b/apt-pkg/install-progress.h index d721c6373..8a5b68a8f 100644 --- a/apt-pkg/install-progress.h +++ b/apt-pkg/install-progress.h @@ -3,7 +3,8 @@ #include <string> #include <unistd.h> - +#include <signal.h> +#include <vector> 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 @@ -116,13 +117,22 @@ namespace Progress { class PackageManagerFancy : public PackageManager { + private: + static void staticSIGWINCH(int); + static std::vector<PackageManagerFancy*> 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, |