1 //---------------------------------------------------------------------- 2 // This software is part of the OpenBeOS distribution and is covered 3 // by the MIT License. 4 //--------------------------------------------------------------------- 5 /*! 6 \file sniffer/DisjList.h 7 Mime Sniffer Disjunction List declarations 8 */ 9 #ifndef _SNIFFER_DISJ_LIST_H 10 #define _SNIFFER_DISJ_LIST_H 11 12 #include <sys/types.h> 13 14 class BPositionIO; 15 16 namespace BPrivate { 17 namespace Storage { 18 namespace Sniffer { 19 20 //! Abstract class defining methods acting on a list of ORed patterns 21 class DisjList { 22 public: 23 DisjList(); 24 virtual ~DisjList(); 25 26 virtual bool Sniff(BPositionIO *data) const = 0; 27 virtual ssize_t BytesNeeded() const = 0; 28 29 void SetCaseInsensitive(bool how); 30 bool IsCaseInsensitive(); 31 protected: 32 bool fCaseInsensitive; 33 }; 34 35 }; // namespace Sniffer 36 }; // namespace Storage 37 }; // namespace BPrivate 38 39 #endif // _SNIFFER_DISJ_LIST_H 40 41 42