]>
Commit | Line | Data |
---|---|---|
da6ee469 JF |
1 | // -*- mode: cpp; mode: fold -*- |
2 | // Description /*{{{*/ | |
3 | // $Id: extract.h,v 1.2 2001/02/20 07:03:16 jgg Exp $ | |
4 | /* ###################################################################### | |
5 | ||
6 | Archive Extraction Directory Stream | |
7 | ||
8 | This Directory Stream implements extraction of an archive into the | |
9 | filesystem. It makes the choices on what files should be unpacked and | |
10 | replaces as well as guiding the actual unpacking. | |
11 | ||
12 | When the unpacking sequence is completed one of the two functions, | |
13 | Finished or Aborted must be called. | |
14 | ||
15 | ##################################################################### */ | |
16 | /*}}}*/ | |
17 | #ifndef PKGLIB_EXTRACT_H | |
18 | #define PKGLIB_EXTRACT_H | |
19 | ||
00ec24d0 | 20 | |
da6ee469 JF |
21 | |
22 | #include <apt-pkg/dirstream.h> | |
23 | #include <apt-pkg/filelist.h> | |
24 | #include <apt-pkg/pkgcache.h> | |
25 | ||
26 | class pkgExtract : public pkgDirStream | |
27 | { | |
28 | pkgFLCache &FLCache; | |
29 | pkgCache::VerIterator Ver; | |
30 | pkgFLCache::PkgIterator FLPkg; | |
31 | char FileName[1024]; | |
32 | bool Debug; | |
33 | ||
34 | bool HandleOverwrites(pkgFLCache::NodeIterator Nde, | |
35 | bool DiverCheck = false); | |
36 | bool CheckDirReplace(string Dir,unsigned int Depth = 0); | |
37 | ||
38 | public: | |
39 | ||
40 | virtual bool DoItem(Item &Itm,int &Fd); | |
41 | virtual bool Fail(Item &Itm,int Fd); | |
42 | virtual bool FinishedFile(Item &Itm,int Fd); | |
43 | ||
44 | bool Finished(); | |
45 | bool Aborted(); | |
46 | ||
47 | pkgExtract(pkgFLCache &FLCache,pkgCache::VerIterator Ver); | |
48 | }; | |
49 | ||
50 | #endif |