go-waku/library/signals.c

19 lines
533 B
C
Raw Normal View History

2022-03-21 23:15:53 +00:00
// ======================================================================================
// cgo compilation (for desktop platforms and local tests)
// ======================================================================================
#include <stdio.h>
#include <stddef.h>
#include <stdbool.h>
#include "_cgo_export.h"
2023-10-28 23:37:53 +00:00
typedef void (*callback)(int retCode, const char *jsonEvent, void* userData);
2022-03-21 23:15:53 +00:00
bool ServiceSignalEvent(void *cb, const char *jsonEvent) {
if (cb) {
((callback)cb)(0, jsonEvent, NULL);
2022-03-21 23:15:53 +00:00
}
return true;
}