stub_analytics_plugin  1.6
Network Optix Video Analytics SDK
ini_config_c.h
Go to the documentation of this file.
1 // Copyright 2018-present Network Optix, Inc.
2 #pragma once
3 
54 #if !defined(__cplusplus)
55  #include <stdbool.h>
56 #endif // !defined(__cplusplus)
57 
58 #if defined(__cplusplus)
59  extern "C" {
60 #endif
61 
62 #define NX_INI_FLAG(DEFAULT, PARAM, DESCR) bool PARAM
63 #define NX_INI_INT(DEFAULT, PARAM, DESCR) int PARAM
64 #define NX_INI_STRING(DEFAULT, PARAM, DESCR) const char* PARAM
65 #define NX_INI_FLOAT(DEFAULT, PARAM, DESCR) float PARAM
66 #define NX_INI_DOUBLE(DEFAULT, PARAM, DESCR) double PARAM
67 
68 struct Ini NX_INI_STRUCT; //< Ini struct definition: expands using the macros defined above.
69 
70 #undef NX_INI_FLAG
71 #undef NX_INI_INT
72 #undef NX_INI_STRING
73 #undef NX_INI_FLOAT
74 #undef NX_INI_DOUBLE
75 
76 enum NxIniOutput { NX_INI_OUTPUT_NONE, NX_INI_OUTPUT_STDOUT, NX_INI_OUTPUT_STDERR };
77 
78 #if !defined(NX_KIT_C_API)
79  #define NX_KIT_C_API
80 #endif
81 
82 NX_KIT_C_API extern struct Ini ini; //< Declaration of Ini instance global variable.
83 
84 // See the documentation of the respective methods of class IniConfig in "ini_config.h".
85 NX_KIT_C_API bool nx_ini_isEnabled(void);
86 NX_KIT_C_API void nx_ini_setOutput(enum NxIniOutput output);
87 NX_KIT_C_API void nx_ini_reload(void);
88 NX_KIT_C_API const char* nx_ini_iniFile(void);
89 NX_KIT_C_API void nx_ini_setIniFilesDir(const char* value);
90 NX_KIT_C_API const char* nx_ini_iniFilesDir(void);
91 NX_KIT_C_API const char* nx_ini_iniFilePath(void);
92 
93 #if defined(__cplusplus)
94  } // extern "C"
95 #endif