2002-08-06 12:25:41 +04:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// This software is part of the OpenBeOS distribution and is covered
|
2017-02-10 06:03:59 +03:00
|
|
|
// by the MIT License.
|
2002-08-06 12:25:41 +04:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
/*!
|
|
|
|
\file sniffer/RPatternList.h
|
|
|
|
MIME sniffer rpattern list declarations
|
|
|
|
*/
|
2002-08-12 11:24:02 +04:00
|
|
|
#ifndef _SNIFFER_R_PATTERN_LIST_H
|
|
|
|
#define _SNIFFER_R_PATTERN_LIST_H
|
2002-08-06 12:25:41 +04:00
|
|
|
|
2002-08-10 13:36:00 +04:00
|
|
|
#include <sniffer/DisjList.h>
|
2002-08-06 12:25:41 +04:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
class BPositionIO;
|
|
|
|
|
2002-08-12 12:42:01 +04:00
|
|
|
namespace BPrivate {
|
|
|
|
namespace Storage {
|
2002-08-06 12:25:41 +04:00
|
|
|
namespace Sniffer {
|
|
|
|
|
|
|
|
class Err;
|
|
|
|
class RPattern;
|
|
|
|
|
2002-08-08 11:20:47 +04:00
|
|
|
//! A list of patterns, each of which is to be searched over its own specified range.
|
2002-08-10 13:36:00 +04:00
|
|
|
class RPatternList : public DisjList {
|
2002-08-06 12:25:41 +04:00
|
|
|
public:
|
|
|
|
RPatternList();
|
|
|
|
virtual ~RPatternList();
|
|
|
|
|
|
|
|
status_t InitCheck() const;
|
|
|
|
Err* GetErr() const;
|
|
|
|
|
|
|
|
virtual bool Sniff(BPositionIO *data) const;
|
2002-09-24 09:27:46 +04:00
|
|
|
virtual ssize_t BytesNeeded() const;
|
2002-08-06 12:25:41 +04:00
|
|
|
void Add(RPattern *rpattern);
|
|
|
|
private:
|
|
|
|
std::vector<RPattern*> fList;
|
|
|
|
};
|
|
|
|
|
2002-08-12 12:42:01 +04:00
|
|
|
}; // namespace Sniffer
|
|
|
|
}; // namespace Storage
|
|
|
|
}; // namespace BPrivate
|
|
|
|
|
|
|
|
#endif // _SNIFFER_R_PATTERN_LIST_H
|
|
|
|
|
2002-08-06 12:25:41 +04:00
|
|
|
|