haiku/headers/private/storage/mime/MimeSniffer.h
Ingo Weinhold 9cda9c9905 Move MIME DB code back from registrar to src/kits/storage/mime
* Together with database_{access,support}.cpp it is built into a static
  library.
* Add new interfaces MimeSniffer and Database::NotificationListener for
  plugging in registrar specific functionality (the sniffer add-on
  support and the notification mechanism).
2013-05-07 17:54:29 +02:00

44 lines
758 B
C++

/*
* Copyright 2013, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ingo Weinhold <ingo_weinhold@gmx.de>
*/
#ifndef _MIME_MIME_SNIFFER_H
#define _MIME_MIME_SNIFFER_H
#include <SupportDefs.h>
class BFile;
class BMimeType;
namespace BPrivate {
namespace Storage {
namespace Mime {
class MimeSniffer {
public:
virtual ~MimeSniffer();
virtual size_t MinimalBufferSize() = 0;
virtual float GuessMimeType(const char* fileName,
BMimeType* type) = 0;
virtual float GuessMimeType(BFile* file,
const void* buffer, int32 length,
BMimeType* type) = 0;
};
} // namespace Mime
} // namespace Storage
} // namespace BPrivate
#endif // _MIME_MIME_SNIFFER_H