]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/tagfile.h
revert useless abibreak in sourceslist.h
[apt.git] / apt-pkg / tagfile.h
index b0cfab75986edc6d769e39bfe7328ecf3460b815..ac6d42089fac2e06ae4a03645c9b20bb93668270 100644 (file)
@@ -43,7 +43,7 @@ class pkgTagSection
       unsigned int StartValue;
       unsigned int NextInBucket;
 
-      TagData(unsigned int const StartTag) : StartTag(StartTag), NextInBucket(0) {}
+      TagData(unsigned int const StartTag) : StartTag(StartTag), EndTag(0), StartValue(0), NextInBucket(0) {}
    };
    std::vector<TagData> Tags;
    unsigned int LookupTable[0x100];
@@ -62,7 +62,8 @@ class pkgTagSection
    bool Find(const char *Tag,const char *&Start, const char *&End) 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 ;
+   signed int FindI(const char *Tag,signed long Default = 0) const;
+   bool FindB(const char *Tag, bool const &Default = false) 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;
@@ -85,7 +86,13 @@ class pkgTagSection
     * @return \b true if section end was found, \b false otherwise.
     *  Beware that internal state will be inconsistent if \b false is returned!
     */
+#if APT_PKG_ABI >= 413
    APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength, bool const Restart = true);
+#else
+   APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength, bool const Restart);
+   APT_MUSTCHECK bool Scan(const char *Start, unsigned long MaxLength);
+#endif
+
    inline unsigned long size() const {return Stop - Section;};
    void Trim();
    virtual void TrimRecord(bool BeforeRecord, const char* &End);
@@ -93,10 +100,14 @@ class pkgTagSection
    /** \brief amount of Tags in the current section
     *
     * Note: if a Tag is mentioned repeatly it will be counted multiple
-    * times, but only the last occurance is available via Find methods.
+    * times, but only the last occurrence is available via Find methods.
     */
    unsigned int Count() const;
+#if APT_PKG_ABI >= 413
    bool Exists(const char* const Tag) const;
+#else
+   bool Exists(const char* const Tag);
+#endif
 
    inline void Get(const char *&Start,const char *&Stop,unsigned int I) const
                    {Start = Section + Tags[I].StartTag; Stop = Section + Tags[I+1].StartTag;}
@@ -108,7 +119,7 @@ class pkgTagSection
    };
    
    pkgTagSection();
-   virtual ~pkgTagSection() {};
+   virtual ~pkgTagSection();
 };
 
 class pkgTagFilePrivate;