apt
3.0.3
commandline package manager
apt-pkg
contrib
extracttar.h
1
// -*- mode: cpp; mode: fold -*-
2
// Description /*{{{*/
3
/* ######################################################################
4
5
Extract a Tar - Tar Extractor
6
7
The tar extractor takes an ordinary gzip compressed tar stream from
8
the given file and explodes it, passing the individual items to the
9
given Directory Stream for processing.
10
11
##################################################################### */
12
/*}}}*/
13
#ifndef PKGLIB_EXTRACTTAR_H
14
#define PKGLIB_EXTRACTTAR_H
15
16
#include <apt-pkg/fileutl.h>
17
#include <apt-pkg/macros.h>
18
19
#include <string>
20
21
22
class
pkgDirStream
;
23
24
class
APT_PUBLIC
ExtractTar
25
{
26
protected
:
27
28
struct
TarHeader
;
29
30
// The varios types items can be
31
enum
ItemType {NormalFile0 =
'\0'
,NormalFile =
'0'
,HardLink =
'1'
,
32
SymbolicLink =
'2'
,CharacterDevice =
'3'
,
33
BlockDevice =
'4'
,Directory =
'5'
,FIFO =
'6'
,
34
GNU_LongLink =
'K'
,GNU_LongName =
'L'
};
35
36
FileFd
&File;
37
unsigned
long
long
MaxInSize;
38
int
GZPid;
39
FileFd
InFd;
40
bool
Eof;
41
std::string DecompressProg;
42
43
// Fork and reap gzip
44
bool
StartGzip();
45
bool
Done();
46
47
public
:
48
49
bool
Go(
pkgDirStream
&Stream);
50
51
ExtractTar
(
FileFd
&Fd,
unsigned
long
long
Max,std::string DecompressionProgram);
52
virtual
~ExtractTar
();
53
};
54
55
#endif
ExtractTar
Definition
extracttar.h:25
FileFd
Definition
fileutl.h:43
pkgDirStream
Definition
dirstream.h:30
ExtractTar::TarHeader
Definition
extracttar.cc:44
Generated by
1.9.8