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