1 //---------------------------------------------------------------------- 2 // This software is part of the Haiku distribution and is covered 3 // by the MIT License. 4 //--------------------------------------------------------------------- 5 /*! 6 \file sniffer/Range.h 7 MIME sniffer range declarations 8 */ 9 #ifndef _SNIFFER_RANGE_H 10 #define _SNIFFER_RANGE_H 11 12 #include <SupportDefs.h> 13 14 namespace BPrivate { 15 namespace Storage { 16 namespace Sniffer { 17 18 class Err; 19 20 //! A range of byte offsets from which to check a pattern against a data stream. 21 class Range { 22 public: 23 Range(int32 start, int32 end); 24 25 status_t InitCheck() const; 26 Err* GetErr() const; 27 28 int32 Start() const; 29 int32 End() const; 30 31 void SetTo(int32 start, int32 end); 32 private: 33 int32 fStart; 34 int32 fEnd; 35 status_t fCStatus; 36 }; 37 38 }; // namespace Sniffer 39 }; // namespace Storage 40 }; // namespace BPrivate 41 42 #endif // _SNIFFER_RANGE_H 43 44 45