]>
Commit | Line | Data |
---|---|---|
b2e465d6 AL |
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 | ||
b2e465d6 AL |
20 | #include <apt-pkg/dirstream.h> |
21 | #include <apt-pkg/filelist.h> | |
22 | #include <apt-pkg/pkgcache.h> | |
453b82a3 DK |
23 | #include <apt-pkg/cacheiterators.h> |
24 | ||
25 | #include <string> | |
b2e465d6 AL |
26 | |
27 | class pkgExtract : public pkgDirStream | |
28 | { | |
29 | pkgFLCache &FLCache; | |
30 | pkgCache::VerIterator Ver; | |
31 | pkgFLCache::PkgIterator FLPkg; | |
32 | char FileName[1024]; | |
33 | bool Debug; | |
34 | ||
35 | bool HandleOverwrites(pkgFLCache::NodeIterator Nde, | |
36 | bool DiverCheck = false); | |
8f3ba4e8 | 37 | bool CheckDirReplace(std::string Dir,unsigned int Depth = 0); |
b2e465d6 AL |
38 | |
39 | public: | |
40 | ||
3b302846 DK |
41 | virtual bool DoItem(Item &Itm,int &Fd) APT_OVERRIDE; |
42 | virtual bool Fail(Item &Itm,int Fd) APT_OVERRIDE; | |
43 | virtual bool FinishedFile(Item &Itm,int Fd) APT_OVERRIDE; | |
b2e465d6 AL |
44 | |
45 | bool Finished(); | |
46 | bool Aborted(); | |
47 | ||
48 | pkgExtract(pkgFLCache &FLCache,pkgCache::VerIterator Ver); | |
49 | }; | |
50 | ||
51 | #endif |