1 //---------------------------------------------------------------------- 2 // This software is part of the OpenBeOS distribution and is covered 3 // by the OpenBeOS 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 14 class BPositionIO; 15 16 namespace BPrivate { 17 namespace Storage { 18 namespace Sniffer { 19 20 class Err; 21 class Pattern; 22 23 //! A Pattern and a Range, bundled into one. 24 class RPattern { 25 public: 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; 34 private: 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