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 #include <TypeConstants.h> 14 15 16 enum icon_size { 17 B_LARGE_ICON = 32, 18 B_MINI_ICON = 16 19 }; 20 21 /* values for the "force" parameter of update_mime_info() (Haiku only) */ 22 enum { 23 B_UPDATE_MIME_INFO_NO_FORCE = 0, 24 B_UPDATE_MIME_INFO_FORCE_KEEP_TYPE = 1, 25 B_UPDATE_MIME_INFO_FORCE_UPDATE_ALL = 2, 26 }; 27 28 29 /* C functions */ 30 31 #ifdef __cplusplus 32 extern "C" { 33 #endif 34 35 int update_mime_info(const char* path, int recursive, int synchronous, 36 int force); 37 status_t create_app_meta_mime(const char* path, int recursive, int synchronous, 38 int force); 39 status_t get_device_icon(const char* device, void* icon, int32 size); 40 41 #ifdef __cplusplus 42 } 43 44 /* C++ functions, Haiku only! */ 45 46 class BBitmap; 47 48 status_t get_device_icon(const char* device, BBitmap* icon, icon_size which); 49 status_t get_device_icon(const char* device, uint8** _data, size_t* _size, 50 type_code* _type); 51 52 status_t get_named_icon(const char* name, BBitmap* icon, icon_size which); 53 status_t get_named_icon(const char* name, uint8** _data, size_t* _size, 54 type_code* _type); 55 56 /* include MimeType.h for convenience */ 57 # include <MimeType.h> 58 #endif /* __cplusplus */ 59 60 #endif /* _MIME_H */ 61