Files
EchoionApi/include/echoion/api/Export.hpp
T
2026-02-01 23:05:41 +03:00

40 lines
956 B
C++

#pragma once
#include "CoreInterface.hpp"
// Platform-specific export macros
#ifdef _WIN32
#ifdef ECHOION_API_EXPORT
#define ECHOION_API __declspec(dllexport)
#else
#define ECHOION_API __declspec(dllimport)
#endif
#else
#define ECHOION_API __attribute__((visibility("default")))
#endif
namespace Echoion::Api {
// Version information
constexpr uint32_t VERSION_MAJOR = 1;
constexpr uint32_t VERSION_MINOR = 0;
constexpr uint32_t VERSION_PATCH = 0;
constexpr const char* VERSION_STRING = "1.0.0";
// API export functions
extern "C" {
// Create a new core instance
ECHOION_API CoreInterfacePtr CreateCore();
// Destroy a core instance
ECHOION_API void DestroyCore(ICoreInterface* core);
// Get API version
ECHOION_API const char* GetApiVersion();
// Check if API is compatible
ECHOION_API bool IsApiCompatible(uint32_t major, uint32_t minor);
}
} // namespace Echoion::Api