nispor-clib 1.2.9

C binding for nispor project
Documentation
// SPDX-License-Identifier: Apache-2.0

#ifndef _LIBNISPOR_H_
#define _LIBNISPOR_H_

#ifdef __cplusplus
extern "C" {
#endif
#define NISPOR_VERSION_MAJOR        @_VERSION_MAJOR@
#define NISPOR_VERSION_MINOR        @_VERSION_MINOR@
#define NISPOR_VERSION_MICRO        @_VERSION_MICRO@

#define NISPOR_VERSION              \
    ((NISPOR_VERSION_MAJOR * 10000) + \
     (NISPOR_VERSION_MINOR * 100) + \
     NISPOR_VERSION_MICRO)

#define NISPOR_PASS                 0
#define NISPOR_FAIL                 1

/**
 * nispor_net_state_retrieve - Retrieve network state
 *
 * Version:
 *      0.2
 *
 * Description:
 *      Retrieve network state in the format of JSON.
 *
 * @state:
 *      Output pointer of char array for network state in json format.
 *      The memory should be freed by nispor_net_state_free().
 * @err_kind:
 *      Output pointer of char array for error kind.
 *      The memory should be freed by nispor_err_kind_free().
 * @err_msg:
 *      Output pointer of char array for error message.
 *      The memory should be freed by nispor_err_msg_free().
 *
 * Return:
 *      Error code:
 *          * NISPOR_PASS
 *              On success.
 *          * NISPOR_FAIL
 *              On failure.
 */
int nispor_net_state_retrieve(char **state, char **err_kind, char **err_msg);

void nispor_net_state_free(char *state);

void nispor_err_msg_free(char *err_msg);

void nispor_err_kind_free(char *err_kind);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif /* End of _LIBNISPOR_H_ */