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