]> git.saurik.com Git - apt.git/blobdiff - ftparchive/writer.h
use a format string in ListSingleVersion
[apt.git] / ftparchive / writer.h
index 76a3dfd1e88b05cc835121b06049a14c44d0d3bd..d8a10e0bbc578376139842bb63cdd48579bbc5cc 100644 (file)
 #ifndef WRITER_H
 #define WRITER_H
 
-
 #include <string>
 #include <stdio.h>
 #include <iostream>
 #include <vector>
 #include <map>
 #include <set>
+#include <stdlib.h>
+#include <sys/types.h>
 
+#include "contents.h"
 #include "cachedb.h"
 #include "override.h"
 #include "apt-ftparchive.h"
@@ -125,8 +127,10 @@ class PackagesWriter : public FTWScanner
       {return Over.ReadExtraOverride(File);};
    virtual bool DoPackage(string FileName);
 
-   PackagesWriter(string const &DB,string const &Overrides,string const &ExtOverrides=string(),
-                 string const &Arch=string());
+   PackagesWriter(string const &DB,
+                  string const &Overrides,
+                  string const &ExtOverrides = "",
+                 string const &Arch = "");
    virtual ~PackagesWriter() {};
 };
 
@@ -157,6 +161,7 @@ class ContentsWriter : public FTWScanner
 
 class SourcesWriter : public FTWScanner
 {
+   CacheDB Db;
    Override BOver;
    Override SOver;
    char *Buffer;
@@ -165,16 +170,17 @@ class SourcesWriter : public FTWScanner
    public:
 
    bool NoOverride;
+   bool DoAlwaysStat;
    
    // General options
    string PathPrefix;
    string DirStrip;
    FILE *Output;
-   struct CacheDB::Stats Stats;
+   struct CacheDB::Stats &Stats;
 
    virtual bool DoPackage(string FileName);
 
-   SourcesWriter(string const &BOverrides,string const &SOverrides,
+   SourcesWriter(string const &DB,string const &BOverrides,string const &SOverrides,
                 string const &ExtOverrides=string());
    virtual ~SourcesWriter() {free(Buffer);};
 };