1 /* 2 * Copyright 2009, Haiku Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _TRANSLATION_DEFS_H 6 #define _TRANSLATION_DEFS_H 7 8 9 #include <SupportDefs.h> 10 11 12 #define B_TRANSLATION_CURRENT_VERSION B_BEOS_VERSION 13 #define B_TRANSLATION_MIN_VERSION 161 14 15 #define B_TRANSLATION_MAKE_VERSION(major, minor, revision) \ 16 ((major << 8) | ((minor << 4) & 0xf0) | (revision & 0x0f)) 17 #define B_TRANSLATION_MAJOR_VERSION(v) (v >> 8) 18 #define B_TRANSLATION_MINOR_VERSION(v) ((v >> 4) & 0xf) 19 #define B_TRANSLATION_REVISION_VERSION(v) (v & 0xf) 20 21 22 extern const char* B_TRANSLATOR_MIME_TYPE; 23 24 typedef unsigned long translator_id; 25 26 27 struct translation_format { 28 uint32 type; // type_code 29 uint32 group; 30 float quality; // between 0.0 and 1.0 31 float capability; // between 0.0 and 1.0 32 char MIME[251]; 33 char name[251]; 34 }; 35 36 struct translator_info { 37 uint32 type; 38 translator_id translator; 39 uint32 group; 40 float quality; 41 float capability; 42 char name[251]; 43 char MIME[251]; 44 }; 45 46 47 #endif // _TRANSLATION_DEFS_H 48