dpkgpm.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: dpkgpm.h,v 1.2 1998/11/23 07:03:12 jgg Exp $
  4. /* ######################################################################
  5. DPKG Package Manager - Provide an interface to dpkg
  6. ##################################################################### */
  7. /*}}}*/
  8. #ifndef PKGLIB_DPKGPM_H
  9. #define PKGLIB_DPKGPM_H
  10. #ifdef __GNUG__
  11. #pragma interface "apt-pkg/dpkgpm.h"
  12. #endif
  13. #include <apt-pkg/packagemanager.h>
  14. #include <vector>
  15. class pkgDPkgPM : public pkgPackageManager
  16. {
  17. protected:
  18. struct Item
  19. {
  20. enum Ops {Install, Configure, Remove} Op;
  21. string File;
  22. PkgIterator Pkg;
  23. Item(Ops Op,PkgIterator Pkg,string File = "") : Op(Op),
  24. File(File), Pkg(Pkg) {};
  25. Item() {};
  26. };
  27. vector<Item> List;
  28. // The Actuall installation implementation
  29. virtual bool Install(PkgIterator Pkg,string File);
  30. virtual bool Configure(PkgIterator Pkg);
  31. virtual bool Remove(PkgIterator Pkg);
  32. virtual bool Go();
  33. public:
  34. pkgDPkgPM(pkgDepCache &Cache);
  35. virtual ~pkgDPkgPM();
  36. };
  37. #endif