nim-sds/library/libsds.h

53 lines
1.4 KiB
C
Raw Normal View History

2025-04-08 15:31:57 +03:00
// Generated manually and inspired by the one generated by the Nim Compiler.
// In order to see the header file generated by Nim just run `make libsds`
// from the root repo folder and the header should be created in
// nimcache/release/libsds/libsds.h
#ifndef __libsds__
#define __libsds__
#include <stddef.h>
#include <stdint.h>
// The possible returned values for the functions that return int
#define RET_OK 0
#define RET_ERR 1
#define RET_MISSING_CALLBACK 2
#ifdef __cplusplus
extern "C" {
#endif
2025-04-08 15:31:57 +03:00
typedef void (*SdsCallBack) (int callerRet, const char* msg, size_t len, void* userData);
// --- Core API Functions ---
2025-04-10 12:41:48 +03:00
2025-04-09 18:55:12 +03:00
void* NewReliabilityManager(const char* channelId, SdsCallBack callback, void* userData);
2025-04-10 12:41:48 +03:00
void SetEventCallback(void* ctx, SdsCallBack callback, void* userData);
2025-04-10 12:52:04 +03:00
int CleanupReliabilityManager(void* ctx, SdsCallBack callback, void* userData);
2025-04-10 14:25:53 +03:00
int ResetReliabilityManager(void* ctx, SdsCallBack callback, void* userData);
2025-04-10 16:14:44 +03:00
int WrapOutgoingMessage(void* ctx,
void* message,
size_t messageLen,
2025-04-10 16:14:44 +03:00
const char* messageId,
SdsCallBack callback,
void* userData);
2025-04-15 16:23:06 +03:00
int UnwrapReceivedMessage(void* ctx,
void* message,
size_t messageLen,
SdsCallBack callback,
void* userData);
2025-04-10 12:52:04 +03:00
#ifdef __cplusplus
2025-04-08 15:31:57 +03:00
}
#endif
2025-04-08 15:31:57 +03:00
#endif /* __libsds__ */