1 /* 2 * Copyright 2004-2006, Haiku Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 /*! 7 \file Mime.h 8 Mime type C functions interface declarations. 9 */ 10 #ifndef _MIME_H 11 #define _MIME_H 12 13 #ifndef _BE_BUILD_H 14 #include <BeBuild.h> 15 #endif 16 #include <sys/types.h> 17 #include <SupportDefs.h> 18 #include <StorageDefs.h> 19 20 // C functions 21 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 26 int update_mime_info(const char *path, int recursive, int synchronous, 27 int force); 28 29 status_t create_app_meta_mime(const char *path, int recursive, int synchronous, 30 int force); 31 32 status_t get_device_icon(const char *dev, void *icon, int32 size); 33 34 35 enum icon_size { 36 B_LARGE_ICON = 32, 37 B_MINI_ICON = 16 38 }; 39 40 // values for the "force" parameter of update_mime_info() (Haiku only) 41 enum { 42 B_UPDATE_MIME_INFO_NO_FORCE = 0, 43 B_UPDATE_MIME_INFO_FORCE_KEEP_TYPE = 1, 44 B_UPDATE_MIME_INFO_FORCE_UPDATE_ALL = 2, 45 }; 46 47 #ifdef __cplusplus 48 } 49 #endif 50 51 // Haiku only! 52 #ifdef __cplusplus 53 54 class BBitmap; 55 56 status_t get_device_icon(const char *dev, BBitmap *icon, icon_size which); 57 58 #endif 59 60 // include the C++ API 61 #ifdef __cplusplus 62 #include <MimeType.h> 63 #endif 64 65 #endif // _MIME_H 66