summaryrefslogtreecommitdiff
path: root/ftparchive/writer.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-04-01 17:18:31 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-04-01 17:18:31 +0200
commit46361a17f0cb6f4f7c46705c5af71b6680cf5b1d (patch)
treee7466e094406d5d195823840cb2d43a371f67bea /ftparchive/writer.h
parent3b1fffc35f3eb277d92f38c687c270edd1d8550d (diff)
parent436d7eab92bb8f9cc6498acfbf2055e717be6fd0 (diff)
merged from lp:~donkult/apt/sid
Diffstat (limited to 'ftparchive/writer.h')
-rw-r--r--ftparchive/writer.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/ftparchive/writer.h b/ftparchive/writer.h
index af7ba4edd..3123a7f46 100644
--- a/ftparchive/writer.h
+++ b/ftparchive/writer.h
@@ -19,8 +19,10 @@
#include <iostream>
#include <vector>
#include <map>
+#include <set>
#include "cachedb.h"
+#include "multicompress.h"
#include "override.h"
#include "apt-ftparchive.h"
@@ -72,6 +74,24 @@ class FTWScanner
FTWScanner(string const &Arch = string());
};
+class TranslationWriter
+{
+ MultiCompress *Comp;
+ FILE *Output;
+ std::set<string> Included;
+ unsigned short RefCounter;
+
+ public:
+ void IncreaseRefCounter() { ++RefCounter; };
+ unsigned short DecreaseRefCounter() { return (RefCounter == 0) ? 0 : --RefCounter; };
+ unsigned short GetRefCounter() const { return RefCounter; };
+ bool DoPackage(string const &Pkg, string const &Desc, string const &MD5);
+
+ TranslationWriter(string const &File, string const &TransCompress, mode_t const &Permissions);
+ TranslationWriter() : Comp(NULL), Output(NULL), RefCounter(0) {};
+ ~TranslationWriter();
+};
+
class PackagesWriter : public FTWScanner
{
Override Over;
@@ -93,6 +113,7 @@ class PackagesWriter : public FTWScanner
string DirStrip;
FILE *Output;
struct CacheDB::Stats &Stats;
+ TranslationWriter *TransWriter;
inline bool ReadOverride(string const &File) {return Over.ReadOverride(File);};
inline bool ReadExtraOverride(string const &File)