]>
git.saurik.com Git - apt.git/blob - cmdline/indexcopy.h
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: indexcopy.h,v 1.2 2001/02/20 07:03:17 jgg Exp $
4 /* ######################################################################
6 Index Copying - Aid for copying and verifying the index files
8 ##################################################################### */
24 pkgTagSection
*Section
;
26 string
ChopDirs(string Path
,unsigned int Depth
);
27 bool ReconstructPrefix(string
&Prefix
,string OrigPath
,string CD
,
29 bool ReconstructChop(unsigned long &Chop
,string Dir
,string File
);
30 void ConvertToSourceList(string CD
,string
&Path
);
31 bool GrabFirst(string Path
,string
&To
,unsigned int Depth
);
32 virtual bool GetFile(string
&Filename
,unsigned long &Size
) = 0;
33 virtual bool RewriteEntry(FILE *Target
,string File
) = 0;
34 virtual const char *GetFileName() = 0;
35 virtual const char *Type() = 0;
39 bool CopyPackages(string CDROM
,string Name
,vector
<string
> &List
);
42 class PackageCopy
: public IndexCopy
46 virtual bool GetFile(string
&Filename
,unsigned long &Size
);
47 virtual bool RewriteEntry(FILE *Target
,string File
);
48 virtual const char *GetFileName() {return "Packages";};
49 virtual const char *Type() {return "Package";};
54 class SourceCopy
: public IndexCopy
58 virtual bool GetFile(string
&Filename
,unsigned long &Size
);
59 virtual bool RewriteEntry(FILE *Target
,string File
);
60 virtual const char *GetFileName() {return "Sources";};
61 virtual const char *Type() {return "Source";};