1 /*  Bluetooth Mesh */
2 
3 /*
4  * Copyright (c) 2017 Intel Corporation
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  */
8 
9 #include <ble_os.h>
10 #include <string.h>
11 #include <bt_errno.h>
12 #include <stdbool.h>
13 #include <ble_types/types.h>
14 
15 #include <api/mesh.h>
16 #include "common/log.h"
17 
18 #include "net.h"
19 #include "foundation.h"
20 #include "mesh_event_port.h"
21 
22 static mesh_model_evt_cb g_bt_mesh_model_evt_cb = NULL;
23 
24 
bt_mesh_event_register(mesh_model_evt_cb event_cb)25 int bt_mesh_event_register(mesh_model_evt_cb event_cb)
26 {
27     if (event_cb == NULL) {
28         return -1;
29     }
30     g_bt_mesh_model_evt_cb = event_cb;
31     return 0;
32 }
33 
bt_mesh_event_get_cb_func(void)34 mesh_model_evt_cb bt_mesh_event_get_cb_func(void)
35 {
36     return g_bt_mesh_model_evt_cb;
37 }
38