minpf_plugin.h
Go to the documentation of this file.
#pragma once
#include <stdint.h>
namespace grk
{
struct minpf_platform_services;
typedef struct minpf_object_params
{
const char* id;
const struct minpf_platform_services* platformServices;
} minpf_object_params;
typedef struct minpf_plugin_api_version
{
int32_t major;
int32_t minor;
} minpf_plugin_api_version;
typedef void* (*minpf_create_func)(minpf_object_params*);
typedef int32_t (*minpf_destroy_func)(void*);
typedef struct minpf_register_params
{
minpf_plugin_api_version version;
minpf_create_func createFunc;
minpf_destroy_func destroyFunc;
} minpf_register_params;
typedef int32_t (*minpf_register_func)(const char* nodeType, const minpf_register_params* params);
typedef int32_t (*minpf_invoke_service_func)(const char* serviceName, void* serviceParams);
typedef struct minpf_platform_services
{
minpf_plugin_api_version version;
minpf_register_func registerObject;
minpf_invoke_service_func invokeService;
} minpf_platform_services;
typedef int32_t (*minpf_exit_func)();
typedef minpf_exit_func (*minpf_post_load_func)(const char* pluginPath,
const minpf_platform_services*);
#if defined(GRK_STATIC) || !defined(_WIN32)
/* http://gcc.gnu.org/wiki/Visibility */
#if __GNUC__ >= 4
#if defined(GRK_STATIC) /* static library uses "hidden" */
#define PLUGIN_API __attribute__((visibility("hidden")))
#else
#define PLUGIN_API __attribute__((visibility("default")))
#endif
#define PLUGIN_LOCAL __attribute__((visibility("hidden")))
#else
#define PLUGIN_API
#define PLUGIN_LOCAL
#endif
#else
#ifdef GRK_EXPORTS
#define PLUGIN_API __declspec(dllexport)
#else
#define PLUGIN_API __declspec(dllimport)
#endif /* GRK_EXPORTS */
#endif /* !GRK_STATIC || !_WIN32 */
extern "C" PLUGIN_API minpf_exit_func minpf_init_plugin(const char* pluginPath,
const minpf_platform_services* params);
} // namespace grk
PLUGIN_API
#define PLUGIN_API
Definition minpf_plugin.h:71
grk
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition ICacheable.h:20
grk::minpf_register_func
int32_t(* minpf_register_func)(const char *nodeType, const minpf_register_params *params)
Definition minpf_plugin.h:46
grk::grk_read
void grk_read(const uint8_t *buffer, TYPE *value, uint32_t numBytes)
Definition BufferedStream.h:239
grk::minpf_destroy_func
int32_t(* minpf_destroy_func)(void *)
Definition minpf_plugin.h:37
grk::minpf_invoke_service_func
int32_t(* minpf_invoke_service_func)(const char *serviceName, void *serviceParams)
Definition minpf_plugin.h:47
grk::minpf_post_load_func
minpf_exit_func(* minpf_post_load_func)(const char *pluginPath, const minpf_platform_services *)
Definition minpf_plugin.h:58
grk::minpf_exit_func
int32_t(* minpf_exit_func)()
Definition minpf_plugin.h:56
grk::minpf_platform_services
struct grk::minpf_platform_services minpf_platform_services
grk::minpf_init_plugin
PLUGIN_API minpf_exit_func minpf_init_plugin(const char *pluginPath, const minpf_platform_services *params)
grk::minpf_create_func
void *(* minpf_create_func)(minpf_object_params *)
Definition minpf_plugin.h:36
grk::minpf_object_params
Definition minpf_plugin.h:25
grk::minpf_object_params::id
const char * id
Definition minpf_plugin.h:26
grk::minpf_object_params::platformServices
const struct minpf_platform_services * platformServices
Definition minpf_plugin.h:27
grk::minpf_platform_services
Definition minpf_plugin.h:50
grk::minpf_platform_services::invokeService
minpf_invoke_service_func invokeService
Definition minpf_plugin.h:53
grk::minpf_platform_services::version
minpf_plugin_api_version version
Definition minpf_plugin.h:51
grk::minpf_platform_services::registerObject
minpf_register_func registerObject
Definition minpf_plugin.h:52
grk::minpf_plugin_api_version
Definition minpf_plugin.h:31
grk::minpf_plugin_api_version::minor
int32_t minor
Definition minpf_plugin.h:33
grk::minpf_plugin_api_version::major
int32_t major
Definition minpf_plugin.h:32
grk::minpf_register_params
Definition minpf_plugin.h:40
grk::minpf_register_params::createFunc
minpf_create_func createFunc
Definition minpf_plugin.h:42
grk::minpf_register_params::version
minpf_plugin_api_version version
Definition minpf_plugin.h:41
grk::minpf_register_params::destroyFunc
minpf_destroy_func destroyFunc
Definition minpf_plugin.h:43