]>
git.saurik.com Git - apt.git/blob - apt-pkg/deb/dpkgpm.h
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: dpkgpm.h,v 1.8 2001/05/07 05:05:13 jgg Exp $
4 /* ######################################################################
6 DPKG Package Manager - Provide an interface to dpkg
8 ##################################################################### */
10 #ifndef PKGLIB_DPKGPM_H
11 #define PKGLIB_DPKGPM_H
13 #include <apt-pkg/packagemanager.h>
19 class pkgDPkgPM
: public pkgPackageManager
24 // used for progress reporting
27 const char *state
; // the dpkg state (e.g. "unpack")
28 const char *str
; // the human readable translation of the state
33 enum Ops
{Install
, Configure
, Remove
, Purge
} Op
;
36 Item(Ops Op
,PkgIterator Pkg
,string File
= "") : Op(Op
),
37 File(File
), Pkg(Pkg
) {};
44 bool RunScripts(const char *Cnf
);
45 bool RunScriptsWithPkgs(const char *Cnf
);
46 bool SendV2Pkgs(FILE *F
);
49 void WriteApportReport(const char *pkgpath
, const char *errormsg
);
51 // The Actuall installation implementation
52 virtual bool Install(PkgIterator Pkg
,string File
);
53 virtual bool Configure(PkgIterator Pkg
);
54 virtual bool Remove(PkgIterator Pkg
,bool Purge
= false);
55 virtual bool Go(int StatusFd
=-1);
60 pkgDPkgPM(pkgDepCache
*Cache
);