You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

61 lines
1.3 KiB

#ifndef PKGLIB_IPROGRESS_H
#define PKGLIB_IPROGRSS_H
#include <apt-pkg/packagemanager.h>
namespace APT {
namespace Progress {
class PackageManager
{
private:
/** \brief dpointer placeholder */
void *d;
public:
virtual ~PackageManager() {};
virtual void Started() {};
virtual void Finished() {};
virtual void StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps) {};
};
class PackageManagerFancy : public PackageManager
{
protected:
int last_reported_progress;
int nr_terminal_rows;
void SetupTerminalScrollArea(int nr_rows);
public:
PackageManagerFancy();
virtual void Started();
virtual void Finished();
virtual void StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps);
};
class PackageManagerText : public PackageManager
{
protected:
int last_reported_progress;
public:
PackageManagerText() : last_reported_progress(0) {};
virtual void StatusChanged(std::string PackageName,
unsigned int StepsDone,
unsigned int TotalSteps);
};
}; // namespace Progress
}; // namespace APT
#endif