2002-08-10 13:36:00 +04:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// This software is part of the OpenBeOS distribution and is covered
|
|
|
|
// by the OpenBeOS license.
|
|
|
|
//---------------------------------------------------------------------
|
|
|
|
/*!
|
|
|
|
\file sniffer/DisjList.h
|
|
|
|
Mime Sniffer Disjunction List declarations
|
|
|
|
*/
|
2002-08-12 11:24:02 +04:00
|
|
|
#ifndef _SNIFFER_DISJ_LIST_H
|
|
|
|
#define _SNIFFER_DISJ_LIST_H
|
2002-08-10 13:36:00 +04:00
|
|
|
|
2002-09-24 09:27:46 +04:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
2002-08-10 13:36:00 +04:00
|
|
|
class BPositionIO;
|
|
|
|
|
2002-08-12 12:42:01 +04:00
|
|
|
namespace BPrivate {
|
|
|
|
namespace Storage {
|
2002-08-10 13:36:00 +04:00
|
|
|
namespace Sniffer {
|
|
|
|
|
|
|
|
//! Abstract class defining methods acting on a list of ORed patterns
|
|
|
|
class DisjList {
|
|
|
|
public:
|
|
|
|
DisjList();
|
|
|
|
virtual ~DisjList();
|
2002-09-24 09:27:46 +04:00
|
|
|
|
2002-08-10 13:36:00 +04:00
|
|
|
virtual bool Sniff(BPositionIO *data) const = 0;
|
2002-09-24 09:27:46 +04:00
|
|
|
virtual ssize_t BytesNeeded() const = 0;
|
2002-08-10 13:36:00 +04:00
|
|
|
|
|
|
|
void SetCaseInsensitive(bool how);
|
|
|
|
bool IsCaseInsensitive();
|
|
|
|
protected:
|
|
|
|
bool fCaseInsensitive;
|
|
|
|
};
|
|
|
|
|
2002-08-12 12:42:01 +04:00
|
|
|
}; // namespace Sniffer
|
|
|
|
}; // namespace Storage
|
|
|
|
}; // namespace BPrivate
|
|
|
|
|
|
|
|
#endif // _SNIFFER_DISJ_LIST_H
|
|
|
|
|
2002-08-10 13:36:00 +04:00
|
|
|
|