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#include <TranslationErrors.h>
11
12
13#define B_TRANSLATION_CURRENT_VERSION	B_BEOS_VERSION
14#define B_TRANSLATION_MIN_VERSION		161
15
16#define B_TRANSLATION_MAKE_VERSION(major, minor, revision) \
17	((major << 8) | ((minor << 4) & 0xf0) | (revision & 0x0f))
18#define B_TRANSLATION_MAJOR_VERSION(v)		(v >> 8)
19#define B_TRANSLATION_MINOR_VERSION(v)		((v >> 4) & 0xf)
20#define B_TRANSLATION_REVISION_VERSION(v)	(v & 0xf)
21
22
23extern const char* B_TRANSLATOR_MIME_TYPE;
24
25typedef unsigned long translator_id;
26
27
28struct translation_format {
29	uint32		type;				// type_code
30	uint32		group;
31	float		quality;			// between 0.0 and 1.0
32	float		capability;			// between 0.0 and 1.0
33	char		MIME[251];
34	char		name[251];
35};
36
37struct translator_info {
38	uint32			type;
39	translator_id	translator;
40	uint32			group;
41	float			quality;
42	float			capability;
43	char			name[251];
44	char			MIME[251];
45};
46
47
48#endif	// _TRANSLATION_DEFS_H
49