]>
git.saurik.com Git - apt.git/blob - apt-pkg/deb/dpkgpm.h
f47cd0bd8976366ac6b367d37355f531873ef4f9
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
27 // used for progress reporting
30 const char *state
; // the dpkg state (e.g. "unpack")
31 const char *str
; // the human readable translation of the state
36 enum Ops
{Install
, Configure
, Remove
, Purge
} Op
;
39 Item(Ops Op
,PkgIterator Pkg
,string File
= "") : Op(Op
),
40 File(File
), Pkg(Pkg
) {};
47 bool RunScripts(const char *Cnf
);
48 bool RunScriptsWithPkgs(const char *Cnf
);
49 bool SendV2Pkgs(FILE *F
);
52 void DoStdin(int master
);
53 void DoTerminalPty(int master
, FILE *out
);
54 void DoDpkgStatusFd(int statusfd
);
55 void ProcessDpkgStatusLine(char *line
);
58 // The Actuall installation implementation
59 virtual bool Install(PkgIterator Pkg
,string File
);
60 virtual bool Configure(PkgIterator Pkg
);
61 virtual bool Remove(PkgIterator Pkg
,bool Purge
= false);
62 virtual bool Go(int StatusFd
=-1);
67 pkgDPkgPM(pkgDepCache
*Cache
);