1//---------------------------------------------------------------------- 2// This software is part of the OpenBeOS distribution and is covered 3// by the OpenBeOS license. 4//--------------------------------------------------------------------- 5/*! 6 \file database_access.h 7 Mime database atomic read functions and miscellany declarations 8*/ 9 10#ifndef _MIME_DATABASE_ACCESS_H 11#define _MIME_DATABASE_ACCESS_H 12 13#include <Mime.h> 14 15class BNode; 16class BBitmap; 17class BMessage; 18 19namespace BPrivate { 20namespace Storage { 21namespace Mime { 22 23// Get() functions 24status_t get_app_hint(const char *type, entry_ref *ref); 25status_t get_attr_info(const char *type, BMessage *info); 26status_t get_short_description(const char *type, char *description); 27status_t get_long_description(const char *type, char *description); 28status_t get_file_extensions(const char *type, BMessage *extensions); 29status_t get_icon(const char *type, BBitmap *icon, icon_size size); 30status_t get_icon_for_type(const char *type, const char *fileType, BBitmap *icon, 31 icon_size which); 32status_t get_preferred_app(const char *type, char *signature, app_verb verb); 33status_t get_sniffer_rule(const char *type, BString *result); 34status_t get_supported_types(const char *type, BMessage *types); 35 36bool is_installed(const char *type); 37 38// Called by BMimeType to get properly formatted icon data ready 39// to be shipped off to SetIcon*() and written to the database 40status_t get_icon_data(const BBitmap *icon, icon_size size, void **data, int32 *dataSize); 41 42} // namespace Mime 43} // namespace Storage 44} // namespace BPrivate 45 46#endif // _MIME_DATABASE_H 47