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