]>
git.saurik.com Git - apt.git/blob - apt-inst/dirstream.h
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: dirstream.h,v 1.2 2001/02/20 07:03:16 jgg Exp $
4 /* ######################################################################
8 When unpacking the contents of the archive are passed into a directory
9 stream class for analysis and processing. The class controls all aspects
10 of actually writing the directory stream from disk. The low level
11 archive handlers are only responsible for decoding the archive format
12 and sending events (via method calls) to the specified directory
15 When unpacking a real file the archive handler is passed back a file
16 handle to write the data to, this is to support strange
17 archives+unpacking methods. If that fd is -1 then the file data is
20 The provided defaults do the 'Right Thing' for a normal unpacking
23 ##################################################################### */
25 #ifndef PKGLIB_DIRSTREAM_H
26 #define PKGLIB_DIRSTREAM_H
28 #include <apt-pkg/macros.h>
34 // All possible information about a component
37 enum Type_t
{File
, HardLink
, SymbolicLink
, CharDevice
, BlockDevice
,
38 Directory
, FIFO
} Type
;
44 unsigned long long Size
;
50 virtual bool DoItem(Item
&Itm
,int &Fd
);
51 virtual bool Fail(Item
&Itm
,int Fd
);
52 virtual bool FinishedFile(Item
&Itm
,int Fd
);
53 virtual bool Process(Item
&/*Itm*/,const unsigned char * /*Data*/,
54 unsigned long long /*Size*/,unsigned long long /*Pos*/) {return true;};
55 virtual ~pkgDirStream() {};