go-waku/mobile/signals.c
Richard Ramos f1f6cb04f0
feat: kotlin android example (#226)
* feat: kotlin android example
* Adding lightpush and store to kotlin example
2022-04-12 08:12:14 -04:00

24 lines
581 B
C

// ======================================================================================
// cgo compilation (for desktop platforms and local tests)
// ======================================================================================
#include <stdio.h>
#include <stddef.h>
#include <stdbool.h>
#include "_cgo_export.h"
typedef void (*callback)(const char *jsonEvent);
callback gCallback = 0;
bool StatusServiceSignalEvent(const char *jsonEvent) {
if (gCallback) {
gCallback(jsonEvent);
}
return true;
}
void SetEventCallback(void *cb) {
gCallback = (callback)cb;
}