#ifndef PKGLIB_PACKAGEMANAGER_H
#define PKGLIB_PACKAGEMANAGER_H
+#include <apt-pkg/macros.h>
#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/install-progress.h>
#include <string>
#include <iostream>
class pkgSourceList;
class pkgOrderList;
class pkgRecords;
+
+
class pkgPackageManager : protected pkgCache::Namespace
{
public:
virtual bool Install(PkgIterator /*Pkg*/,std::string /*File*/) {return false;};
virtual bool Configure(PkgIterator /*Pkg*/) {return false;};
virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;};
- virtual bool Go(int statusFd=-1) {return true;};
+ virtual bool Go(APT::Progress::PackageManager *progress) {return true;};
virtual void Reset() {};
// the result of the operation
pkgRecords *Recs);
// Do the installation
- OrderResult DoInstall(int statusFd=-1);
+ OrderResult DoInstall(APT::Progress::PackageManager *progress);
+ // compat
+ __deprecated OrderResult DoInstall(int statusFd=-1);
// stuff that needs to be done before the fork() of a library that
// uses apt
};
// stuff that needs to be done after the fork
- OrderResult DoInstallPostFork(int statusFd=-1);
+ OrderResult DoInstallPostFork(APT::Progress::PackageManager *progress);
+ // compat
+ __deprecated OrderResult DoInstallPostFork(int statusFd=-1);
+
+ // ?
bool FixMissing();
/** \brief returns all packages dpkg let disappear */