diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 17:04:30 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 17:04:30 +0000 |
commit | 989539655e3bb8e6934b5f69ece67c173a26c4f2 (patch) | |
tree | e0aaabbd66519a4d3a1b3bb3e12c089a61c20705 /ftparchive/writer.h | |
parent | a7a58a763a2a07d32f02d597f15740c7cee070c3 (diff) |
* Enable apt-ftparchive to generate Release files
Author: mdz
Date: 2003-12-26 20:08:56 GMT
* Enable apt-ftparchive to generate Release files
Diffstat (limited to 'ftparchive/writer.h')
-rw-r--r-- | ftparchive/writer.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/ftparchive/writer.h b/ftparchive/writer.h index 854d3424b..6f728dd1b 100644 --- a/ftparchive/writer.h +++ b/ftparchive/writer.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: writer.h,v 1.4 2001/06/26 02:50:27 jgg Exp $ +// $Id: writer.h,v 1.5 2003/12/26 20:08:56 mdz Exp $ /* ###################################################################### Writer @@ -29,13 +29,12 @@ using std::string; using std::cout; using std::endl; +using std::vector; class FTWScanner { protected: - - char *TmpExt; - const char *Ext[10]; + vector<string> Patterns; const char *OriginalPath; char *RealPath; bool ErrorPrinted; @@ -66,10 +65,12 @@ class FTWScanner virtual bool DoPackage(string FileName) = 0; bool RecursiveScan(string Dir); bool LoadFileList(string BaseDir,string File); + bool ClearPatterns() { Patterns.clear(); }; + bool AddPattern(string Pattern) { Patterns.push_back(Pattern); }; bool SetExts(string Vals); FTWScanner(); - virtual ~FTWScanner() {delete [] RealPath; delete [] TmpExt;}; + virtual ~FTWScanner() {delete [] RealPath;}; }; class PackagesWriter : public FTWScanner @@ -148,5 +149,16 @@ class SourcesWriter : public FTWScanner virtual ~SourcesWriter() {free(Buffer);}; }; +class ReleaseWriter : public FTWScanner +{ +public: + ReleaseWriter(string DB); + virtual bool DoPackage(string FileName); +protected: + // General options + string PathPrefix; + string DirStrip; + FILE *Output; +}; #endif |