xref: /haiku/headers/os/storage/Mime.h (revision 2f470aec1c92ce6917b8a903e343795dc77af41f)
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 static const uint32 B_MIME_STRING_TYPE	= 'MIMS';
35 
36 enum icon_size {
37 	B_LARGE_ICON	= 32,
38 	B_MINI_ICON		= 16
39 };
40 
41 // values for the "force" parameter of update_mime_info() (Haiku only)
42 enum {
43 	B_UPDATE_MIME_INFO_NO_FORCE			= 0,
44 	B_UPDATE_MIME_INFO_FORCE_KEEP_TYPE	= 1,
45 	B_UPDATE_MIME_INFO_FORCE_UPDATE_ALL	= 2,
46 };
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 // Haiku only!
53 #ifdef __cplusplus
54 
55 class BBitmap;
56 
57 status_t get_device_icon(const char *dev, BBitmap *icon, icon_size which);
58 
59 #endif
60 
61 // include the C++ API
62 #ifdef __cplusplus
63 #include <MimeType.h>
64 #endif
65 
66 #endif	// _MIME_H
67