1//---------------------------------------------------------------------- 2// This software is part of the Haiku distribution and is covered 3// by the MIT License. 4//--------------------------------------------------------------------- 5/*! 6 \file sniffer/RPatternList.h 7 MIME sniffer rpattern list declarations 8*/ 9#ifndef _SNIFFER_R_PATTERN_LIST_H 10#define _SNIFFER_R_PATTERN_LIST_H 11 12#include <sniffer/DisjList.h> 13#include <vector> 14 15class BPositionIO; 16 17namespace BPrivate { 18namespace Storage { 19namespace Sniffer { 20 21class Err; 22class RPattern; 23 24//! A list of patterns, each of which is to be searched over its own specified range. 25class RPatternList : public DisjList { 26public: 27 RPatternList(); 28 virtual ~RPatternList(); 29 30 status_t InitCheck() const; 31 Err* GetErr() const; 32 33 virtual bool Sniff(BPositionIO *data) const; 34 virtual ssize_t BytesNeeded() const; 35 void Add(RPattern *rpattern); 36private: 37 std::vector<RPattern*> fList; 38}; 39 40}; // namespace Sniffer 41}; // namespace Storage 42}; // namespace BPrivate 43 44#endif // _SNIFFER_R_PATTERN_LIST_H 45 46 47