1//----------------------------------------------------------------------
2//  This software is part of the Haiku distribution and is covered
3//  by the MIT License.
4//---------------------------------------------------------------------
5/*!
6	\file sniffer/RPattern.h
7	Mime Sniffer RPattern declarations
8*/
9#ifndef _SNIFFER_R_PATTERN_H
10#define _SNIFFER_R_PATTERN_H
11
12#include <sniffer/Range.h>
13
14class BPositionIO;
15
16namespace BPrivate {
17namespace Storage {
18namespace Sniffer {
19
20class Err;
21class Pattern;
22
23//! A Pattern and a Range, bundled into one.
24class RPattern {
25public:
26	RPattern(Range range, Pattern *pattern);
27	~RPattern();
28
29	status_t InitCheck() const;
30	Err* GetErr() const;
31
32	bool Sniff(BPositionIO *data, bool caseInsensitive) const;
33	ssize_t BytesNeeded() const;
34private:
35	Range fRange;
36	Pattern *fPattern;
37};
38
39};	// namespace Sniffer
40};	// namespace Storage
41};	// namespace BPrivate
42
43#endif	// _SNIFFER_R_PATTERN_H
44
45
46