haiku/headers/build/private/storage/sniffer/PatternList.h
Ingo Weinhold 338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00

52 lines
1.1 KiB
C++

//----------------------------------------------------------------------
// This software is part of the OpenBeOS distribution and is covered
// by the OpenBeOS license.
//---------------------------------------------------------------------
/*!
\file sniffer/PatternList.h
MIME sniffer pattern list declarations
*/
#ifndef _SNIFFER_PATTERN_LIST_H
#define _SNIFFER_PATTERN_LIST_H
#include <sniffer/DisjList.h>
#include <sniffer/Range.h>
#include <vector>
class BPositionIO;
namespace BPrivate {
namespace Storage {
namespace Sniffer {
class Err;
class Pattern;
/*! \brief A list of patterns, one of which must match for the list to match, all
of which are to be searched over the same range.
*/
class PatternList : public DisjList {
public:
PatternList(Range range);
virtual ~PatternList();
status_t InitCheck() const;
Err* GetErr() const;
virtual bool Sniff(BPositionIO *data) const;
virtual ssize_t BytesNeeded() const;
void Add(Pattern *pattern);
private:
std::vector<Pattern*> fList;
Range fRange;
};
}; // namespace Sniffer
}; // namespace Storage
}; // namespace BPrivate
#endif // _SNIFFER_PATTERN_LIST_H