2009-08-27 18:20:56 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Haiku Inc. All Rights Reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _TRANSLATION_DEFS_H
|
2002-07-09 16:24:59 +04:00
|
|
|
#define _TRANSLATION_DEFS_H
|
|
|
|
|
2009-08-27 18:20:56 +04:00
|
|
|
|
2002-07-09 16:24:59 +04:00
|
|
|
#include <SupportDefs.h>
|
|
|
|
#include <TranslationErrors.h>
|
|
|
|
|
|
|
|
|
2009-08-27 18:20:56 +04:00
|
|
|
#define B_TRANSLATION_CURRENT_VERSION B_BEOS_VERSION
|
|
|
|
#define B_TRANSLATION_MIN_VERSION 161
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2009-08-27 18:20:56 +04:00
|
|
|
#define B_TRANSLATION_MAKE_VERSION(major, minor, revision) \
|
|
|
|
((major << 8) | ((minor << 4) & 0xf0) | (revision & 0x0f))
|
|
|
|
#define B_TRANSLATION_MAJOR_VERSION(v) (v >> 8)
|
|
|
|
#define B_TRANSLATION_MINOR_VERSION(v) ((v >> 4) & 0xf)
|
|
|
|
#define B_TRANSLATION_REVISION_VERSION(v) (v & 0xf)
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
|
2009-08-27 18:20:56 +04:00
|
|
|
extern const char* B_TRANSLATOR_MIME_TYPE;
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2009-08-27 18:20:56 +04:00
|
|
|
typedef unsigned long translator_id;
|
2002-07-09 16:24:59 +04:00
|
|
|
|
|
|
|
|
|
|
|
struct translation_format {
|
2009-08-27 18:20:56 +04:00
|
|
|
uint32 type; // type_code
|
|
|
|
uint32 group;
|
|
|
|
float quality; // between 0.0 and 1.0
|
|
|
|
float capability; // between 0.0 and 1.0
|
|
|
|
char MIME[251];
|
|
|
|
char name[251];
|
2002-07-09 16:24:59 +04:00
|
|
|
};
|
|
|
|
|
2009-08-27 18:20:56 +04:00
|
|
|
struct translator_info {
|
|
|
|
uint32 type;
|
|
|
|
translator_id translator;
|
|
|
|
uint32 group;
|
|
|
|
float quality;
|
|
|
|
float capability;
|
2002-07-09 16:24:59 +04:00
|
|
|
char name[251];
|
|
|
|
char MIME[251];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-08-27 18:20:56 +04:00
|
|
|
#endif // _TRANSLATION_DEFS_H
|