summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/dpkgpm.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb/dpkgpm.h')
-rw-r--r--apt-pkg/deb/dpkgpm.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/apt-pkg/deb/dpkgpm.h b/apt-pkg/deb/dpkgpm.h
new file mode 100644
index 000000000..b5f08ea32
--- /dev/null
+++ b/apt-pkg/deb/dpkgpm.h
@@ -0,0 +1,49 @@
+// -*- mode: cpp; mode: fold -*-
+// Description /*{{{*/
+// $Id: dpkgpm.h,v 1.1 1998/11/13 04:23:39 jgg Exp $
+/* ######################################################################
+
+ DPKG Package Manager - Provide an interface to dpkg
+
+ ##################################################################### */
+ /*}}}*/
+// Header section: pkglib
+#ifndef PKGLIB_DPKGPM_H
+#define PKGLIB_DPKGPM_H
+
+#ifdef __GNUG__
+#pragma interface "apt-pkg/dpkgpm.h"
+#endif
+
+#include <apt-pkg/packagemanager.h>
+#include <vector>
+
+class pkgDPkgPM : public pkgPackageManager
+{
+ protected:
+
+ struct Item
+ {
+ enum Ops {Install, Configure, Remove} Op;
+ string File;
+ PkgIterator Pkg;
+ Item(Ops Op,PkgIterator Pkg,string File = "") : Op(Op),
+ File(File), Pkg(Pkg) {};
+ Item() {};
+
+ };
+ vector<Item> List;
+
+ // The Actuall installation implementation
+ virtual bool Install(PkgIterator Pkg,string File);
+ virtual bool Configure(PkgIterator Pkg);
+ virtual bool Remove(PkgIterator Pkg);
+ virtual bool Go();
+
+ public:
+
+ pkgDPkgPM(pkgDepCache &Cache);
+ virtual ~pkgDPkgPM();
+};
+
+#endif