xref: /haiku/headers/build/os/storage/Mime.h (revision a84e14ca84d32e9469c91372d71556488bd3d48b)
1*0b537029SIngo Weinhold /*
2*0b537029SIngo Weinhold  * Copyright 2004-2006, Haiku Inc. All Rights Reserved.
3*0b537029SIngo Weinhold  * Distributed under the terms of the MIT License.
4*0b537029SIngo Weinhold  */
5*0b537029SIngo Weinhold 
6338b8dc3SIngo Weinhold /*!
7338b8dc3SIngo Weinhold 	\file Mime.h
8338b8dc3SIngo Weinhold 	Mime type C functions interface declarations.
9338b8dc3SIngo Weinhold */
10338b8dc3SIngo Weinhold #ifndef _MIME_H
11338b8dc3SIngo Weinhold #define _MIME_H
12338b8dc3SIngo Weinhold 
13338b8dc3SIngo Weinhold #ifndef _BE_BUILD_H
14338b8dc3SIngo Weinhold #include <BeBuild.h>
15338b8dc3SIngo Weinhold #endif
16338b8dc3SIngo Weinhold #include <sys/types.h>
17338b8dc3SIngo Weinhold #include <SupportDefs.h>
18338b8dc3SIngo Weinhold #include <StorageDefs.h>
19338b8dc3SIngo Weinhold 
20338b8dc3SIngo Weinhold // C functions
21338b8dc3SIngo Weinhold 
22338b8dc3SIngo Weinhold #ifdef __cplusplus
23338b8dc3SIngo Weinhold extern "C" {
24338b8dc3SIngo Weinhold #endif
25338b8dc3SIngo Weinhold 
26338b8dc3SIngo Weinhold int update_mime_info(const char *path, int recursive, int synchronous,
27338b8dc3SIngo Weinhold 					 int force);
28338b8dc3SIngo Weinhold 
29338b8dc3SIngo Weinhold status_t create_app_meta_mime(const char *path, int recursive, int synchronous,
30338b8dc3SIngo Weinhold 							  int force);
31338b8dc3SIngo Weinhold 
32338b8dc3SIngo Weinhold status_t get_device_icon(const char *dev, void *icon, int32 size);
33338b8dc3SIngo Weinhold 
34338b8dc3SIngo Weinhold 
35338b8dc3SIngo Weinhold enum icon_size {
36338b8dc3SIngo Weinhold 	B_LARGE_ICON	= 32,
37338b8dc3SIngo Weinhold 	B_MINI_ICON		= 16
38338b8dc3SIngo Weinhold };
39338b8dc3SIngo Weinhold 
40*0b537029SIngo Weinhold // values for the "force" parameter of update_mime_info() (Haiku only)
41*0b537029SIngo Weinhold enum {
42*0b537029SIngo Weinhold 	B_UPDATE_MIME_INFO_NO_FORCE			= 0,
43*0b537029SIngo Weinhold 	B_UPDATE_MIME_INFO_FORCE_KEEP_TYPE	= 1,
44*0b537029SIngo Weinhold 	B_UPDATE_MIME_INFO_FORCE_UPDATE_ALL	= 2,
45*0b537029SIngo Weinhold };
46*0b537029SIngo Weinhold 
47338b8dc3SIngo Weinhold #ifdef __cplusplus
48338b8dc3SIngo Weinhold }
49338b8dc3SIngo Weinhold #endif
50338b8dc3SIngo Weinhold 
51*0b537029SIngo Weinhold // Haiku only!
52338b8dc3SIngo Weinhold #ifdef __cplusplus
53338b8dc3SIngo Weinhold 
54338b8dc3SIngo Weinhold class BBitmap;
55338b8dc3SIngo Weinhold 
56338b8dc3SIngo Weinhold status_t get_device_icon(const char *dev, BBitmap *icon, icon_size which);
57338b8dc3SIngo Weinhold 
58338b8dc3SIngo Weinhold #endif
59338b8dc3SIngo Weinhold 
60338b8dc3SIngo Weinhold // include the C++ API
61338b8dc3SIngo Weinhold #ifdef __cplusplus
62338b8dc3SIngo Weinhold #include <MimeType.h>
63338b8dc3SIngo Weinhold #endif
64338b8dc3SIngo Weinhold 
65338b8dc3SIngo Weinhold #endif	// _MIME_H
66