xref: /haiku/headers/private/storage/sniffer/RPatternList.h (revision d4e4909c6a3fe4290b78be2b78035c4774e3ff18)
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 
15 class BPositionIO;
16 
17 namespace BPrivate {
18 namespace Storage {
19 namespace Sniffer {
20 
21 class Err;
22 class RPattern;
23 
24 //! A list of patterns, each of which is to be searched over its own specified range.
25 class RPatternList : public DisjList {
26 public:
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);
36 private:
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