1 /* 2 * Copyright 2002-2013, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _MIME_DATABASE_SUPPORT_H 6 #define _MIME_DATABASE_SUPPORT_H 7 8 9 #include <Mime.h> 10 #include <SupportDefs.h> 11 12 13 class BBitmap; 14 15 16 namespace BPrivate { 17 namespace Storage { 18 namespace Mime { 19 20 21 class DatabaseLocation; 22 23 24 // Attribute Prefixes 25 extern const char *kMiniIconAttrPrefix; 26 extern const char *kLargeIconAttrPrefix; 27 extern const char *kIconAttrPrefix; 28 29 // Attribute names 30 extern const char *kFileTypeAttr; 31 extern const char *kTypeAttr; 32 extern const char *kAttrInfoAttr; 33 extern const char *kAppHintAttr; 34 extern const char *kShortDescriptionAttr; 35 extern const char *kLongDescriptionAttr; 36 extern const char *kFileExtensionsAttr; 37 extern const char *kMiniIconAttr; 38 extern const char *kLargeIconAttr; 39 extern const char *kIconAttr; 40 extern const char *kPreferredAppAttr; 41 extern const char *kSnifferRuleAttr; 42 extern const char *kSupportedTypesAttr; 43 44 // Attribute Datatypes 45 extern const int32 kFileTypeType; 46 extern const int32 kTypeType; 47 extern const int32 kAppHintType; 48 extern const int32 kAttrInfoType; 49 extern const int32 kShortDescriptionType; 50 extern const int32 kLongDescriptionType; 51 extern const int32 kFileExtensionsType; 52 extern const int32 kMiniIconType; 53 extern const int32 kLargeIconType; 54 extern const int32 kIconType; 55 extern const int32 kPreferredAppType; 56 extern const int32 kSnifferRuleType; 57 extern const int32 kSupportedTypesType; 58 59 // Message fields 60 extern const char *kApplicationsField; 61 extern const char *kExtensionsField; 62 extern const char *kSupertypesField; 63 extern const char *kSupportingAppsSubCountField; 64 extern const char *kSupportingAppsSuperCountField; 65 extern const char *kTypesField; 66 67 // Mime types 68 extern const char *kGenericFileType; 69 extern const char *kDirectoryType; 70 extern const char *kSymlinkType; 71 extern const char *kMetaMimeType; 72 73 // Error codes (to be used only by BPrivate::Storage::Mime members) 74 extern const status_t kMimeGuessFailureError; 75 76 77 DatabaseLocation* default_database_location(); 78 79 // Called by BMimeType to get properly formatted icon data ready 80 // to be shipped off to SetIcon*() and written to the database 81 status_t get_icon_data(const BBitmap *icon, icon_size size, void **data, 82 int32 *dataSize); 83 84 85 } // namespace Mime 86 } // namespace Storage 87 } // namespace BPrivate 88 89 90 #endif // _MIME_DATABASE_SUPPORT_H 91