#ifndef FERROUS_OPENCC_FFI_H
#define FERROUS_OPENCC_FFI_H
#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <ostream>
#include <new>
enum class OpenCCResult : int32_t {
Success = 0,
InvalidHandle = 1,
InvalidArgument = 2,
CreationFailed = 3,
InternalError = 4,
};
enum class BuiltinConfig : int32_t {
S2t = 0,
T2s = 1,
S2tw = 2,
Tw2s = 3,
S2hk = 4,
Hk2s = 5,
S2twp = 6,
Tw2sp = 7,
T2tw = 8,
Tw2t = 9,
T2hk = 10,
Hk2t = 11,
Jp2t = 12,
T2jp = 13,
};
struct OpenCCHandle;
extern "C" {
OpenCCResult opencc_create(BuiltinConfig config,
OpenCCHandle **out_handle);
void opencc_destroy(OpenCCHandle *handle_ptr);
char *opencc_convert(const OpenCCHandle *handle_ptr, const char *text);
void opencc_free_string(char *s_ptr);
}
#endif