btrfs: [] on the end of a struct field is a variable length array.
[haiku.git] / headers / private / storage / sniffer / RPatternList.h
blob4532d8c2a0ace7742a5a0609ecf62828d30bdcb4
1 //----------------------------------------------------------------------
2 // This software is part of the OpenBeOS 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
12 #include <sniffer/DisjList.h>
13 #include <vector>
15 class BPositionIO;
17 namespace BPrivate {
18 namespace Storage {
19 namespace Sniffer {
21 class Err;
22 class RPattern;
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();
30 status_t InitCheck() const;
31 Err* GetErr() const;
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;
40 }; // namespace Sniffer
41 }; // namespace Storage
42 }; // namespace BPrivate
44 #endif // _SNIFFER_R_PATTERN_LIST_H