]>
git.saurik.com Git - apt.git/blob - cmdline/indexcopy.h
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: indexcopy.h,v 1.1 1999/07/12 02:59:36 jgg Exp $
4 /* ######################################################################
6 Index Copying - Aid for copying and verifying the index files
8 ##################################################################### */
23 pkgTagSection
*Section
;
25 string
ChopDirs(string Path
,unsigned int Depth
);
26 bool ReconstructPrefix(string
&Prefix
,string OrigPath
,string CD
,
28 bool ReconstructChop(unsigned long &Chop
,string Dir
,string File
);
29 void ConvertToSourceList(string CD
,string
&Path
);
30 bool GrabFirst(string Path
,string
&To
,unsigned int Depth
);
31 bool CopyWithReplace(FileFd
&Target
,const char *Tag
,string New
);
32 virtual bool GetFile(string
&Filename
,unsigned long &Size
) = 0;
33 virtual bool RewriteEntry(FileFd
&Target
,string File
) = 0;
34 virtual const char *GetFileName() = 0;
35 virtual const char *Type() = 0;
38 bool CopyPackages(string CDROM
,string Name
,vector
<string
> &List
);
41 class PackageCopy
: public IndexCopy
45 virtual bool GetFile(string
&Filename
,unsigned long &Size
);
46 virtual bool RewriteEntry(FileFd
&Target
,string File
);
47 virtual const char *GetFileName() {return "Packages";};
48 virtual const char *Type() {return "Package";};
53 class SourceCopy
: public IndexCopy
57 virtual bool GetFile(string
&Filename
,unsigned long &Size
);
58 virtual bool RewriteEntry(FileFd
&Target
,string File
);
59 virtual const char *GetFileName() {return "Sources";};
60 virtual const char *Type() {return "Source";};