File: extract.h

package info (click to toggle)
apt 1.0.9.8.4
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 15,080 kB
  • ctags: 5,307
  • sloc: cpp: 50,972; sh: 12,111; xml: 4,130; makefile: 855; perl: 209; python: 28
file content (51 lines) | stat: -rw-r--r-- 1,428 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// -*- mode: cpp; mode: fold -*-
// Description								/*{{{*/
// $Id: extract.h,v 1.2 2001/02/20 07:03:16 jgg Exp $
/* ######################################################################

   Archive Extraction Directory Stream
   
   This Directory Stream implements extraction of an archive into the
   filesystem. It makes the choices on what files should be unpacked and
   replaces as well as guiding the actual unpacking.
   
   When the unpacking sequence is completed one of the two functions,
   Finished or Aborted must be called.
   
   ##################################################################### */
									/*}}}*/
#ifndef PKGLIB_EXTRACT_H
#define PKGLIB_EXTRACT_H

#include <apt-pkg/dirstream.h>
#include <apt-pkg/filelist.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/cacheiterators.h>

#include <string>

class pkgExtract : public pkgDirStream
{
   pkgFLCache &FLCache;
   pkgCache::VerIterator Ver;
   pkgFLCache::PkgIterator FLPkg;
   char FileName[1024];
   bool Debug;
   
   bool HandleOverwrites(pkgFLCache::NodeIterator Nde,
			 bool DiverCheck = false);
   bool CheckDirReplace(std::string Dir,unsigned int Depth = 0);
   
   public:
   
   virtual bool DoItem(Item &Itm,int &Fd);
   virtual bool Fail(Item &Itm,int Fd);
   virtual bool FinishedFile(Item &Itm,int Fd);

   bool Finished();
   bool Aborted();
   
   pkgExtract(pkgFLCache &FLCache,pkgCache::VerIterator Ver);
};

#endif