aboutsummaryrefslogtreecommitdiffstats
path: root/example/hello.c
blob: f192a529d40845c53cc136d35fb2ee06bfc3719f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdlib.h>

#include <cJSON.h>

#include <dbs/event.h>
#include <dbs/log.h>

int hello(cJSON *data)
{
    char *string = cJSON_Print(data);
    print("hello, world!");
    print("hello data: %s", string);
    free(string);

    return 0;
}
declare_event(HELLO, hello);