2002-07-29 10:57:11 +04:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// This software is part of the OpenBeOS distribution and is covered
|
2017-02-10 06:03:59 +03:00
|
|
|
// by the MIT License.
|
2002-07-29 10:57:11 +04:00
|
|
|
//---------------------------------------------------------------------
|
|
|
|
/*!
|
|
|
|
\file sniffer/Range.h
|
|
|
|
MIME sniffer range declarations
|
|
|
|
*/
|
2002-08-12 11:24:02 +04:00
|
|
|
#ifndef _SNIFFER_RANGE_H
|
|
|
|
#define _SNIFFER_RANGE_H
|
2002-07-29 10:57:11 +04:00
|
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
2002-08-12 12:42:01 +04:00
|
|
|
namespace BPrivate {
|
|
|
|
namespace Storage {
|
2002-07-29 10:57:11 +04:00
|
|
|
namespace Sniffer {
|
|
|
|
|
2002-08-06 12:30:44 +04:00
|
|
|
class Err;
|
|
|
|
|
2002-08-08 11:20:47 +04:00
|
|
|
//! A range of byte offsets from which to check a pattern against a data stream.
|
2002-07-29 10:57:11 +04:00
|
|
|
class Range {
|
|
|
|
public:
|
|
|
|
Range(int32 start, int32 end);
|
2002-08-06 12:30:44 +04:00
|
|
|
|
|
|
|
status_t InitCheck() const;
|
|
|
|
Err* GetErr() const;
|
2002-07-29 10:57:11 +04:00
|
|
|
|
|
|
|
int32 Start() const;
|
|
|
|
int32 End() const;
|
|
|
|
|
|
|
|
void SetTo(int32 start, int32 end);
|
|
|
|
private:
|
|
|
|
int32 fStart;
|
|
|
|
int32 fEnd;
|
2002-08-06 12:30:44 +04:00
|
|
|
status_t fCStatus;
|
2002-07-29 10:57:11 +04:00
|
|
|
};
|
|
|
|
|
2002-08-12 12:42:01 +04:00
|
|
|
}; // namespace Sniffer
|
|
|
|
}; // namespace Storage
|
|
|
|
}; // namespace BPrivate
|
|
|
|
|
|
|
|
#endif // _SNIFFER_RANGE_H
|
|
|
|
|
2002-07-29 10:57:11 +04:00
|
|
|
|