xref: /haiku/headers/private/storage/mime/MimeSniffer.h (revision 22440f4105cafc95cc1d49f9bc65bb395c527d86)
1 /*
2  * Copyright 2013, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Ingo Weinhold <ingo_weinhold@gmx.de>
7  */
8 #ifndef _MIME_MIME_SNIFFER_H
9 #define _MIME_MIME_SNIFFER_H
10 
11 
12 #include <SupportDefs.h>
13 
14 
15 class BFile;
16 class BMimeType;
17 
18 
19 namespace BPrivate {
20 namespace Storage {
21 namespace Mime {
22 
23 
24 class MimeSniffer {
25 public:
26 	virtual						~MimeSniffer();
27 
28 	virtual	size_t				MinimalBufferSize() = 0;
29 
30 	virtual	float				GuessMimeType(const char* fileName,
31 									BMimeType* type) = 0;
32 	virtual	float				GuessMimeType(BFile* file,
33 									const void* buffer, int32 length,
34 									BMimeType* type) = 0;
35 };
36 
37 
38 } // namespace Mime
39 } // namespace Storage
40 } // namespace BPrivate
41 
42 
43 #endif	// _MIME_MIME_SNIFFER_H
44