#ifndef PKGLIB_TAGFILE_H
#define PKGLIB_TAGFILE_H
+#include <apt-pkg/macros.h>
-#include <apt-pkg/fileutl.h>
#include <stdio.h>
+#include <string>
+
+#ifndef APT_8_CLEANER_HEADERS
+#include <apt-pkg/fileutl.h>
+#endif
+
+class FileFd;
+
class pkgTagSection
{
const char *Section;
inline bool operator !=(const pkgTagSection &rhs) {return Section != rhs.Section;};
bool Find(const char *Tag,const char *&Start, const char *&End) const;
- bool Find(const char *Tag,unsigned &Pos) const;
+ bool Find(const char *Tag,unsigned int &Pos) const;
std::string FindS(const char *Tag) const;
signed int FindI(const char *Tag,signed long Default = 0) const ;
unsigned long long FindULL(const char *Tag, unsigned long long const &Default = 0) const;
bool FindFlag(const char *Tag,unsigned long &Flags,
unsigned long Flag) const;
- bool static const FindFlag(unsigned long &Flags, unsigned long Flag,
+ bool static FindFlag(unsigned long &Flags, unsigned long Flag,
const char* Start, const char* Stop);
bool Scan(const char *Start,unsigned long MaxLength);
inline unsigned long size() const {return Stop - Section;};
virtual void TrimRecord(bool BeforeRecord, const char* &End);
inline unsigned int Count() const {return TagCount;};
- inline bool Exists(const char* const Tag) {return AlphaIndexes[AlphaHash(Tag)] != 0;}
+ bool Exists(const char* const Tag);
inline void Get(const char *&Start,const char *&Stop,unsigned int I) const
{Start = Section + Indexes[I]; Stop = Section + Indexes[I+1];}
Stop = this->Stop;
};
- pkgTagSection() : Section(0), TagCount(0), Stop(0) {};
+ pkgTagSection();
virtual ~pkgTagSection() {};
};
{
pkgTagFilePrivate *d;
- bool Fill();
- bool Resize();
+ APT_HIDDEN bool Fill();
+ APT_HIDDEN bool Resize();
+ APT_HIDDEN bool Resize(unsigned long long const newSize);
public: