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