2025-05-29 16:48:53 +05:30
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
|
|
|
|
|
typedef void (*SdsCallBack) (int callerRet, const char* msg, size_t len, void* userData);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// --- Core API Functions ---
|
|
|
|
|
|
|
|
|
|
|
2025-07-17 14:13:21 +05:30
|
|
|
void* SdsNewReliabilityManager(SdsCallBack callback, void* userData);
|
2025-05-29 16:48:53 +05:30
|
|
|
|
2025-06-17 09:59:46 +02:00
|
|
|
void SdsSetEventCallback(void* ctx, SdsCallBack callback, void* userData);
|
2025-05-29 16:48:53 +05:30
|
|
|
|
2025-06-17 09:59:46 +02:00
|
|
|
int SdsCleanupReliabilityManager(void* ctx, SdsCallBack callback, void* userData);
|
2025-05-29 16:48:53 +05:30
|
|
|
|
2025-06-17 09:59:46 +02:00
|
|
|
int SdsResetReliabilityManager(void* ctx, SdsCallBack callback, void* userData);
|
2025-05-29 16:48:53 +05:30
|
|
|
|
2025-06-17 09:59:46 +02:00
|
|
|
int SdsWrapOutgoingMessage(void* ctx,
|
2025-05-29 16:48:53 +05:30
|
|
|
void* message,
|
|
|
|
|
size_t messageLen,
|
|
|
|
|
const char* messageId,
|
2025-07-17 14:13:21 +05:30
|
|
|
const char* channelId,
|
2025-05-29 16:48:53 +05:30
|
|
|
SdsCallBack callback,
|
|
|
|
|
void* userData);
|
|
|
|
|
|
2025-06-17 09:59:46 +02:00
|
|
|
int SdsUnwrapReceivedMessage(void* ctx,
|
2025-05-29 16:48:53 +05:30
|
|
|
void* message,
|
|
|
|
|
size_t messageLen,
|
|
|
|
|
SdsCallBack callback,
|
|
|
|
|
void* userData);
|
|
|
|
|
|
2025-06-17 09:59:46 +02:00
|
|
|
int SdsMarkDependenciesMet(void* ctx,
|
2025-05-29 16:48:53 +05:30
|
|
|
char** messageIDs,
|
|
|
|
|
size_t count,
|
2025-07-17 14:13:21 +05:30
|
|
|
const char* channelId,
|
2025-05-29 16:48:53 +05:30
|
|
|
SdsCallBack callback,
|
|
|
|
|
void* userData);
|
|
|
|
|
|
2025-06-17 09:59:46 +02:00
|
|
|
int SdsStartPeriodicTasks(void* ctx, SdsCallBack callback, void* userData);
|
2025-05-29 16:48:53 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif /* __libsds__ */
|