OCT 1. 增加SQLite3配置项读取接口

This commit is contained in:
huangxin 2022-11-29 14:32:13 +08:00
parent 0af552c650
commit eb237f5dc5
3 changed files with 16 additions and 2 deletions

View File

@ -3,11 +3,11 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.10 FATAL_ERROR)
PROJECT(vCPE_project)
OPTION(VCPE_AGENT "Enable vCPE agent test application" OFF)
OPTION(USED_LWIP "PPPoE for vCPE" OFF)
OPTION(USED_LWIP "PPPoE of LWIP support for vCPE" OFF)
OPTION(USED_OPENDHCPD "DHCP server for vCPE" ON)
OPTION(USED_OPENDHCPDDNS "DHCP And DNS server for vCPE" OFF)
#
OPTION(USED_REDIS "Add redis database support for vCPE" OFF)
OPTION(USED_MYSQL "Add mysql database support for vCPE" OFF)
OPTION(USED_SQLITE "Add sqlite3 database support for vCPE" ON)

View File

@ -99,6 +99,16 @@ unsigned int cfg_get_sensor_refresh_period() {
return cfg_get_integral_value(CFG_SENSOR_REFRESH);
}
#ifdef USED_SQLITE
const char *cfg_get_sqlite_db_name() {
return cfg_get_string_value(CFG_DB_SQLITE_DB_NAME);
}
const char *cfg_get_sqlite_passwd() {
return cfg_get_string_value(CFG_DB_SQLITE_PASSWD);
}
#endif
#ifdef USED_REDIS
const char *cfg_get_redis_server() {
return cfg_get_string_value(CFG_DB_REDIS_SERVER);

View File

@ -103,6 +103,10 @@ const char *cfg_get_mysql_user();
const char *cfg_get_mysql_passwd();
const char *cfg_get_mysql_database();
#endif
#ifdef USED_SQLITE
const char *cfg_get_sqlite_db_name();
const char *cfg_get_sqlite_passwd();
#endif
int cfg_get_zero_mq_port();
const char *cfg_get_zero_mq_data_path();