28 lines
833 B
C
28 lines
833 B
C
#ifndef CONFIG_H
|
|
#define CONFIG_H
|
|
#include "StatusCode.h"
|
|
#ifdef __cplusplus
|
|
extern "C"
|
|
{
|
|
#endif
|
|
enum CONFIG_CODE
|
|
{
|
|
CONFIG_CODE_PARAM_NOT_EXIST = STATUS_CODE_END,
|
|
CONFIG_CODE_END
|
|
};
|
|
typedef struct v_config VConfig;
|
|
typedef struct v_config
|
|
{
|
|
const StatusCode (*get_int)(VConfig *, const char *, int *);
|
|
const StatusCode (*set_int)(VConfig *, const char *, const int);
|
|
} VConfig;
|
|
const StatusCode ConfigInit(void);
|
|
const StatusCode ConfigUnInit(void);
|
|
VConfig *OpenConfigFile(const char *fileName);
|
|
void CloseConfigFile(VConfig *cfg);
|
|
const StatusCode ConfigGetInt(VConfig *cfg, const char *name, int *value);
|
|
const StatusCode ConfigSetInt(VConfig *cfg, const char *name, const int value);
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif |