Pyrogenesis  trunk
DLL.h
Go to the documentation of this file.
1 /* Copyright (C) 2015 Wildfire Games.
2  * This file is part of 0 A.D.
3  *
4  * 0 A.D. is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * 0 A.D. is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef INCLUDED_COLLADA_DLL
19 #define INCLUDED_COLLADA_DLL
20 
21 #ifdef _WIN32
22 # ifdef COLLADA_DLL
23 # define EXPORT extern "C" __declspec(dllexport)
24 # else
25 # define EXPORT extern "C" __declspec(dllimport)
26 # endif
27 #elif defined(__GNUC__)
28 # define EXPORT extern "C" __attribute__ ((visibility ("default")))
29 #else
30 # define EXPORT extern "C"
31 #endif
32 
33 #define LOG_INFO 0
34 #define LOG_WARNING 1
35 #define LOG_ERROR 2
36 
37 typedef void (*LogFn) (void* cb_data, int severity, const char* text);
38 typedef void (*OutputFn) (void* cb_data, const char* data, unsigned int length);
39 
40 /* This version number should be bumped whenever incompatible changes
41  * are made, to invalidate old caches. */
42 #define COLLADA_CONVERTER_VERSION 3
43 
44 EXPORT void set_logger(LogFn logger, void* cb_data);
45 EXPORT int set_skeleton_definitions(const char* xml, int length);
46 EXPORT int convert_dae_to_pmd(const char* dae, OutputFn pmd_writer, void* cb_data);
47 EXPORT int convert_dae_to_psa(const char* dae, OutputFn psa_writer, void* cb_data);
48 
49 #endif /* INCLUDED_COLLADA_DLL */
xml
Definition: tests.py:119
void(* OutputFn)(void *cb_data, const char *data, unsigned int length)
Definition: DLL.h:38
void(* LogFn)(void *cb_data, int severity, const char *text)
Definition: DLL.h:37
EXPORT void set_logger(LogFn logger, void *cb_data)
Definition: DLL.cpp:36
EXPORT int convert_dae_to_psa(const char *dae, OutputFn psa_writer, void *cb_data)
Definition: DLL.cpp:147
EXPORT int set_skeleton_definitions(const char *xml, int length)
Definition: DLL.cpp:152
EXPORT int convert_dae_to_pmd(const char *dae, OutputFn pmd_writer, void *cb_data)
Definition: DLL.cpp:142
#define EXPORT
Definition: ColladaManager.cpp:31