go-waku/library/signals.c

19 lines
533 B
C
Raw Permalink Normal View History

2022-03-21 19:15:53 -04: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 19:37:53 -04:00
typedef void (*callback)(int retCode, const char *jsonEvent, void* userData);
2022-03-21 19:15:53 -04:00
bool ServiceSignalEvent(void *cb, const char *jsonEvent) {
if (cb) {
((callback)cb)(0, jsonEvent, NULL);
2022-03-21 19:15:53 -04:00
}
return true;
}