2025-03-30 23:19:15 +05:30
|
|
|
|
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
|
2025-03-30 23:19:15 +05:30
|
|
|
|
|
|
|
|
#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);
|
2025-03-30 23:19:15 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
// --- Core API Functions ---
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief Creates a new ReliabilityManager instance.
|
|
|
|
|
* @param channelId A unique identifier for the communication channel.
|
|
|
|
|
* @return An opaque handle (void*) representing the instance, or NULL on failure.
|
|
|
|
|
*/
|
2025-04-09 18:31:43 +03:00
|
|
|
void* NewReliabilityManager(char* channelId, SdsCallBack callback, void* userData);
|
2025-03-30 23:19:15 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2025-04-08 15:31:57 +03:00
|
|
|
}
|
2025-03-30 23:19:15 +05:30
|
|
|
#endif
|
|
|
|
|
|
2025-04-08 15:31:57 +03:00
|
|
|
#endif /* __libsds__ */
|