summaryrefslogtreecommitdiff
path: root/ftparchive/writer.h
diff options
context:
space:
mode:
Diffstat (limited to 'ftparchive/writer.h')
-rw-r--r--ftparchive/writer.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/ftparchive/writer.h b/ftparchive/writer.h
index af7ba4edd..2afd1af1f 100644
--- a/ftparchive/writer.h
+++ b/ftparchive/writer.h
@@ -19,6 +19,7 @@
#include <iostream>
#include <vector>
#include <map>
+#include <set>
#include "cachedb.h"
#include "override.h"
@@ -72,6 +73,23 @@ class FTWScanner
FTWScanner(string const &Arch = string());
};
+class TranslationWriter
+{
+ 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);
+ TranslationWriter() : Output(NULL), RefCounter(0) {};
+ ~TranslationWriter();
+};
+
class PackagesWriter : public FTWScanner
{
Override Over;
@@ -93,6 +111,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)