~ubuntu-branches/ubuntu/breezy/apt/breezy

« back to all changes in this revision

Viewing changes to cmdline/indexcopy.h

  • Committer: Bazaar Package Importer
  • Author(s): Matt Zimmerman
  • Date: 2005-03-07 20:08:33 UTC
  • Revision ID: james.westby@ubuntu.com-20050307200833-0lxdgg2cb4oculdv
Tags: 0.6.35
* Merge apt--mvo--0 (incorporates 0.6.34ubuntu1):
  - Implement MaxSize and MaxAge in apt.cron.daily, to prevent the cache
    from growing too large (Ubuntu #6761)
  - some comments about the pkgAcqMetaSig::Custom600Headers() added
  - use gpg --with-colons
  - commented the ftp no_proxy unseting in methods/ftp.cc
  - added support for "Acquire::gpgv::options" in methods/gpgv.cc
* Merge bubulle@debian.org--2005/apt--main--0
  - Make capitalization more consistent
  - Un-fuzzy translations resulting from capitalization changes
  - Italian translation update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- mode: cpp; mode: fold -*-
2
 
// Description                                                          /*{{{*/
3
 
// $Id: indexcopy.h,v 1.3 2001/05/27 04:46:54 jgg Exp $
4
 
/* ######################################################################
5
 
 
6
 
   Index Copying - Aid for copying and verifying the index files
7
 
   
8
 
   ##################################################################### */
9
 
                                                                        /*}}}*/
10
 
#ifndef INDEXCOPY_H
11
 
#define INDEXCOPY_H
12
 
 
13
 
#include <vector>
14
 
#include <string>
15
 
#include <stdio.h>
16
 
 
17
 
using std::string;
18
 
using std::vector;
19
 
 
20
 
class pkgTagSection;
21
 
class FileFd;
22
 
 
23
 
class IndexCopy
24
 
{
25
 
   protected:
26
 
   
27
 
   pkgTagSection *Section;
28
 
   
29
 
   string ChopDirs(string Path,unsigned int Depth);
30
 
   bool ReconstructPrefix(string &Prefix,string OrigPath,string CD,
31
 
                          string File);
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;
39
 
   
40
 
   public:
41
 
 
42
 
   bool CopyPackages(string CDROM,string Name,vector<string> &List);
43
 
};
44
 
 
45
 
class PackageCopy : public IndexCopy
46
 
{
47
 
   protected:
48
 
   
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";};
53
 
   
54
 
   public:
55
 
};
56
 
 
57
 
class SourceCopy : public IndexCopy
58
 
{
59
 
   protected:
60
 
   
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";};
65
 
   
66
 
   public:
67
 
};
68
 
 
69
 
#endif