dpkgpm.h 1.1 KB

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