2ca1376080
No functional code altered. https://dev.haiku-os.org/ticket/17197 Change-Id: I75cc74f6be0ad968fd77c31fbe5b0f650a6fe9e0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4364 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
46 lines
928 B
C++
46 lines
928 B
C++
//----------------------------------------------------------------------
|
|
// This software is part of the Haiku distribution and is covered
|
|
// by the MIT License.
|
|
//---------------------------------------------------------------------
|
|
/*!
|
|
\file sniffer/RPattern.h
|
|
Mime Sniffer RPattern declarations
|
|
*/
|
|
#ifndef _SNIFFER_R_PATTERN_H
|
|
#define _SNIFFER_R_PATTERN_H
|
|
|
|
#include <sniffer/Range.h>
|
|
|
|
class BPositionIO;
|
|
|
|
namespace BPrivate {
|
|
namespace Storage {
|
|
namespace Sniffer {
|
|
|
|
class Err;
|
|
class Pattern;
|
|
|
|
//! A Pattern and a Range, bundled into one.
|
|
class RPattern {
|
|
public:
|
|
RPattern(Range range, Pattern *pattern);
|
|
~RPattern();
|
|
|
|
status_t InitCheck() const;
|
|
Err* GetErr() const;
|
|
|
|
bool Sniff(BPositionIO *data, bool caseInsensitive) const;
|
|
ssize_t BytesNeeded() const;
|
|
private:
|
|
Range fRange;
|
|
Pattern *fPattern;
|
|
};
|
|
|
|
}; // namespace Sniffer
|
|
}; // namespace Storage
|
|
}; // namespace BPrivate
|
|
|
|
#endif // _SNIFFER_R_PATTERN_H
|
|
|
|
|