RIC-125: Expose discovered gNBs and their status via O1
[ric-plt/o1.git] / agent / pkg / nbi / helper.h
1 /*
2 ==================================================================================
3   Copyright (c) 2019 AT&T Intellectual Property.
4   Copyright (c) 2019 Nokia
5
6    Licensed under the Apache License, Version 2.0 (the "License");
7    you may not use this file except in compliance with the License.
8    You may obtain a copy of the License at
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
12    Unless required by applicable law or agreed to in writing, software
13    distributed under the License is distributed on an "AS IS" BASIS,
14    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15    See the License for the specific language governing permissions and
16    limitations under the License.
17 ==================================================================================
18 */
19
20 #ifndef HELPER_H
21 #define HELPER_H
22
23 #include <sysrepo.h>
24
25 sr_val_t *get_val(sr_val_t *val, size_t i);
26
27 int module_change_cb(sr_session_ctx_t *session, const char *module_name, const char *xpath, sr_event_t event, uint32_t request_id, void *private_data);
28
29 char * yang_data_sr2json(sr_session_ctx_t *session, const char *module_name, sr_event_t event, sr_change_oper_t *operation);
30
31 char * get_data_json(sr_session_ctx_t *session, const char *module_name);
32
33 int gnb_status_cb(sr_session_ctx_t *session, const char *module_name, const char *xpath, const char *req_xpath, uint32_t req_id, struct lyd_node **parent, void *private_data);
34
35 void create_new_path(sr_session_ctx_t *session, char **parent, char *key, char *value);
36
37 #endif