1 /* 2 * Copyright 2006-2013, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _MIME_TEXT_SNIFFER_ADDON_H 6 #define _MIME_TEXT_SNIFFER_ADDON_H 7 8 9 #include <MimeSnifferAddon.h> 10 11 12 namespace BPrivate { 13 namespace Storage { 14 namespace Mime { 15 16 17 class DatabaseLocation; 18 19 20 class TextSnifferAddon : public BMimeSnifferAddon { 21 public: 22 TextSnifferAddon( 23 DatabaseLocation* databaseLocation); 24 virtual ~TextSnifferAddon(); 25 26 virtual size_t MinimalBufferSize(); 27 28 virtual float GuessMimeType(const char* fileName, 29 BMimeType* type); 30 virtual float GuessMimeType(BFile* file, 31 const void* buffer, int32 length, 32 BMimeType* type); 33 34 private: 35 DatabaseLocation* fDatabaseLocation; 36 }; 37 38 39 } // namespace Mime 40 } // namespace Storage 41 } // namespace BPrivate 42 43 44 #endif // _MIME_TEXT_SNIFFER_ADDON_H 45