]>
git.saurik.com Git - apt.git/blob - cmdline/indexcopy.h
1 // -*- mode: cpp; mode: fold -*-
3 // $Id: indexcopy.h,v 1.3 2001/05/27 04:46:54 jgg Exp $
4 /* ######################################################################
6 Index Copying - Aid for copying and verifying the index files
8 ##################################################################### */
27 pkgTagSection
*Section
;
29 string
ChopDirs(string Path
,unsigned int Depth
);
30 bool ReconstructPrefix(string
&Prefix
,string OrigPath
,string CD
,
32 bool ReconstructChop(unsigned long &Chop
,string Dir
,string File
);
33 void ConvertToSourceList(string CD
,string
&Path
);
34 bool GrabFirst(string Path
,string
&To
,unsigned int Depth
);
35 virtual bool GetFile(string
&Filename
,unsigned long &Size
) = 0;
36 virtual bool RewriteEntry(FILE *Target
,string File
) = 0;
37 virtual const char *GetFileName() = 0;
38 virtual const char *Type() = 0;
42 bool CopyPackages(string CDROM
,string Name
,vector
<string
> &List
);
45 class PackageCopy
: public IndexCopy
49 virtual bool GetFile(string
&Filename
,unsigned long &Size
);
50 virtual bool RewriteEntry(FILE *Target
,string File
);
51 virtual const char *GetFileName() {return "Packages";};
52 virtual const char *Type() {return "Package";};
57 class SourceCopy
: public IndexCopy
61 virtual bool GetFile(string
&Filename
,unsigned long &Size
);
62 virtual bool RewriteEntry(FILE *Target
,string File
);
63 virtual const char *GetFileName() {return "Sources";};
64 virtual const char *Type() {return "Source";};