diff --git a/.clang-format b/.clang-format index 01acca0..15d226d 100644 --- a/.clang-format +++ b/.clang-format @@ -57,7 +57,7 @@ BreakConstructorInitializersBeforeComma: false BreakConstructorInitializers: BeforeColon BreakAfterJavaFieldAnnotations: false BreakStringLiterals: true -ColumnLimit: 120 +ColumnLimit: 140 CommentPragmas: '^ IWYU pragma:' CompactNamespaces: true ConstructorInitializerAllOnOneLineOrOnePerLine: true diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fc2644..3e6514f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,14 @@ PROJECT(vCPE_project) OPTION(VCPE_AGENT "Enable vCPE agent test application" OFF) OPTION(USED_LWIP "PPPoE for vCPE" OFF) -OPTION(USED_OPENDHCPD "DHCP server 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) + SET(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig") SET(URI_HOME "${CMAKE_SOURCE_DIR}/libs") @@ -20,7 +27,6 @@ else () SET(GIT_VERSION ${GIT_TAG}) endif () - MESSAGE("Version: " ${GIT_VERSION}) if (USED_LWIP) @@ -35,9 +41,6 @@ if (USED_OPENDHCPDDNS) LIST(APPEND COMMON_DEFINE "-DOPENDHCPDDNS_ON") endif () -ADD_SUBDIRECTORY(srcs) -ADD_SUBDIRECTORY(srcs/libs) - if (VCPE_AGENT) MESSAGE("Select Option VCPE_AGENT") endif () @@ -46,6 +49,10 @@ if (USED_LWIP) MESSAGE("Select Option USED_LWIP") endif () +if (USED_SQLITE) + MESSAGE("Select Option USED_SQLITE") +endif () + if (USED_OPENDHCPD) MESSAGE("Select Option USED_OPENDHCPD") ADD_SUBDIRECTORY(srcs/open_dhcp) @@ -60,8 +67,6 @@ if (USED_LWIP OR VCPE_AGENT) ADD_SUBDIRECTORY(srcs/lwip) endif () -ADD_SUBDIRECTORY(srcs/httpserver) -ADD_SUBDIRECTORY(srcs/database) - - -MESSAGE("COMMON_DEFINE: " ${COMMON_DEFINE}) \ No newline at end of file +ADD_SUBDIRECTORY(srcs) +ADD_SUBDIRECTORY(srcs/libs) +ADD_SUBDIRECTORY(srcs/httpserver) \ No newline at end of file diff --git a/config/vcpe.cfg b/config/vcpe.cfg index 834c0cf..5be5fff 100644 --- a/config/vcpe.cfg +++ b/config/vcpe.cfg @@ -39,6 +39,9 @@ application: mysql_user = "root"; # mysql 用户名 mysql_passwd = "AES@5/BQyUIfVxgV9BZAz/D3Rg=="; # mysql 数据库密码 mysql_database = "test"; # mysql 数据库名称 + + sqlite_dbname = "vcpe.db"; # sqlite3 数据库文件名 + sqlite_passwd = "test123"; # sqlite3 数据库密码 }; # MQ 相关配置 diff --git a/srcs/database/CMakeLists.txt b/srcs/database/CMakeLists.txt deleted file mode 100644 index 078db26..0000000 --- a/srcs/database/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.10 FATAL_ERROR) - -PROJECT(SQLITE_project C) - -INCLUDE_DIRECTORIES(./include) - -FILE(GLOB_RECURSE SQLITE_HEADS ./include/*.h) - -AUX_SOURCE_DIRECTORY(. SQLITE_SRC) - - -ADD_DEFINITIONS(-DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1) -ADD_DEFINITIONS(-D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1) -ADD_DEFINITIONS(-DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT) -ADD_DEFINITIONS(-DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT) -ADD_DEFINITIONS( -DSQLITE_HAVE_ZLIB=1 -DSQLITE_TEMP_STORE=2) - -ADD_LIBRARY(SQLITE_project STATIC ${SQLITE_SRC} ${SQLITE_HEADS}) -TARGET_LINK_LIBRARIES(SQLITE_project -lm -ldl -lz -lcrypto -lpthread) \ No newline at end of file diff --git a/srcs/libs/CMakeLists.txt b/srcs/libs/CMakeLists.txt index 2ed13b6..a900f99 100644 --- a/srcs/libs/CMakeLists.txt +++ b/srcs/libs/CMakeLists.txt @@ -14,7 +14,6 @@ AUX_SOURCE_DIRECTORY(json C_SRC) AUX_SOURCE_DIRECTORY(args C_SRC) AUX_SOURCE_DIRECTORY(init C_SRC) AUX_SOURCE_DIRECTORY(misc C_SRC) -AUX_SOURCE_DIRECTORY(../database C_SRC) AUX_SOURCE_DIRECTORY(banner C_SRC) AUX_SOURCE_DIRECTORY(configure C_SRC) AUX_SOURCE_DIRECTORY(network C_SRC) @@ -23,10 +22,30 @@ AUX_SOURCE_DIRECTORY(mq C_SRC) AUX_SOURCE_DIRECTORY(cmdline C_SRC) AUX_SOURCE_DIRECTORY(crypto C_SRC) AUX_SOURCE_DIRECTORY(hardware C_SRC) +AUX_SOURCE_DIRECTORY(database/sqlite3 C_SRC) + +if (USED_REDIS) + ADD_DEFINITIONS(-DUSED_REDIS) +endif () + +if (USED_SQLITE) + ADD_DEFINITIONS(-DUSED_SQLITE) +endif () + +if (USED_MYSQL) + ADD_DEFINITIONS(-DUSED_MYSQL) +endif () SET(CMAKE_C_STANDARD 99) SET_SOURCE_FILES_PROPERTIES(misc/zvector.c PROPERTIES COMPILE_FLAGS "-Wall -Wextra -flto") +SET_SOURCE_FILES_PROPERTIES(database/sqlite3/sqlite3.c PROPERTIES + COMPILE_FLAGS "-DSQLITE_HAS_CODEC \ +-DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 \ +-D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 \ +-DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \ +-DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \ +-DSQLITE_HAVE_ZLIB=1 -DSQLITE_TEMP_STORE=2") ADD_DEFINITIONS(-DBUILD_VERSION="${GIT_VERSION}" ${COMMON_DEFINE}) diff --git a/srcs/libs/configure/config.c b/srcs/libs/configure/config.c index af5b4c6..ec1d7e7 100644 --- a/srcs/libs/configure/config.c +++ b/srcs/libs/configure/config.c @@ -15,61 +15,20 @@ #include "crypto.h" #include "hardware.h" +typedef struct { + CONFIG_ITEM_ID cfgId; + const char *cfgPath; + CONFIG_VALUE_TYPE valType; + const char *defValue; + const char *readme; + const char *pStrId; +} CFG_ITEM, *PCFG_ITEM; + #define CFG_INT_VALUE(p) (p->value.longValue) #define CFG_BOOL_VALUE(p) (p->value.longValue == FALSE ? FALSE : TRUE) #define CFG_FLOAT_VALUE(p) (p->value.floatValue) #define CFG_STRING_VALUE(p) (p->value.strValue) -#define ADD_CFG_ITEM(id, key, type, defVal, desc) add_new_cfg_item(id, key, type, defVal, #id, desc) - -// clang-format off -#define ADD_DEFAULT_CONFIGURATION_ITEMS() \ -do { \ - ADD_CFG_ITEM(CFG_DIRECTORY, "application.system.config_file_path", VALUE_TYPE_STRING, ".", "Configuration files location path"); \ - ADD_CFG_ITEM(CFG_CURL_CA_PATH, "application.system.ssl_ca_file_path", VALUE_TYPE_STRING, "~/.ssh/ca.crt", "Libcurl access HTTPS CA File"); \ - ADD_CFG_ITEM(CFG_BANNER_SHOW, "application.system.show_banner", VALUE_TYPE_BOOL, "1", "Enable/Disable show banner"); \ - ADD_CFG_ITEM(CFG_HARDWARE_WATCH, "application.system.system_info_watch", VALUE_TYPE_BOOL, "1", "Monitor cpu, memory, disk, fan, temperature ..."); \ - ADD_CFG_ITEM(CFG_HARDWARE_REFRESH, "application.system.system_info_refresh", VALUE_TYPE_INTEGRAL, "10", "Monitor hardware information upgrade frequency"); \ - /* 系统监控设备相配置 */ \ - ADD_CFG_ITEM(CFG_WATCH_CPU, "application.watch_params.cpu", VALUE_TYPE_BOOL, "1", "Monitor cpu information"); \ - ADD_CFG_ITEM(CFG_WATCH_MEMORY, "application.watch_params.memory", VALUE_TYPE_BOOL, "1", "Monitor memory information"); \ - ADD_CFG_ITEM(CFG_WATCH_DISK, "application.watch_params.disk", VALUE_TYPE_BOOL, "1", "Monitor disk partition information"); \ - ADD_CFG_ITEM(CFG_WATCH_SENSOR, "application.watch_params.sensor", VALUE_TYPE_BOOL, "1", "Sensor information refresh frequency"); \ - /* 系统监控设备刷频率 */ \ - ADD_CFG_ITEM(CFG_CPU_REFRESH, "application.watch_params.cpu_refresh", VALUE_TYPE_INTEGRAL, "10", "CPU information refresh frequency"); \ - ADD_CFG_ITEM(CFG_MEM_REFRESH, "application.watch_params.mem_refresh", VALUE_TYPE_INTEGRAL, "10", "Memory information refresh frequency"); \ - ADD_CFG_ITEM(CFG_DISK_REFRESH, "application.watch_params.disk_refresh", VALUE_TYPE_INTEGRAL, "10", "Disk information refresh frequency"); \ - ADD_CFG_ITEM(CFG_SENSOR_REFRESH, "application.watch_params.sensor_refresh", VALUE_TYPE_INTEGRAL, "10", "Sensor information refresh frequency"); \ - /* 数据库相配置 */ \ - /* Redis配置 */ \ - ADD_CFG_ITEM(CFG_DB_REDIS_SERVER, "application.database.redis_server", VALUE_TYPE_STRING, "127.0.0.1", "Redis database server ip address"); \ - ADD_CFG_ITEM(CFG_DB_REDIS_PORT, "application.database.redis_port", VALUE_TYPE_INTEGRAL, "6379", "Redis database server port"); \ - ADD_CFG_ITEM(CFG_DB_REDIS_PASSWD, "application.database.redis_passwd", VALUE_TYPE_STRING, "", "Redis database server password"); \ - /* MySQL配置 */ \ - ADD_CFG_ITEM(CFG_DB_MYSQL_SERVER, "application.database.mysql_server", VALUE_TYPE_STRING, "127.0.0.1", "MySQL database server ip address"); \ - ADD_CFG_ITEM(CFG_DB_MYSQL_PORT, "application.database.mysql_port", VALUE_TYPE_INTEGRAL, "3306", "MySQL database server port"); \ - ADD_CFG_ITEM(CFG_DB_MYSQL_USER, "application.database.mysql_user", VALUE_TYPE_STRING, "", "MySQL database user name"); \ - ADD_CFG_ITEM(CFG_DB_MYSQL_PASSWD, "application.database.mysql_passwd", VALUE_TYPE_STRING, "", "MySQL database server password"); \ - ADD_CFG_ITEM(CFG_DB_MYSQL_DB_NAME, "application.database.mysql_database", VALUE_TYPE_STRING, ".main", "MySQL database used"); \ - /* 消息队列相配置 */ \ - /* ZeroMq配置 */ \ - ADD_CFG_ITEM(CFG_MQ_SVR_PORT, "application.zero_mq.svr_port", VALUE_TYPE_INTEGRAL, "6278", "ZeroMQ server port"); \ - ADD_CFG_ITEM(CFG_MQ_DATA_PATH, "application.zero_mq.agent_addr", VALUE_TYPE_STRING, "ipc:///tmp/msg_fifo0", "ZeroMQ Agent data path"); \ - /* vxLan 隧道配置 */ \ - ADD_CFG_ITEM(CFG_VXLAN_NIC_NAME, "application.vxlan_wan.nic", VALUE_TYPE_STRING, "", "Network card name to send data"); \ - ADD_CFG_ITEM(CFG_VXLAN_SUPPORT, "application.vxlan_wan.enable", VALUE_TYPE_BOOL, "1", "Is support vxLan tune"); \ - ADD_CFG_ITEM(CFG_VXLAN_PEER_IP, "application.vxlan_wan.peer_ip", VALUE_TYPE_STRING, "", "vxLan peer ip address"); \ - ADD_CFG_ITEM(CFG_VXLAN_PEER_MAC, "application.vxlan_wan.peer_mac", VALUE_TYPE_STRING, "", "vxLan peer mac address"); \ - ADD_CFG_ITEM(CFG_VXLAN_PKG_FILTER, "application.vxlan_wan.pkg_filter", VALUE_TYPE_STRING, "", "vxLan package filter"); \ - /*HTTP Server 配置*/ \ - ADD_CFG_ITEM(CFG_HTTP_SVR_ADDR, "application.http_svr.listen_addr", VALUE_TYPE_STRING, "0.0.0.0", "Network address to listen on"); \ - ADD_CFG_ITEM(CFG_HTTP_SVR_PORT, "application.http_svr.listen_port", VALUE_TYPE_INTEGRAL, "6789", "Network port to listen on"); \ - ADD_CFG_ITEM(CFG_HTTP_SVR_TCP_NODELAY, "application.http_svr.tcp_nodelay", VALUE_TYPE_BOOL, "1", "TCP delay switch"); \ - ADD_CFG_ITEM(CFG_DHCP_LISTEN_ON, "application.dhcp_server.listen_on", VALUE_TYPE_ARRAY_STR, "", "DHCP listen interface"); \ - ADD_CFG_ITEM(CFG_DHCP_REPLICATION_SVR, "application.dhcp_server.replication", VALUE_TYPE_ARRAY_STR, "", "DHCP replication server master and secondary"); \ - ADD_CFG_ITEM(CFG_DHCP_RANGE_SET, "application.dhcp_server.range_set", VALUE_TYPE_ARRAY_OBJ, "", "DHCP IP pool"); \ -} while (0)// clang-format on - typedef union { long long longValue; char *strValue; @@ -95,6 +54,64 @@ static const char *g_cfgFilePath; static const char *g_pCfgKey = NULL; PCONFIG_ITEM g_pConfigItem = NULL; +#define DEF_CFG_ITEM(id, key, type, defVal, desc) \ + { .cfgId = (id), .cfgPath = (key), .valType = (type), .defValue = (defVal), .readme = (desc), .pStrId = (#id) } + +static CFG_ITEM g_cfgItem[] = { + DEF_CFG_ITEM(CFG_DIRECTORY, "system.config_file_path", VAL_STR, ".", "Configuration files location path"), + DEF_CFG_ITEM(CFG_CURL_CA_PATH, "system.ssl_ca_file_path", VAL_STR, "~/.ssh/ca.crt", "Libcurl access HTTPS CA File"), + DEF_CFG_ITEM(CFG_BANNER_SHOW, "system.show_banner", VAL_BOOL, "1", "Enable/Disable show banner"), + DEF_CFG_ITEM(CFG_HARDWARE_WATCH, "system.system_info_watch", VAL_BOOL, "1", "Monitor cpu, memory, disk, fan, temperature ..."), + DEF_CFG_ITEM(CFG_HARDWARE_REFRESH, "system.system_info_refresh", VAL_INT, "10", "Monitor hardware information upgrade frequency"), + /* 系统监控设备相配置 */ + DEF_CFG_ITEM(CFG_WATCH_CPU, "watch_params.cpu", VAL_BOOL, "1", "Monitor cpu information"), + DEF_CFG_ITEM(CFG_WATCH_MEMORY, "watch_params.memory", VAL_BOOL, "1", "Monitor memory information"), + DEF_CFG_ITEM(CFG_WATCH_DISK, "watch_params.disk", VAL_BOOL, "1", "Monitor disk partition information"), + DEF_CFG_ITEM(CFG_WATCH_SENSOR, "watch_params.sensor", VAL_BOOL, "1", "Sensor information refresh frequency"), + /* 系统监控设备刷频率 */ + DEF_CFG_ITEM(CFG_CPU_REFRESH, "watch_params.cpu_refresh", VAL_INT, "10", "CPU information refresh frequency"), + DEF_CFG_ITEM(CFG_MEM_REFRESH, "watch_params.mem_refresh", VAL_INT, "10", "Memory information refresh frequency"), + DEF_CFG_ITEM(CFG_DISK_REFRESH, "watch_params.disk_refresh", VAL_INT, "10", "Disk information refresh frequency"), + DEF_CFG_ITEM(CFG_SENSOR_REFRESH, "watch_params.sensor_refresh", VAL_INT, "10", "Sensor information refresh frequency"), + /* 数据库相配置 */ + /* Redis配置 */ +#ifdef USED_REDIS + DEF_CFG_ITEM(CFG_DB_REDIS_SERVER, "database.redis_server", VAL_STR, "127.0.0.1", "Redis database server ip address"), + DEF_CFG_ITEM(CFG_DB_REDIS_PORT, "database.redis_port", VAL_INT, "6379", "Redis database server port"), + DEF_CFG_ITEM(CFG_DB_REDIS_PASSWD, "database.redis_passwd", VAL_STR, "", "Redis database server password"), +#endif +/* MySQL配置 */ +#ifdef USED_MYSQL + DEF_CFG_ITEM(CFG_DB_MYSQL_SERVER, "database.mysql_server", VAL_STR, "127.0.0.1", "MySQL database server ip address"), + DEF_CFG_ITEM(CFG_DB_MYSQL_PORT, "database.mysql_port", VAL_INT, "3306", "MySQL database server port"), + DEF_CFG_ITEM(CFG_DB_MYSQL_USER, "database.mysql_user", VAL_STR, "", "MySQL database user name"), + DEF_CFG_ITEM(CFG_DB_MYSQL_PASSWD, "database.mysql_passwd", VAL_STR, "", "MySQL database server password"), + DEF_CFG_ITEM(CFG_DB_MYSQL_DB_NAME, "database.mysql_database", VAL_STR, ".main", "MySQL database used"), +#endif + /* SQLite3配置 */ +#ifdef USED_SQLITE + DEF_CFG_ITEM(CFG_DB_SQLITE_DB_NAME, "database.sqlite_dbname", VAL_STR, "", "SQLite3 database file name"), + DEF_CFG_ITEM(CFG_DB_SQLITE_PASSWD, "database.sqlite_passwd", VAL_STR, ".main", "SQLite3 database password"), +#endif + /* 消息队列相配置 */ + /* ZeroMq配置 */ + DEF_CFG_ITEM(CFG_MQ_SVR_PORT, "zero_mq.svr_port", VAL_INT, "6278", "ZeroMQ server port"), + DEF_CFG_ITEM(CFG_MQ_DATA_PATH, "zero_mq.agent_addr", VAL_STR, "ipc:///tmp/msg_fifo0", "ZeroMQ Agent data path"), + /* vxLan 隧道配置 */ + DEF_CFG_ITEM(CFG_VXLAN_NIC_NAME, "vxlan_wan.nic", VAL_STR, "", "Network card name to send data"), + DEF_CFG_ITEM(CFG_VXLAN_SUPPORT, "vxlan_wan.enable", VAL_BOOL, "1", "Is support vxLan tune"), + DEF_CFG_ITEM(CFG_VXLAN_PEER_IP, "vxlan_wan.peer_ip", VAL_STR, "", "vxLan peer ip address"), + DEF_CFG_ITEM(CFG_VXLAN_PEER_MAC, "vxlan_wan.peer_mac", VAL_STR, "", "vxLan peer mac address"), + DEF_CFG_ITEM(CFG_VXLAN_PKG_FILTER, "vxlan_wan.pkg_filter", VAL_STR, "", "vxLan package filter"), + /*HTTP Server 配置*/ + DEF_CFG_ITEM(CFG_HTTP_SVR_ADDR, "http_svr.listen_addr", VAL_STR, "0.0.0.0", "Network address to listen on"), + DEF_CFG_ITEM(CFG_HTTP_SVR_PORT, "http_svr.listen_port", VAL_INT, "6789", "Network port to listen on"), + DEF_CFG_ITEM(CFG_HTTP_SVR_TCP_NODELAY, "http_svr.tcp_nodelay", VAL_BOOL, "1", "TCP delay switch"), + DEF_CFG_ITEM(CFG_DHCP_LISTEN_ON, "dhcp_server.listen_on", VAL_ARRAY_STR, "", "DHCP listen interface"), + DEF_CFG_ITEM(CFG_DHCP_REPLICATION_SVR, "dhcp_server.replication", VAL_ARRAY_STR, "", "DHCP replication server configure"), + DEF_CFG_ITEM(CFG_DHCP_RANGE_SET, "dhcp_server.range_set", VAL_ARRAY_OBJ, "", "DHCP IP pool"), +}; + static int cfg_is_upgrade(PCONFIG_ITEM pItem) { if (pItem->isChanged) { @@ -128,8 +145,7 @@ static const char *load_string_value(const char *pKeyName) { return NULL; } - if (symmetric_decrypto(AES128_ECB_PKCS7PADDING_SHA1PRNG, pBuf, bufSize, &buf, &outSize, pKey) - != ERR_SUCCESS) { + if (symmetric_decrypto(AES128_ECB_PKCS7PADDING_SHA1PRNG, pBuf, bufSize, &buf, &outSize, pKey) != ERR_SUCCESS) { free((void *)pKey); free(pBuf); return NULL; @@ -207,9 +223,8 @@ static int cmp_dhcp_obj(const void *a, const void *b) { POBJ_DHCP_RNG pV1 = (POBJ_DHCP_RNG)a; POBJ_DHCP_RNG pV2 = (POBJ_DHCP_RNG)b; - if (strcmp(pV1->rangAddr, pV2->rangAddr) == 0 && strcmp(pV1->subnet, pV2->subnet) == 0 - && strcmp(pV1->dnsSvr, pV2->dnsSvr) == 0 && strcmp(pV1->gateway, pV2->gateway) == 0 - && pV1->lease == pV2->lease) { + if (strcmp(pV1->rangAddr, pV2->rangAddr) == 0 && strcmp(pV1->subnet, pV2->subnet) == 0 && strcmp(pV1->dnsSvr, pV2->dnsSvr) == 0 + && strcmp(pV1->gateway, pV2->gateway) == 0 && pV1->lease == pV2->lease) { return 0; } @@ -271,13 +286,13 @@ static int load_array_obj(const char *pKeyName, PCONFIG_ITEM pValue) { static int setConfigItemValue(PCONFIG_ITEM pItem, const char *pValue) { errno = 0; - if (pItem->valType == VALUE_TYPE_STRING) { + if (pItem->valType == VAL_STR) { if (pItem->value.strValue != NULL) { free(pItem->value.strValue); } pItem->value.strValue = strdup(pValue); - } else if (pItem->valType == VALUE_TYPE_INTEGRAL || pItem->valType == VALUE_TYPE_BOOL) { + } else if (pItem->valType == VAL_INT || pItem->valType == VAL_BOOL) { char *pOver; long long val = strtoll(pValue, &pOver, 10); @@ -286,7 +301,7 @@ static int setConfigItemValue(PCONFIG_ITEM pItem, const char *pValue) { } pItem->value.longValue = val; - } else if (pItem->valType == VALUE_TYPE_FLOAT) { + } else if (pItem->valType == VAL_FLOAT) { char *pOver; long double val = strtold(pValue, &pOver); @@ -295,9 +310,9 @@ static int setConfigItemValue(PCONFIG_ITEM pItem, const char *pValue) { } pItem->value.floatValue = val; - } else if (pItem->valType == VALUE_TYPE_ARRAY_STR) { + } else if (pItem->valType == VAL_ARRAY_STR) { pItem->value.array = vect_create(128, 512, ZV_SEC_WIPE); - } else if (pItem->valType == VALUE_TYPE_ARRAY_OBJ) { + } else if (pItem->valType == VAL_ARRAY_OBJ) { pItem->value.array = vect_create(128, sizeof(OBJ_DHCP_RNG), ZV_SEC_WIPE); } else { return -ERR_UN_SUPPORT; @@ -306,8 +321,8 @@ static int setConfigItemValue(PCONFIG_ITEM pItem, const char *pValue) { return ERR_SUCCESS; } -static int add_new_cfg_item(CONFIG_ITEM_ID id, const char *pKey, CONFIG_VALUE_TYPE valType, const char *pDefVal, - const char *pStrId, const char *pDesc) { +static int add_new_cfg_item(CONFIG_ITEM_ID id, const char *pKey, CONFIG_VALUE_TYPE valType, const char *pDefVal, const char *pStrId, + const char *pDesc) { PCONFIG_ITEM pItem; int ret; @@ -361,10 +376,7 @@ static void refreshCfgFileCb() { int cfgUpgrade = FALSE; if (!config_read_file(&g_cfgContent, g_cfgFilePath)) { - dzlog_error("%s:%d - %s\n", - config_error_file(&g_cfgContent), - config_error_line(&g_cfgContent), - config_error_text(&g_cfgContent)); + dzlog_error("%s:%d - %s\n", config_error_file(&g_cfgContent), config_error_line(&g_cfgContent), config_error_text(&g_cfgContent)); return; } @@ -372,10 +384,12 @@ static void refreshCfgFileCb() { char *pStr; long long iVal; double fVal; + sds realKey = sdsnew("application."); + realKey = sdscat(realKey, pItem->pcfgKey); switch (pItem->valType) { - case VALUE_TYPE_STRING: - pStr = (char *)load_string_value(pItem->pcfgKey); + case VAL_STR: + pStr = (char *)load_string_value(realKey); if (pStr) { if (strcmp(pItem->value.strValue, pStr) != 0) { if (pItem->value.strValue != NULL) { @@ -389,8 +403,8 @@ static void refreshCfgFileCb() { free(pStr); } break; - case VALUE_TYPE_BOOL: - iVal = load_boolean_value(pItem->pcfgKey); + case VAL_BOOL: + iVal = load_boolean_value(realKey); if (iVal != DEFAULT_INTEGRAL_ERR_VALUE) { if (pItem->value.longValue != iVal) { @@ -400,8 +414,8 @@ static void refreshCfgFileCb() { } break; - case VALUE_TYPE_INTEGRAL: - iVal = load_integral_value(pItem->pcfgKey); + case VAL_INT: + iVal = load_integral_value(realKey); if (iVal != DEFAULT_INTEGRAL_ERR_VALUE) { if (pItem->value.longValue != iVal) { @@ -411,8 +425,8 @@ static void refreshCfgFileCb() { } break; - case VALUE_TYPE_FLOAT: - fVal = load_float_value(pItem->pcfgKey); + case VAL_FLOAT: + fVal = load_float_value(realKey); if (fVal != DEFAULT_INTEGRAL_ERR_VALUE) { if (pItem->value.floatValue != fVal) { @@ -422,12 +436,12 @@ static void refreshCfgFileCb() { } break; - case VALUE_TYPE_ARRAY_STR: - load_array_str(pItem->pcfgKey, pItem); + case VAL_ARRAY_STR: + load_array_str(realKey, pItem); break; - case VALUE_TYPE_ARRAY_OBJ: - load_array_obj(pItem->pcfgKey, pItem); + case VAL_ARRAY_OBJ: + load_array_obj(realKey, pItem); break; default: @@ -437,6 +451,8 @@ static void refreshCfgFileCb() { if (pItem->isChanged) { cfgUpgrade = TRUE; } + + sdsfree(realKey); } if (cfgUpgrade) { @@ -472,27 +488,17 @@ const char *config_item_dump_fmt(const char *titleMessage) { memset(tmp2, 0, 256); sprintf(tmp2, "%s%s", cfg_is_upgrade(pItem) ? "*" : " ", pItem->pStrId); switch (pItem->valType) { - case VALUE_TYPE_BOOL: - s = sdscatprintf(s, - "|%4d | %-25s | %-45s | %-64s |\n", - pItem->cfgId, - tmp2, - pItem->pcfgKey, - CFG_BOOL_VALUE(pItem) ? "True" : "False"); - break; - case VALUE_TYPE_INTEGRAL: + case VAL_BOOL: s = sdscatprintf( - s, "|%4d | %-25s | %-45s | %-64lld |\n", pItem->cfgId, tmp2, pItem->pcfgKey, CFG_INT_VALUE(pItem)); + s, "|%4d | %-25s | %-45s | %-64s |\n", pItem->cfgId, tmp2, pItem->pcfgKey, CFG_BOOL_VALUE(pItem) ? "True" : "False"); break; - case VALUE_TYPE_FLOAT: - s = sdscatprintf(s, - "|%4d | %-25s | %-45s | %-64Lf |\n", - pItem->cfgId, - tmp2, - pItem->pcfgKey, - CFG_FLOAT_VALUE(pItem)); + case VAL_INT: + s = sdscatprintf(s, "|%4d | %-25s | %-45s | %-64lld |\n", pItem->cfgId, tmp2, pItem->pcfgKey, CFG_INT_VALUE(pItem)); break; - case VALUE_TYPE_STRING: + case VAL_FLOAT: + s = sdscatprintf(s, "|%4d | %-25s | %-45s | %-64Lf |\n", pItem->cfgId, tmp2, pItem->pcfgKey, CFG_FLOAT_VALUE(pItem)); + break; + case VAL_STR: tmp = sdsempty(); tmp = sdscatprintf(tmp, "\"%s\"", CFG_STRING_VALUE(pItem)); if (sdslen(tmp) > 63) { @@ -502,7 +508,7 @@ const char *config_item_dump_fmt(const char *titleMessage) { s = sdscatprintf(s, "|%4d | %-25s | %-45s | %-64s |\n", pItem->cfgId, tmp2, pItem->pcfgKey, tmp); sdsfree(tmp); break; - case VALUE_TYPE_ARRAY_STR: + case VAL_ARRAY_STR: tmp = sdsempty(); tmp = sdscat(tmp, "["); for (i = 0; i < vect_size(pItem->value.array); i++) { @@ -521,7 +527,7 @@ const char *config_item_dump_fmt(const char *titleMessage) { s = sdscatprintf(s, "|%4d | %-25s | %-45s | %-64s |\n", pItem->cfgId, tmp2, pItem->pcfgKey, tmp); sdsfree(tmp); break; - case VALUE_TYPE_ARRAY_OBJ: + case VAL_ARRAY_OBJ: for (i = 0; i < vect_size(pItem->value.array); i++) { POBJ_DHCP_RNG p = (POBJ_DHCP_RNG)vect_get_at(pItem->value.array, i); if (!p) { @@ -579,28 +585,28 @@ void config_item_dump(const char *titleMessage) { dzlog_info("================== %s ===================\n", titleMessage == NULL ? "" : titleMessage); HASH_ITER(hh, g_pConfigItem, pItem, pTmp) { switch (pItem->valType) { - case VALUE_TYPE_BOOL: + case VAL_BOOL: dzlog_info("%s%-25s: [%-45s] = %s\n", cfg_is_upgrade(pItem) ? "*" : " ", pItem->pStrId, pItem->pcfgKey, CFG_BOOL_VALUE(pItem) ? "True" : "False"); break; - case VALUE_TYPE_INTEGRAL: + case VAL_INT: dzlog_info("%s%-25s: [%-45s] = %lld\n", cfg_is_upgrade(pItem) ? "*" : " ", pItem->pStrId, pItem->pcfgKey, CFG_INT_VALUE(pItem)); break; - case VALUE_TYPE_FLOAT: + case VAL_FLOAT: dzlog_info("%s%-25s: [%-45s] = %Lf\n", cfg_is_upgrade(pItem) ? "*" : " ", pItem->pStrId, pItem->pcfgKey, CFG_FLOAT_VALUE(pItem)); break; - case VALUE_TYPE_STRING: + case VAL_STR: dzlog_info("%s%-25s: [%-45s] = \"%s\"\n", cfg_is_upgrade(pItem) ? "*" : " ", pItem->pStrId, @@ -665,6 +671,8 @@ const vector cfg_get_vector(CONFIG_ITEM_ID id) { } int init_config_system(const char *pCfgFile, const char *pKey) { + int i; + if (!file_exists(pCfgFile)) { dzlog_error("Configuration file [%s] not exists\n", pCfgFile); return -ERR_FILE_NOT_EXISTS; @@ -676,7 +684,14 @@ int init_config_system(const char *pCfgFile, const char *pKey) { config_init(&g_cfgContent); - ADD_DEFAULT_CONFIGURATION_ITEMS(); + for (i = 0; i < ARRAY_SIZE(g_cfgItem); i++) { + add_new_cfg_item(g_cfgItem[i].cfgId, + g_cfgItem[i].cfgPath, + g_cfgItem[i].valType, + g_cfgItem[i].defValue, + g_cfgItem[i].pStrId, + g_cfgItem[i].readme); + } // clang-format on refreshCfgFileCb(); @@ -688,8 +703,8 @@ void uninit_config_system() { PCONFIG_ITEM pItem, pTmp; HASH_ITER(hh, g_pConfigItem, pItem, pTmp) { switch (pItem->valType) { - case VALUE_TYPE_ARRAY_STR: - case VALUE_TYPE_ARRAY_OBJ: + case VAL_ARRAY_STR: + case VAL_ARRAY_OBJ: vect_destroy(pItem->value.array); break; default: diff --git a/srcs/libs/configure/config_help.c b/srcs/libs/configure/config_help.c index 9a100db..083c462 100644 --- a/srcs/libs/configure/config_help.c +++ b/srcs/libs/configure/config_help.c @@ -99,6 +99,7 @@ unsigned int cfg_get_sensor_refresh_period() { return cfg_get_integral_value(CFG_SENSOR_REFRESH); } +#ifdef USED_REDIS const char *cfg_get_redis_server() { return cfg_get_string_value(CFG_DB_REDIS_SERVER); } @@ -110,7 +111,9 @@ int cfg_get_redis_port() { const char *cfg_get_redis_passwd() { return cfg_get_string_value(CFG_DB_REDIS_PASSWD); } +#endif +#ifdef USED_MYSQL const char *cfg_get_mysql_server() { return cfg_get_string_value(CFG_DB_MYSQL_SERVER); } @@ -130,6 +133,7 @@ const char *cfg_get_mysql_passwd() { const char *cfg_get_mysql_database() { return cfg_get_string_value(CFG_DB_MYSQL_DB_NAME); } +#endif int cfg_get_zero_mq_port() { return (unsigned short)cfg_get_integral_value(CFG_MQ_SVR_PORT); diff --git a/srcs/database/config.h b/srcs/libs/database/sqlite3/config.h similarity index 100% rename from srcs/database/config.h rename to srcs/libs/database/sqlite3/config.h diff --git a/srcs/database/sqlite3.c b/srcs/libs/database/sqlite3/sqlite3.c similarity index 100% rename from srcs/database/sqlite3.c rename to srcs/libs/database/sqlite3/sqlite3.c diff --git a/srcs/libs/include/config.h b/srcs/libs/include/config.h index b8acc56..01e480f 100644 --- a/srcs/libs/include/config.h +++ b/srcs/libs/include/config.h @@ -21,49 +21,57 @@ typedef struct { } OBJ_DHCP_RNG, *POBJ_DHCP_RNG; typedef enum { - VALUE_TYPE_INTEGRAL = 0, - VALUE_TYPE_FLOAT = 1, - VALUE_TYPE_STRING = 2, - VALUE_TYPE_BOOL = 3, - VALUE_TYPE_ARRAY_STR = 4, - VALUE_TYPE_ARRAY_OBJ = 5, + VAL_INT = 0, + VAL_FLOAT = 1, + VAL_STR = 2, + VAL_BOOL = 3, + VAL_ARRAY_STR = 4, + VAL_ARRAY_OBJ = 5, } CONFIG_VALUE_TYPE; typedef enum { - CFG_DIRECTORY = 0, - CFG_CURL_CA_PATH = 1, - CFG_BANNER_SHOW = 2, - CFG_HARDWARE_WATCH = 3, - CFG_HARDWARE_REFRESH = 4, - CFG_WATCH_CPU = 5, - CFG_WATCH_MEMORY = 6, - CFG_WATCH_DISK = 7, - CFG_WATCH_SENSOR = 8, - CFG_CPU_REFRESH = 9, - CFG_MEM_REFRESH = 10, - CFG_DISK_REFRESH = 11, - CFG_SENSOR_REFRESH = 12, - CFG_DB_REDIS_SERVER = 13, - CFG_DB_REDIS_PORT = 14, - CFG_DB_REDIS_PASSWD = 15, - CFG_DB_MYSQL_SERVER = 16, - CFG_DB_MYSQL_PORT = 17, - CFG_DB_MYSQL_USER = 18, - CFG_DB_MYSQL_PASSWD = 19, - CFG_DB_MYSQL_DB_NAME = 20, - CFG_MQ_SVR_PORT = 21, - CFG_MQ_DATA_PATH = 22, - CFG_VXLAN_NIC_NAME = 23, - CFG_VXLAN_SUPPORT = 24, - CFG_VXLAN_PEER_IP = 25, - CFG_VXLAN_PEER_MAC = 26, - CFG_VXLAN_PKG_FILTER = 27, - CFG_HTTP_SVR_ADDR = 29, - CFG_HTTP_SVR_PORT = 30, - CFG_HTTP_SVR_TCP_NODELAY = 31, - CFG_DHCP_LISTEN_ON = 32, - CFG_DHCP_REPLICATION_SVR = 33, - CFG_DHCP_RANGE_SET = 34, + CFG_DIRECTORY, + CFG_CURL_CA_PATH, + CFG_BANNER_SHOW, + CFG_HARDWARE_WATCH, + CFG_HARDWARE_REFRESH, + CFG_WATCH_CPU, + CFG_WATCH_MEMORY, + CFG_WATCH_DISK, + CFG_WATCH_SENSOR, + CFG_CPU_REFRESH, + CFG_MEM_REFRESH, + CFG_DISK_REFRESH, + CFG_SENSOR_REFRESH, +#ifdef USED_REDIS + CFG_DB_REDIS_SERVER, + CFG_DB_REDIS_PORT, + CFG_DB_REDIS_PASSWD, +#endif +#ifdef USED_MYSQL + CFG_DB_MYSQL_SERVER, + CFG_DB_MYSQL_PORT, + CFG_DB_MYSQL_USER, + CFG_DB_MYSQL_PASSWD, + CFG_DB_MYSQL_DB_NAME, +#endif +#ifdef USED_SQLITE + CFG_DB_SQLITE_DB_NAME, + CFG_DB_SQLITE_PASSWD, +#endif + CFG_MQ_SVR_PORT, + CFG_MQ_DATA_PATH, + CFG_VXLAN_NIC_NAME, + CFG_VXLAN_SUPPORT, + CFG_VXLAN_PEER_IP, + CFG_VXLAN_PEER_MAC, + CFG_VXLAN_PKG_FILTER, + CFG_HTTP_SVR_ADDR, + CFG_HTTP_SVR_PORT, + CFG_HTTP_SVR_TCP_NODELAY, + CFG_DHCP_LISTEN_ON, + CFG_DHCP_REPLICATION_SVR, + CFG_DHCP_RANGE_SET, CONFIG_ITEM_ID_MAX } CONFIG_ITEM_ID; @@ -83,16 +91,20 @@ unsigned int cfg_get_cpu_refresh_period(); unsigned int cfg_get_mem_refresh_period(); unsigned int cfg_get_disk_refresh_period(); unsigned int cfg_get_sensor_refresh_period(); -const char *cfg_get_redis_server(); -int cfg_get_redis_port(); -const char *cfg_get_redis_passwd(); -const char *cfg_get_mysql_server(); -int cfg_get_mysql_port(); -const char *cfg_get_mysql_user(); -const char *cfg_get_mysql_passwd(); -const char *cfg_get_mysql_database(); -int cfg_get_zero_mq_port(); -const char *cfg_get_zero_mq_data_path(); +#ifdef USED_REDIS +const char *cfg_get_redis_server(); +int cfg_get_redis_port(); +const char *cfg_get_redis_passwd(); +#endif +#ifdef USED_MYSQL +const char *cfg_get_mysql_server(); +int cfg_get_mysql_port(); +const char *cfg_get_mysql_user(); +const char *cfg_get_mysql_passwd(); +const char *cfg_get_mysql_database(); +#endif +int cfg_get_zero_mq_port(); +const char *cfg_get_zero_mq_data_path(); const char *cfg_get_string_value(CONFIG_ITEM_ID id); const vector cfg_get_vector(CONFIG_ITEM_ID id); diff --git a/srcs/database/include/sqlite3.h b/srcs/libs/include/sqlite3/sqlite3.h similarity index 93% rename from srcs/database/include/sqlite3.h rename to srcs/libs/include/sqlite3/sqlite3.h index 4934b79..cf1af62 100644 --- a/srcs/database/include/sqlite3.h +++ b/srcs/libs/include/sqlite3/sqlite3.h @@ -257,9 +257,9 @@ SQLITE_API int sqlite3_threadsafe(void); /* ** CAPI3REF: Database Connection Handle -** KEYWORDS: {database connection} {database connections} +** KEYWORDS: {sqlitecipher connection} {sqlitecipher connections} ** -** Each open SQLite database is represented by a pointer to an instance of +** Each open SQLite sqlitecipher is represented by a pointer to an instance of ** the opaque structure named "sqlite3". It is useful to think of an sqlite3 ** pointer as an object. The [sqlite3_open()], [sqlite3_open16()], and ** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()] @@ -326,14 +326,14 @@ typedef sqlite_uint64 sqlite3_uint64; ** [prepared statements], [sqlite3_blob_close | close] all [BLOB handles], and ** [sqlite3_backup_finish | finish] all [sqlite3_backup] objects associated ** with the [sqlite3] object prior to attempting to close the object. -** ^If the database connection is associated with unfinalized prepared +** ^If the sqlitecipher connection is associated with unfinalized prepared ** statements, BLOB handlers, and/or unfinished sqlite3_backup objects then -** sqlite3_close() will leave the database connection open and return +** sqlite3_close() will leave the sqlitecipher connection open and return ** [SQLITE_BUSY]. ^If sqlite3_close_v2() is called with unfinalized prepared ** statements, unclosed BLOB handlers, and/or unfinished sqlite3_backups, -** it returns [SQLITE_OK] regardless, but instead of deallocating the database -** connection immediately, it marks the database connection as an unusable -** "zombie" and makes arrangements to automatically deallocate the database +** it returns [SQLITE_OK] regardless, but instead of deallocating the sqlitecipher +** connection immediately, it marks the sqlitecipher connection as an unusable +** "zombie" and makes arrangements to automatically deallocate the sqlitecipher ** connection after all prepared statements are finalized, all BLOB handles ** are closed, and all backups have finished. The sqlite3_close_v2() interface ** is intended for use with host languages that are garbage collected, and @@ -371,7 +371,7 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**); ** ** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded, ** semicolon-separate SQL statements passed into its 2nd argument, -** in the context of the [database connection] passed in as its 1st +** in the context of the [sqlitecipher connection] passed in as its 1st ** argument. ^If the callback function of the 3rd argument to ** sqlite3_exec() is not NULL, then it is invoked for each result row ** coming out of the evaluated SQL statements. ^The 4th argument to @@ -408,22 +408,22 @@ typedef int (*sqlite3_callback)(void*,int,char**, char**); ** ** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer ** to an empty string, or a pointer that contains only whitespace and/or -** SQL comments, then no SQL statements are evaluated and the database +** SQL comments, then no SQL statements are evaluated and the sqlitecipher ** is not changed. ** ** Restrictions: ** ** */ SQLITE_API int sqlite3_exec( - sqlite3*, /* An open database */ + sqlite3*, /* An open sqlitecipher */ const char *sql, /* SQL to be evaluated */ int (*callback)(void*,int,char**,char**), /* Callback function */ void *, /* 1st argument to callback */ @@ -447,19 +447,19 @@ SQLITE_API int sqlite3_exec( #define SQLITE_INTERNAL 2 /* Internal logic error in SQLite */ #define SQLITE_PERM 3 /* Access permission denied */ #define SQLITE_ABORT 4 /* Callback routine requested an abort */ -#define SQLITE_BUSY 5 /* The database file is locked */ -#define SQLITE_LOCKED 6 /* A table in the database is locked */ +#define SQLITE_BUSY 5 /* The sqlitecipher file is locked */ +#define SQLITE_LOCKED 6 /* A table in the sqlitecipher is locked */ #define SQLITE_NOMEM 7 /* A malloc() failed */ -#define SQLITE_READONLY 8 /* Attempt to write a readonly database */ +#define SQLITE_READONLY 8 /* Attempt to write a readonly sqlitecipher */ #define SQLITE_INTERRUPT 9 /* Operation terminated by sqlite3_interrupt()*/ #define SQLITE_IOERR 10 /* Some kind of disk I/O error occurred */ -#define SQLITE_CORRUPT 11 /* The database disk image is malformed */ +#define SQLITE_CORRUPT 11 /* The sqlitecipher disk image is malformed */ #define SQLITE_NOTFOUND 12 /* Unknown opcode in sqlite3_file_control() */ -#define SQLITE_FULL 13 /* Insertion failed because database is full */ -#define SQLITE_CANTOPEN 14 /* Unable to open the database file */ +#define SQLITE_FULL 13 /* Insertion failed because sqlitecipher is full */ +#define SQLITE_CANTOPEN 14 /* Unable to open the sqlitecipher file */ #define SQLITE_PROTOCOL 15 /* Database lock protocol error */ #define SQLITE_EMPTY 16 /* Internal use only */ -#define SQLITE_SCHEMA 17 /* The database schema changed */ +#define SQLITE_SCHEMA 17 /* The sqlitecipher schema changed */ #define SQLITE_TOOBIG 18 /* String or BLOB exceeds size limit */ #define SQLITE_CONSTRAINT 19 /* Abort due to constraint violation */ #define SQLITE_MISMATCH 20 /* Data type mismatch */ @@ -468,7 +468,7 @@ SQLITE_API int sqlite3_exec( #define SQLITE_AUTH 23 /* Authorization denied */ #define SQLITE_FORMAT 24 /* Not used */ #define SQLITE_RANGE 25 /* 2nd parameter to sqlite3_bind out of range */ -#define SQLITE_NOTADB 26 /* File opened that is not a database file */ +#define SQLITE_NOTADB 26 /* File opened that is not a sqlitecipher file */ #define SQLITE_NOTICE 27 /* Notifications from sqlite3_log() */ #define SQLITE_WARNING 28 /* Warnings from sqlite3_log() */ #define SQLITE_ROW 100 /* sqlite3_step() has another row ready */ @@ -487,7 +487,7 @@ SQLITE_API int sqlite3_exec( ** and later) include ** support for additional result codes that provide more detailed information ** about errors. These [extended result codes] are enabled or disabled -** on a per database connection basis using the +** on a per sqlitecipher connection basis using the ** [sqlite3_extended_result_codes()] API. Or, the extended code for ** the most recent error can be obtained using ** [sqlite3_extended_errcode()]. @@ -583,7 +583,7 @@ SQLITE_API int sqlite3_exec( ** Applications should not depend on the historical behavior. ** ** Note in particular that passing the SQLITE_OPEN_EXCLUSIVE flag into -** [sqlite3_open_v2()] does *not* cause the underlying database file +** [sqlite3_open_v2()] does *not* cause the underlying sqlitecipher file ** to be opened using O_EXCL. Passing SQLITE_OPEN_EXCLUSIVE into ** [sqlite3_open_v2()] has historically be a no-op and might become an ** error in future versions of SQLite. @@ -755,7 +755,7 @@ struct sqlite3_file { **
  • [SQLITE_LOCK_EXCLUSIVE]. ** ** xLock() increases the lock. xUnlock() decreases the lock. -** The xCheckReservedLock() method checks whether any database connection, +** The xCheckReservedLock() method checks whether any sqlitecipher connection, ** either in this process or in some other process, is holding a RESERVED, ** PENDING, or EXCLUSIVE lock on the file. It returns true ** if such a lock exists and false otherwise. @@ -816,7 +816,7 @@ struct sqlite3_file { ** in the unread portions of the buffer with zeros. A VFS that ** fails to zero-fill short reads might seem to work. However, ** failure to zero-fill short reads will eventually lead to -** database corruption. +** sqlitecipher corruption. */ typedef struct sqlite3_io_methods sqlite3_io_methods; struct sqlite3_io_methods { @@ -865,39 +865,39 @@ struct sqlite3_io_methods { ** **
  • [[SQLITE_FCNTL_SIZE_HINT]] ** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS -** layer a hint of how large the database file will grow to be during the +** layer a hint of how large the sqlitecipher file will grow to be during the ** current transaction. This hint is not guaranteed to be accurate but it -** is often close. The underlying VFS might choose to preallocate database -** file space based on this hint in order to help writes to the database +** is often close. The underlying VFS might choose to preallocate sqlitecipher +** file space based on this hint in order to help writes to the sqlitecipher ** file run faster. ** **
  • [[SQLITE_FCNTL_SIZE_LIMIT]] ** The [SQLITE_FCNTL_SIZE_LIMIT] opcode is used by in-memory VFS that ** implements [sqlite3_deserialize()] to set an upper bound on the size -** of the in-memory database. The argument is a pointer to a [sqlite3_int64]. +** of the in-memory sqlitecipher. The argument is a pointer to a [sqlite3_int64]. ** If the integer pointed to is negative, then it is filled in with the ** current limit. Otherwise the limit is set to the larger of the value -** of the integer pointed to and the current database size. The integer +** of the integer pointed to and the current sqlitecipher size. The integer ** pointed to is set to the new limit. ** **
  • [[SQLITE_FCNTL_CHUNK_SIZE]] ** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS -** extends and truncates the database file in chunks of a size specified +** extends and truncates the sqlitecipher file in chunks of a size specified ** by the user. The fourth argument to [sqlite3_file_control()] should ** point to an integer (type int) containing the new chunk-size to use -** for the nominated database. Allocating database file space in large +** for the nominated sqlitecipher. Allocating sqlitecipher file space in large ** chunks (say 1MB at a time), may reduce file-system fragmentation and ** improve performance on some systems. ** **
  • [[SQLITE_FCNTL_FILE_POINTER]] ** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer -** to the [sqlite3_file] object associated with a particular database +** to the [sqlite3_file] object associated with a particular sqlitecipher ** connection. See also [SQLITE_FCNTL_JOURNAL_POINTER]. ** **
  • [[SQLITE_FCNTL_JOURNAL_POINTER]] ** The [SQLITE_FCNTL_JOURNAL_POINTER] opcode is used to obtain a pointer ** to the [sqlite3_file] object associated with the journal file (either -** the [rollback journal] or the [write-ahead log]) for a particular database +** the [rollback journal] or the [write-ahead log]) for a particular sqlitecipher ** connection. See also [SQLITE_FCNTL_FILE_POINTER]. ** **
  • [[SQLITE_FCNTL_SYNC_OMITTED]] @@ -906,12 +906,12 @@ struct sqlite3_io_methods { **
  • [[SQLITE_FCNTL_SYNC]] ** The [SQLITE_FCNTL_SYNC] opcode is generated internally by SQLite and ** sent to the VFS immediately before the xSync method is invoked on a -** database file descriptor. Or, if the xSync method is not invoked +** sqlitecipher file descriptor. Or, if the xSync method is not invoked ** because the user has configured SQLite with ** [PRAGMA synchronous | PRAGMA synchronous=OFF] it is invoked in place ** of the xSync method. In most cases, the pointer argument passed with -** this file-control is NULL. However, if the database file is being synced -** as part of a multi-database commit, the argument points to a nul-terminated +** this file-control is NULL. However, if the sqlitecipher file is being synced +** as part of a multi-sqlitecipher commit, the argument points to a nul-terminated ** string containing the transactions super-journal file name. VFSes that ** do not need this signal should silently ignore this opcode. Applications ** should not call [sqlite3_file_control()] with this opcode as doing so may @@ -920,7 +920,7 @@ struct sqlite3_io_methods { **
  • [[SQLITE_FCNTL_COMMIT_PHASETWO]] ** The [SQLITE_FCNTL_COMMIT_PHASETWO] opcode is generated internally by SQLite ** and sent to the VFS after a transaction has been committed immediately -** but before the database is unlocked. VFSes that do not need this signal +** but before the sqlitecipher is unlocked. VFSes that do not need this signal ** should silently ignore this opcode. Applications should not call ** [sqlite3_file_control()] with this opcode as doing so may disrupt the ** operation of the specialized VFSes that do require it. @@ -934,7 +934,7 @@ struct sqlite3_io_methods { ** of 25 milliseconds before the first retry and with the delay increasing ** by an additional 25 milliseconds with each subsequent retry. This ** opcode allows these two values (10 retries and 25 milliseconds of delay) -** to be adjusted. The values are changed for all database connections +** to be adjusted. The values are changed for all sqlitecipher connections ** within the same process. The argument is a pointer to an array of two ** integers where the first integer is the new retry count and the second ** integer is the delay. If either integer is negative, then the setting @@ -947,12 +947,12 @@ struct sqlite3_io_methods { ** persistent [WAL | Write Ahead Log] setting. By default, the auxiliary ** write ahead log ([WAL file]) and shared memory ** files used for transaction control -** are automatically deleted when the latest connection to the database +** are automatically deleted when the latest connection to the sqlitecipher ** closes. Setting persistent WAL mode causes those files to persist after ** close. Persisting the files is useful when other processes that do not -** have write permission on the directory containing the database file want -** to read the database file, as the WAL and shared memory files must exist -** in order for the database to be readable. The fourth parameter to +** have write permission on the directory containing the sqlitecipher file want +** to read the sqlitecipher file, as the WAL and shared memory files must exist +** in order for the sqlitecipher to be readable. The fourth parameter to ** [sqlite3_file_control()] for this opcode should be a pointer to an integer. ** That integer is 0 to disable persistent WAL mode or 1 to enable persistent ** WAL mode. If the integer is -1, then it is overwritten with the current @@ -971,7 +971,7 @@ struct sqlite3_io_methods { **
  • [[SQLITE_FCNTL_OVERWRITE]] ** ^The [SQLITE_FCNTL_OVERWRITE] opcode is invoked by SQLite after opening ** a write transaction to indicate that, unless it is rolled back for some -** reason, the entire database file will be overwritten by the current +** reason, the entire sqlitecipher file will be overwritten by the current ** transaction. This is used by VACUUM operations. ** **
  • [[SQLITE_FCNTL_VFSNAME]] @@ -998,7 +998,7 @@ struct sqlite3_io_methods { **
  • [[SQLITE_FCNTL_PRAGMA]] ** ^Whenever a [PRAGMA] statement is parsed, an [SQLITE_FCNTL_PRAGMA] ** file control is sent to the open [sqlite3_file] object corresponding -** to the database file to which the pragma statement refers. ^The argument +** to the sqlitecipher file to which the pragma statement refers. ^The argument ** to the [SQLITE_FCNTL_PRAGMA] file control is an array of ** pointers to strings (char**) in which the second element of the array ** is the name of the pragma and the third element is the argument to the @@ -1022,7 +1022,7 @@ struct sqlite3_io_methods { ** **
  • [[SQLITE_FCNTL_BUSYHANDLER]] ** ^The [SQLITE_FCNTL_BUSYHANDLER] -** file-control may be invoked by SQLite on the database file handle +** file-control may be invoked by SQLite on the sqlitecipher file handle ** shortly after it is opened in order to provide a custom VFS with access ** to the connection's busy-handler callback. The argument is of type (void**) ** - an array of two (void *) values. The first (void *) actually points @@ -1137,45 +1137,45 @@ struct sqlite3_io_methods { ** **
  • [[SQLITE_FCNTL_DATA_VERSION]] ** The [SQLITE_FCNTL_DATA_VERSION] opcode is used to detect changes to -** a database file. The argument is a pointer to a 32-bit unsigned integer. +** a sqlitecipher file. The argument is a pointer to a 32-bit unsigned integer. ** The "data version" for the pager is written into the pointer. The ** "data version" changes whenever any change occurs to the corresponding -** database file, either through SQL statements on the same database -** connection or through transactions committed by separate database +** sqlitecipher file, either through SQL statements on the same sqlitecipher +** connection or through transactions committed by separate sqlitecipher ** connections possibly in other processes. The [sqlite3_total_changes()] -** interface can be used to find if any database on the connection has changed, +** interface can be used to find if any sqlitecipher on the connection has changed, ** but that interface responds to changes on TEMP as well as MAIN and does ** not provide a mechanism to detect changes to MAIN only. Also, the ** [sqlite3_total_changes()] interface responds to internal changes only and -** omits changes made by other database connections. The +** omits changes made by other sqlitecipher connections. The ** [PRAGMA data_version] command provides a mechanism to detect changes to -** a single attached database that occur due to other database connections, -** but omits changes implemented by the database connection on which it is +** a single attached sqlitecipher that occur due to other sqlitecipher connections, +** but omits changes implemented by the sqlitecipher connection on which it is ** called. This file control is the only mechanism to detect changes that ** happen either internally or externally and that are associated with -** a particular attached database. +** a particular attached sqlitecipher. ** **
  • [[SQLITE_FCNTL_CKPT_START]] ** The [SQLITE_FCNTL_CKPT_START] opcode is invoked from within a checkpoint ** in wal mode before the client starts to copy pages from the wal -** file to the database file. +** file to the sqlitecipher file. ** **
  • [[SQLITE_FCNTL_CKPT_DONE]] ** The [SQLITE_FCNTL_CKPT_DONE] opcode is invoked from within a checkpoint ** in wal mode after the client has finished copying pages from the wal -** file to the database file, but before the *-shm file is updated to +** file to the sqlitecipher file, but before the *-shm file is updated to ** record the fact that the pages have been checkpointed. ** ** **
  • [[SQLITE_FCNTL_EXTERNAL_READER]] ** The EXPERIMENTAL [SQLITE_FCNTL_EXTERNAL_READER] opcode is used to detect -** whether or not there is a database client in another process with a wal-mode -** transaction open on the database or not. It is only available on unix.The +** whether or not there is a sqlitecipher client in another process with a wal-mode +** transaction open on the sqlitecipher or not. It is only available on unix.The ** (void*) argument passed with this file-control should be a pointer to a -** value of type (int). The integer value is set to 1 if the database is a wal -** mode database and there exists at least one client in another process that -** currently has an SQL transaction open on the database. It is set to 0 if -** the database is not a wal-mode db, or if there is no such connection in any +** value of type (int). The integer value is set to 1 if the sqlitecipher is a wal +** mode sqlitecipher and there exists at least one client in another process that +** currently has an SQL transaction open on the sqlitecipher. It is set to 0 if +** the sqlitecipher is not a wal-mode db, or if there is no such connection in any ** other process. This opcode cannot be used to detect transactions opened ** by clients within the current process, only within other processes. ** @@ -1337,7 +1337,7 @@ typedef struct sqlite3_api_routines sqlite3_api_routines; ** that does not care about crash recovery or rollback might make ** the open of a journal file a no-op. Writes to this journal would ** also be no-ops, and any attempt to read the journal would return -** SQLITE_IOERR. Or the implementation might recognize that a database +** SQLITE_IOERR. Or the implementation might recognize that a sqlitecipher ** file will be doing page-aligned sector reads and writes in a random ** order and set up its I/O subsystem accordingly. ** @@ -1549,7 +1549,7 @@ struct sqlite3_vfs { ** ** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown() ** is not. The sqlite3_shutdown() interface must only be called from a -** single thread. All open [database connections] must be closed and all +** single thread. All open [sqlitecipher connections] must be closed and all ** other SQLite resources must be deallocated prior to invoking ** sqlite3_shutdown(). ** @@ -1639,17 +1639,17 @@ SQLITE_API int sqlite3_os_end(void); SQLITE_API int sqlite3_config(int, ...); /* -** CAPI3REF: Configure database connections +** CAPI3REF: Configure sqlitecipher connections ** METHOD: sqlite3 ** ** The sqlite3_db_config() interface is used to make configuration -** changes to a [database connection]. The interface is similar to +** changes to a [sqlitecipher connection]. The interface is similar to ** [sqlite3_config()] except that the changes apply to a single -** [database connection] (specified in the first argument). +** [sqlitecipher connection] (specified in the first argument). ** ** The second argument to sqlite3_db_config(D,V,...) is the ** [SQLITE_DBCONFIG_LOOKASIDE | configuration verb] - an integer code -** that indicates what aspect of the [database connection] is being configured. +** that indicates what aspect of the [sqlitecipher connection] is being configured. ** Subsequent arguments vary depending on the configuration verb. ** ** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if @@ -1761,12 +1761,12 @@ struct sqlite3_mem_methods { ** [[SQLITE_CONFIG_MULTITHREAD]]
    SQLITE_CONFIG_MULTITHREAD
    **
    There are no arguments to this option. ^This option sets the ** [threading mode] to Multi-thread. In other words, it disables -** mutexing on [database connection] and [prepared statement] objects. +** mutexing on [sqlitecipher connection] and [prepared statement] objects. ** The application is responsible for serializing access to -** [database connections] and [prepared statements]. But other mutexes +** [sqlitecipher connections] and [prepared statements]. But other mutexes ** are enabled so that SQLite will be safe to use in a multi-threaded ** environment as long as no two threads attempt to use the same -** [database connection] at the same time. ^If SQLite is compiled with +** [sqlitecipher connection] at the same time. ^If SQLite is compiled with ** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then ** it is not possible to set the Multi-thread [threading mode] and ** [sqlite3_config()] will return [SQLITE_ERROR] if called with the @@ -1776,11 +1776,11 @@ struct sqlite3_mem_methods { **
    There are no arguments to this option. ^This option sets the ** [threading mode] to Serialized. In other words, this option enables ** all mutexes including the recursive -** mutexes on [database connection] and [prepared statement] objects. +** mutexes on [sqlitecipher connection] and [prepared statement] objects. ** In this mode (which is the default when SQLite is compiled with ** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access -** to [database connections] and [prepared statements] so that the -** application is free to use the same [database connection] or the +** to [sqlitecipher connections] and [prepared statements] so that the +** application is free to use the same [sqlitecipher connection] or the ** same [prepared statement] in different threads at the same time. ** ^If SQLite is compiled with ** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then @@ -1839,14 +1839,14 @@ struct sqlite3_mem_methods { ** ** [[SQLITE_CONFIG_PAGECACHE]]
    SQLITE_CONFIG_PAGECACHE
    **
    ^The SQLITE_CONFIG_PAGECACHE option specifies a memory pool -** that SQLite can use for the database page cache with the default page +** that SQLite can use for the sqlitecipher page cache with the default page ** cache implementation. ** This configuration option is a no-op if an application-defined page ** cache implementation is loaded using the [SQLITE_CONFIG_PCACHE2]. ** ^There are three arguments to SQLITE_CONFIG_PAGECACHE: A pointer to ** 8-byte aligned memory (pMem), the size of each page cache line (sz), ** and the number of cache lines (N). -** The sz argument should be the size of the largest database page +** The sz argument should be the size of the largest sqlitecipher page ** (a power of two between 512 and 65536) plus some extra bytes for each ** page header. ^The number of extra bytes needed by the page header ** can be determined using [SQLITE_CONFIG_PCACHE_HDRSZ]. @@ -1859,7 +1859,7 @@ struct sqlite3_mem_methods { ** to satisfy page cache needs, falling back to [sqlite3_malloc()] if ** a page cache line is larger than sz bytes or if all of the pMem buffer ** is exhausted. -** ^If pMem is NULL and N is non-zero, then each database connection +** ^If pMem is NULL and N is non-zero, then each sqlitecipher connection ** does an initial bulk allocation for page cache memory ** from [sqlite3_malloc()] sufficient for N cache lines if N is positive or ** of -1024*N bytes if N is negative, . ^If additional @@ -1914,10 +1914,10 @@ struct sqlite3_mem_methods { ** ** [[SQLITE_CONFIG_LOOKASIDE]]
    SQLITE_CONFIG_LOOKASIDE
    **
    ^(The SQLITE_CONFIG_LOOKASIDE option takes two arguments that determine -** the default size of lookaside memory on each [database connection]. +** the default size of lookaside memory on each [sqlitecipher connection]. ** The first argument is the ** size of each lookaside buffer slot and the second is the number of -** slots allocated to each database connection.)^ ^(SQLITE_CONFIG_LOOKASIDE +** slots allocated to each sqlitecipher connection.)^ ^(SQLITE_CONFIG_LOOKASIDE ** sets the default lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE] ** option to [sqlite3_db_config()] can be used to change the lookaside ** configuration on individual connections.)^
    @@ -1960,10 +1960,10 @@ struct sqlite3_mem_methods { ** enabled, all filenames passed to [sqlite3_open()], [sqlite3_open_v2()], ** [sqlite3_open16()] or ** specified as part of [ATTACH] commands are interpreted as URIs, regardless -** of whether or not the [SQLITE_OPEN_URI] flag is set when the database +** of whether or not the [SQLITE_OPEN_URI] flag is set when the sqlitecipher ** connection is opened. ^If it is globally disabled, filenames are ** only interpreted as URIs if the SQLITE_OPEN_URI flag is set when the -** database connection is opened. ^(By default, URI handling is globally +** sqlitecipher connection is opened. ^(By default, URI handling is globally ** disabled. The default value may be changed by compiling with the ** [SQLITE_USE_URI] symbol defined.)^ ** @@ -1993,9 +1993,9 @@ struct sqlite3_mem_methods { ** be a pointer to a function of type void(*)(void*,sqlite3*,const char*, int). ** The second should be of type (void*). The callback is invoked by the library ** in three separate circumstances, identified by the value passed as the -** fourth parameter. If the fourth parameter is 0, then the database connection +** fourth parameter. If the fourth parameter is 0, then the sqlitecipher connection ** passed as the second argument has just been opened. The third argument -** points to a buffer containing the name of the main database file. If the +** points to a buffer containing the name of the main sqlitecipher file. If the ** fourth parameter is 1, then the SQL statement that the third parameter ** points to has just been executed. Or, if the fourth parameter is 2, then ** the connection being passed as the second parameter is being closed. The @@ -2008,7 +2008,7 @@ struct sqlite3_mem_methods { **
    ^SQLITE_CONFIG_MMAP_SIZE takes two 64-bit integer (sqlite3_int64) values ** that are the default mmap size limit (the default setting for ** [PRAGMA mmap_size]) and the maximum allowed mmap size limit. -** ^The default setting can be overridden by each database connection using +** ^The default setting can be overridden by each sqlitecipher connection using ** either the [PRAGMA mmap_size] command, or by using the ** [SQLITE_FCNTL_MMAP_SIZE] file control. ^(The maximum allowed mmap size ** will be silently truncated if necessary so that it does not exceed the @@ -2067,7 +2067,7 @@ struct sqlite3_mem_methods { ** of a table column that its values are likely to be very large - larger ** than the configured sorter-reference size threshold - then a reference ** is stored in each sorted record and the required column values loaded -** from the database as records are returned in sorted order. The default +** from the sqlitecipher as records are returned in sorted order. The default ** value for this option is to never use this optimization. Specifying a ** negative value for this option restores the default behaviour. ** This option is only available if SQLite is compiled with the @@ -2077,7 +2077,7 @@ struct sqlite3_mem_methods { **
    SQLITE_CONFIG_MEMDB_MAXSIZE **
    The SQLITE_CONFIG_MEMDB_MAXSIZE option accepts a single parameter ** [sqlite3_int64] parameter which is the default maximum size for an in-memory -** database created using [sqlite3_deserialize()]. This default maximum +** sqlitecipher created using [sqlite3_deserialize()]. This default maximum ** size can be adjusted up or down for individual databases using the ** [SQLITE_FCNTL_SIZE_LIMIT] [sqlite3_file_control|file-control]. If this ** configuration setting is never used, then the default maximum is determined @@ -2132,7 +2132,7 @@ struct sqlite3_mem_methods { ** [[SQLITE_DBCONFIG_LOOKASIDE]] **
    SQLITE_DBCONFIG_LOOKASIDE
    **
    ^This option takes three additional arguments that determine the -** [lookaside memory allocator] configuration for the [database connection]. +** [lookaside memory allocator] configuration for the [sqlitecipher connection]. ** ^The first argument (the third parameter to [sqlite3_db_config()] is a ** pointer to a memory buffer to use for lookaside memory. ** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb @@ -2144,7 +2144,7 @@ struct sqlite3_mem_methods { ** must be aligned to an 8-byte boundary. ^If the second argument to ** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally ** rounded down to the next smaller multiple of 8. ^(The lookaside memory -** configuration for a database connection can only be changed when that +** configuration for a sqlitecipher connection can only be changed when that ** connection is not currently using lookaside memory, or in other words ** when the "current value" returned by ** [sqlite3_db_status](D,[SQLITE_CONFIG_LOOKASIDE],...) is zero. @@ -2177,7 +2177,7 @@ struct sqlite3_mem_methods { **

    Originally this option disabled all triggers. ^(However, since ** SQLite version 3.35.0, TEMP triggers are still allowed even if ** this option is off. So, in other words, this option now only disables -** triggers in the main database schema or in the schemas of ATTACH-ed +** triggers in the main sqlitecipher schema or in the schemas of ATTACH-ed ** databases.)^

    ** ** [[SQLITE_DBCONFIG_ENABLE_VIEW]] @@ -2194,7 +2194,7 @@ struct sqlite3_mem_methods { **

    Originally this option disabled all views. ^(However, since ** SQLite version 3.35.0, TEMP views are still allowed even if ** this option is off. So, in other words, this option now only disables -** views in the main database schema or in the schemas of ATTACH-ed +** views in the main sqlitecipher schema or in the schemas of ATTACH-ed ** databases.)^ ** ** [[SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER]] @@ -2230,19 +2230,19 @@ struct sqlite3_mem_methods { ** ** ** [[SQLITE_DBCONFIG_MAINDBNAME]]

    SQLITE_DBCONFIG_MAINDBNAME
    -**
    ^This option is used to change the name of the "main" database +**
    ^This option is used to change the name of the "main" sqlitecipher ** schema. ^The sole argument is a pointer to a constant UTF8 string ** which will become the new schema name in place of "main". ^SQLite ** does not make a copy of the new main schema name string, so the application ** must ensure that the argument passed into this DBCONFIG option is unchanged -** until after the database connection closes. +** until after the sqlitecipher connection closes. **
    ** ** [[SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE]] **
    SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE
    -**
    Usually, when a database in wal mode is closed or detached from a -** database handle, SQLite checks if this will mean that there are now no -** connections at all to the database. If so, it performs a checkpoint +**
    Usually, when a sqlitecipher in wal mode is closed or detached from a +** sqlitecipher handle, SQLite checks if this will mean that there are now no +** connections at all to the sqlitecipher. If so, it performs a checkpoint ** operation before closing the connection. This option may be used to ** override this behaviour. The first parameter passed to this operation ** is an integer - positive to disable checkpoints-on-close, or zero (the @@ -2282,29 +2282,29 @@ struct sqlite3_mem_methods { ** ** [[SQLITE_DBCONFIG_RESET_DATABASE]]
    SQLITE_DBCONFIG_RESET_DATABASE
    **
    Set the SQLITE_DBCONFIG_RESET_DATABASE flag and then run -** [VACUUM] in order to reset a database back to an empty database +** [VACUUM] in order to reset a sqlitecipher back to an empty sqlitecipher ** with no schema and no content. The following process works even for -** a badly corrupted database file: +** a badly corrupted sqlitecipher file: **
      -**
    1. If the database connection is newly opened, make sure it has read the -** database schema by preparing then discarding some query against the -** database, or calling sqlite3_table_column_metadata(), ignoring any +**
    2. If the sqlitecipher connection is newly opened, make sure it has read the +** sqlitecipher schema by preparing then discarding some query against the +** sqlitecipher, or calling sqlite3_table_column_metadata(), ignoring any ** errors. This step is only necessary if the application desires to keep -** the database in WAL mode after the reset if it was in WAL mode before +** the sqlitecipher in WAL mode after the reset if it was in WAL mode before ** the reset. **
    3. sqlite3_db_config(db, SQLITE_DBCONFIG_RESET_DATABASE, 1, 0); **
    4. [sqlite3_exec](db, "[VACUUM]", 0, 0, 0); **
    5. sqlite3_db_config(db, SQLITE_DBCONFIG_RESET_DATABASE, 0, 0); **
    -** Because resetting a database is destructive and irreversible, the +** Because resetting a sqlitecipher is destructive and irreversible, the ** process requires the use of this obscure API and multiple steps to help ** ensure that it does not happen by accident. ** ** [[SQLITE_DBCONFIG_DEFENSIVE]]
    SQLITE_DBCONFIG_DEFENSIVE
    **
    The SQLITE_DBCONFIG_DEFENSIVE option activates or deactivates the -** "defensive" flag for a database connection. When the defensive +** "defensive" flag for a sqlitecipher connection. When the defensive ** flag is enabled, language features that allow ordinary SQL to -** deliberately corrupt the database file are disabled. The disabled +** deliberately corrupt the sqlitecipher file are disabled. The disabled ** features include but are not limited to the following: **
    ** ** [[SQLITE_TXN_READ]]
    SQLITE_TXN_READ
    -**
    The SQLITE_TXN_READ state means that the database is currently -** in a read transaction. Content has been read from the database file -** but nothing in the database file has changed. The transaction state +**
    The SQLITE_TXN_READ state means that the sqlitecipher is currently +** in a read transaction. Content has been read from the sqlitecipher file +** but nothing in the sqlitecipher file has changed. The transaction state ** will advanced to SQLITE_TXN_WRITE if any changes occur and there are ** no other conflicting concurrent write transactions. The transaction ** state will revert to SQLITE_TXN_NONE following a [ROLLBACK] or ** [COMMIT].
    ** ** [[SQLITE_TXN_WRITE]]
    SQLITE_TXN_WRITE
    -**
    The SQLITE_TXN_WRITE state means that the database is currently -** in a write transaction. Content has been written to the database file +**
    The SQLITE_TXN_WRITE state means that the sqlitecipher is currently +** in a write transaction. Content has been written to the sqlitecipher file ** but has not yet committed. The transaction state will change to ** to SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].
    */ @@ -6456,13 +6456,13 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema); ** METHOD: sqlite3 ** ** ^This interface returns a pointer to the next [prepared statement] after -** pStmt associated with the [database connection] pDb. ^If pStmt is NULL +** pStmt associated with the [sqlitecipher connection] pDb. ^If pStmt is NULL ** then this interface returns a pointer to the first prepared statement -** associated with the database connection pDb. ^If no prepared statement +** associated with the sqlitecipher connection pDb. ^If no prepared statement ** satisfies the conditions of this routine, it returns NULL. ** -** The [database connection] pointer D in a call to -** [sqlite3_next_stmt(D,S)] must refer to an open database +** The [sqlitecipher connection] pointer D in a call to +** [sqlite3_next_stmt(D,S)] must refer to an open sqlitecipher ** connection and in particular must not be a NULL pointer. */ SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); @@ -6474,29 +6474,29 @@ SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); ** ^The sqlite3_commit_hook() interface registers a callback ** function to be invoked whenever a transaction is [COMMIT | committed]. ** ^Any callback set by a previous call to sqlite3_commit_hook() -** for the same database connection is overridden. +** for the same sqlitecipher connection is overridden. ** ^The sqlite3_rollback_hook() interface registers a callback ** function to be invoked whenever a transaction is [ROLLBACK | rolled back]. ** ^Any callback set by a previous call to sqlite3_rollback_hook() -** for the same database connection is overridden. +** for the same sqlitecipher connection is overridden. ** ^The pArg argument is passed through to the callback. ** ^If the callback on a commit hook function returns non-zero, ** then the commit is converted into a rollback. ** ** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions ** return the P argument from the previous call of the same function -** on the same [database connection] D, or NULL for +** on the same [sqlitecipher connection] D, or NULL for ** the first call for each function on D. ** ** The commit and rollback hook callbacks are not reentrant. ** The callback implementation must not do anything that will modify -** the database connection that invoked the callback. Any actions -** to modify the database connection must be deferred until after the +** the sqlitecipher connection that invoked the callback. Any actions +** to modify the sqlitecipher connection must be deferred until after the ** completion of the [sqlite3_step()] call that triggered the commit ** or rollback hook in the first place. ** Note that running any other SQL statements, including SELECT statements, ** or merely calling [sqlite3_prepare_v2()] and [sqlite3_step()] will modify -** the database connections for the meaning of "modify" in this paragraph. +** the sqlitecipher connections for the meaning of "modify" in this paragraph. ** ** ^Registering a NULL function disables the callback. ** @@ -6510,7 +6510,7 @@ SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt); ** rolled back if an explicit "ROLLBACK" statement is executed, or ** an error or constraint causes an implicit rollback to occur. ** ^The rollback callback is not invoked if a transaction is -** automatically rolled back because the database connection is closed. +** automatically rolled back because the sqlitecipher connection is closed. ** ** See also the [sqlite3_update_hook()] interface. */ @@ -6522,34 +6522,34 @@ SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*); ** METHOD: sqlite3 ** ** ^The sqlite3_autovacuum_pages(D,C,P,X) interface registers a callback -** function C that is invoked prior to each autovacuum of the database +** function C that is invoked prior to each autovacuum of the sqlitecipher ** file. ^The callback is passed a copy of the generic data pointer (P), -** the schema-name of the attached database that is being autovacuumed, -** the the size of the database file in pages, the number of free pages, +** the schema-name of the attached sqlitecipher that is being autovacuumed, +** the the size of the sqlitecipher file in pages, the number of free pages, ** and the number of bytes per page, respectively. The callback should ** return the number of free pages that should be removed by the ** autovacuum. ^If the callback returns zero, then no autovacuum happens. ** ^If the value returned is greater than or equal to the number of ** free pages, then a complete autovacuum happens. ** -**

    ^If there are multiple ATTACH-ed database files that are being +**

    ^If there are multiple ATTACH-ed sqlitecipher files that are being ** modified as part of a transaction commit, then the autovacuum pages ** callback is invoked separately for each file. ** **

    The callback is not reentrant. The callback function should ** not attempt to invoke any other SQLite interface. If it does, bad -** things may happen, including segmentation faults and corrupt database +** things may happen, including segmentation faults and corrupt sqlitecipher ** files. The callback function should be a simple function that ** does some arithmetic on its input parameters and returns a result. ** ** ^The X parameter to sqlite3_autovacuum_pages(D,C,P,X) is an optional ** destructor for the P parameter. ^If X is not NULL, then X(P) is -** invoked whenever the database connection closes or when the callback +** invoked whenever the sqlitecipher connection closes or when the callback ** is overwritten by another invocation of sqlite3_autovacuum_pages(). ** -**

    ^There is only one autovacuum pages callback per database connection. +**

    ^There is only one autovacuum pages callback per sqlitecipher connection. ** ^Each call to the sqlite3_autovacuum_pages() interface overrides all -** previous invocations for that database connection. ^If the callback +** previous invocations for that sqlitecipher connection. ^If the callback ** argument (C) to sqlite3_autovacuum_pages(D,C,P,X) is a NULL pointer, ** then the autovacuum steps callback is cancelled. The return value ** from sqlite3_autovacuum_pages() is normally SQLITE_OK, but might @@ -6588,11 +6588,11 @@ SQLITE_API int sqlite3_autovacuum_pages( ** METHOD: sqlite3 ** ** ^The sqlite3_update_hook() interface registers a callback function -** with the [database connection] identified by the first argument +** with the [sqlitecipher connection] identified by the first argument ** to be invoked whenever a row is updated, inserted or deleted in ** a [rowid table]. ** ^Any callback set by a previous call to this function -** for the same database connection is overridden. +** for the same sqlitecipher connection is overridden. ** ** ^The second argument is a pointer to the function to invoke when a ** row is updated, inserted or deleted in a rowid table. @@ -6602,7 +6602,7 @@ SQLITE_API int sqlite3_autovacuum_pages( ** or [SQLITE_UPDATE], depending on the operation that caused the callback ** to be invoked. ** ^The third and fourth arguments to the callback contain pointers to the -** database and table name containing the affected row. +** sqlitecipher and table name containing the affected row. ** ^The final callback parameter is the [rowid] of the row. ** ^In the case of an update, this is the [rowid] after the update takes place. ** @@ -6618,15 +6618,15 @@ SQLITE_API int sqlite3_autovacuum_pages( ** release of SQLite. ** ** The update hook implementation must not do anything that will modify -** the database connection that invoked the update hook. Any actions -** to modify the database connection must be deferred until after the +** the sqlitecipher connection that invoked the update hook. Any actions +** to modify the sqlitecipher connection must be deferred until after the ** completion of the [sqlite3_step()] call that triggered the update hook. ** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their -** database connections for the meaning of "modify" in this paragraph. +** sqlitecipher connections for the meaning of "modify" in this paragraph. ** ** ^The sqlite3_update_hook(D,C,P) function ** returns the P argument from the previous call -** on the same [database connection] D, or NULL for +** on the same [sqlitecipher connection] D, or NULL for ** the first call on D. ** ** See also the [sqlite3_commit_hook()], [sqlite3_rollback_hook()], @@ -6641,9 +6641,9 @@ SQLITE_API void *sqlite3_update_hook( /* ** CAPI3REF: Enable Or Disable Shared Pager Cache ** -** ^(This routine enables or disables the sharing of the database cache -** and schema data structures between [database connection | connections] -** to the same database. Sharing is enabled if the argument is true +** ^(This routine enables or disables the sharing of the sqlitecipher cache +** and schema data structures between [sqlitecipher connection | connections] +** to the same sqlitecipher. Sharing is enabled if the argument is true ** and disabled if the argument is false.)^ ** ** ^Cache sharing is enabled and disabled for an entire process. @@ -6653,7 +6653,7 @@ SQLITE_API void *sqlite3_update_hook( ** ** ^(The cache sharing mode set by this interface effects all subsequent ** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()]. -** Existing database connections continue to use the sharing mode +** Existing sqlitecipher connections continue to use the sharing mode ** that was in effect at the time they were opened.)^ ** ** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled @@ -6664,12 +6664,12 @@ SQLITE_API void *sqlite3_update_hook( ** continues to be provided for historical compatibility, but its use is ** discouraged. Any use of shared cache is discouraged. If shared cache ** must be used, it is recommended that shared cache only be enabled for -** individual database connections using the [sqlite3_open_v2()] interface +** individual sqlitecipher connections using the [sqlite3_open_v2()] interface ** with the [SQLITE_OPEN_SHAREDCACHE] flag. ** ** Note: This method is disabled on MacOS X 10.7 and iOS version 5.0 ** and will always return SQLITE_MISUSE. On those systems, -** shared cache mode should be enabled per-database connection via +** shared cache mode should be enabled per-sqlitecipher connection via ** [sqlite3_open_v2()] with [SQLITE_OPEN_SHAREDCACHE]. ** ** This interface is threadsafe on processors where writing a @@ -6684,7 +6684,7 @@ SQLITE_API int sqlite3_enable_shared_cache(int); ** ** ^The sqlite3_release_memory() interface attempts to free N bytes ** of heap memory by deallocating non-essential memory allocations -** held by the database library. Memory used to cache database +** held by the sqlitecipher library. Memory used to cache sqlitecipher ** pages to improve performance is an example of non-essential memory. ** ^sqlite3_release_memory() returns the number of bytes actually freed, ** which might be more or less than the amount requested. @@ -6700,7 +6700,7 @@ SQLITE_API int sqlite3_release_memory(int); ** METHOD: sqlite3 ** ** ^The sqlite3_db_release_memory(D) interface attempts to free as much heap -** memory as possible from database connection D. Unlike the +** memory as possible from sqlitecipher connection D. Unlike the ** [sqlite3_release_memory()] interface, this interface is in effect even ** when the [SQLITE_ENABLE_MEMORY_MANAGEMENT] compile-time option is ** omitted. @@ -6713,7 +6713,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*); ** CAPI3REF: Impose A Limit On Heap Size ** ** These interfaces impose limits on the amount of heap memory that will be -** by all database connections within a single process. +** by all sqlitecipher connections within a single process. ** ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the ** soft limit on the amount of heap memory that may be allocated by SQLite. @@ -6793,8 +6793,8 @@ SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N); ** METHOD: sqlite3 ** ** ^(The sqlite3_table_column_metadata(X,D,T,C,....) routine returns -** information about column C of table T in database D -** on [database connection] X.)^ ^The sqlite3_table_column_metadata() +** information about column C of table T in sqlitecipher D +** on [sqlitecipher connection] X.)^ ^The sqlite3_table_column_metadata() ** interface returns SQLITE_OK and fills in the non-NULL pointers in ** the final five arguments with appropriate values if the specified ** column exists. ^The sqlite3_table_column_metadata() interface returns @@ -6807,10 +6807,10 @@ SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N); ** undefined behavior. ** ** ^The column is identified by the second, third and fourth parameters to -** this function. ^(The second parameter is either the name of the database -** (i.e. "main", "temp", or an attached database) containing the specified +** this function. ^(The second parameter is either the name of the sqlitecipher +** (i.e. "main", "temp", or an attached sqlitecipher) containing the specified ** table or NULL.)^ ^If it is NULL, then all attached databases are searched -** for the table using the same algorithm used by the database engine to +** for the table using the same algorithm used by the sqlitecipher engine to ** resolve unqualified table references. ** ** ^The third and fourth parameters to this function are the table and column @@ -6853,7 +6853,7 @@ SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N); ** auto increment: 0 ** )^ ** -** ^This function causes all database schemas to be read from disk and +** ^This function causes all sqlitecipher schemas to be read from disk and ** parsed, if that has not already been done, and returns an error if ** any errors are encountered while loading the schema. */ @@ -6914,7 +6914,7 @@ SQLITE_API int sqlite3_table_column_metadata( ** See also the [load_extension() SQL function]. */ SQLITE_API int sqlite3_load_extension( - sqlite3 *db, /* Load the extension into this database connection */ + sqlite3 *db, /* Load the extension into this sqlitecipher connection */ const char *zFile, /* Name of the shared library containing extension */ const char *zProc, /* Entry point. Derived from zFile if 0 */ char **pzErrMsg /* Put error message here if not 0 */ @@ -6951,9 +6951,9 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff); ** CAPI3REF: Automatically Load Statically Linked Extensions ** ** ^This interface causes the xEntryPoint() function to be invoked for -** each new [database connection] that is created. The idea here is that +** each new [sqlitecipher connection] that is created. The idea here is that ** xEntryPoint() is the entry point for a statically linked [SQLite extension] -** that is to be automatically loaded into all new database connections. +** that is to be automatically loaded into all new sqlitecipher connections. ** ** ^(Even though the function prototype shows that xEntryPoint() takes ** no arguments and returns void, SQLite invokes xEntryPoint() with three @@ -6978,7 +6978,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff); ** ** ^Calling sqlite3_auto_extension(X) with an entry point X that is already ** on the list of automatic extensions is a harmless no-op. ^No entry point -** will be called more than once for each database connection that is opened. +** will be called more than once for each sqlitecipher connection that is opened. ** ** See also: [sqlite3_reset_auto_extension()] ** and [sqlite3_cancel_auto_extension()] @@ -7034,9 +7034,9 @@ typedef struct sqlite3_module sqlite3_module; ** instance of this structure and passing a pointer to that instance ** to [sqlite3_create_module()] or [sqlite3_create_module_v2()]. ** ^The registration remains valid until it is replaced by a different -** module or until the [database connection] closes. The content +** module or until the [sqlitecipher connection] closes. The content ** of this structure must not change while it is registered with -** any database connection. +** any sqlitecipher connection. */ struct sqlite3_module { int iVersion; @@ -7159,10 +7159,10 @@ struct sqlite3_module { ** SQLite also assumes that if a call to the xUpdate() method is made as ** part of the same statement to delete or update a virtual table row and the ** implementation returns SQLITE_CONSTRAINT, then there is no need to rollback -** any database changes. In other words, if the xUpdate() returns -** SQLITE_CONSTRAINT, the database contents must be exactly as they were +** any sqlitecipher changes. In other words, if the xUpdate() returns +** SQLITE_CONSTRAINT, the sqlitecipher contents must be exactly as they were ** before xUpdate was called. By contrast, if SQLITE_INDEX_SCAN_UNIQUE is not -** set and xUpdate returns SQLITE_CONSTRAINT, any database changes made by +** set and xUpdate returns SQLITE_CONSTRAINT, any sqlitecipher changes made by ** the xUpdate method are automatically rolled back by SQLite. ** ** IMPORTANT: The estimatedRows field was added to the sqlite3_index_info @@ -7284,7 +7284,7 @@ struct sqlite3_index_info { ** creating a new [virtual table] using the module and before using a ** preexisting [virtual table] for the module. ** -** ^The module name is registered on the [database connection] specified +** ^The module name is registered on the [sqlitecipher connection] specified ** by the first parameter. ^The name of the module is given by the ** second parameter. ^The third parameter is a pointer to ** the implementation of the [virtual table module]. ^The fourth @@ -7326,7 +7326,7 @@ SQLITE_API int sqlite3_create_module_v2( ** METHOD: sqlite3 ** ** ^The sqlite3_drop_modules(D,L) interface removes all virtual -** table modules from database connection D except those named on list L. +** table modules from sqlitecipher connection D except those named on list L. ** The L parameter must be either NULL or a pointer to an array of pointers ** to strings where the array is terminated by a single NULL pointer. ** ^If the L parameter is NULL, then all virtual table modules are removed. @@ -7444,18 +7444,18 @@ typedef struct sqlite3_blob sqlite3_blob; ** CONSTRUCTOR: sqlite3_blob ** ** ^(This interfaces opens a [BLOB handle | handle] to the BLOB located -** in row iRow, column zColumn, table zTable in database zDb; +** in row iRow, column zColumn, table zTable in sqlitecipher zDb; ** in other words, the same BLOB that would be selected by: ** **

     **     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
     ** 
    )^ ** -** ^(Parameter zDb is not the filename that contains the database, but -** rather the symbolic name of the database. For attached databases, this is +** ^(Parameter zDb is not the filename that contains the sqlitecipher, but +** rather the symbolic name of the sqlitecipher. For attached databases, this is ** the name that appears after the AS keyword in the [ATTACH] statement. -** For the main database file, the database name is "main". For TEMP -** tables, the database name is "temp".)^ +** For the main sqlitecipher file, the sqlitecipher name is "main". For TEMP +** tables, the sqlitecipher name is "temp".)^ ** ** ^If the flags parameter is non-zero, then the BLOB is opened for read ** and write access. ^If the flags parameter is zero, the BLOB is opened for @@ -7470,7 +7470,7 @@ typedef struct sqlite3_blob sqlite3_blob; ** This function fails with SQLITE_ERROR if any of the following are true: ** ** ** ^Unless it returns SQLITE_MISUSE, this function sets the -** [database connection] error code and message accessible via +** [sqlitecipher connection] error code and message accessible via ** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions. ** ** A BLOB referenced by sqlite3_blob_open() may be read using the ** [sqlite3_blob_read()] interface and modified by using ** [sqlite3_blob_write()]. The [BLOB handle] can be moved to a ** different row of the same table using the [sqlite3_blob_reopen()] -** interface. However, the column, table, or database of a [BLOB handle] +** interface. However, the column, table, or sqlitecipher of a [BLOB handle] ** cannot be changed after the [BLOB handle] is opened. ** ** ^(If the row that a BLOB handle points to is modified by an @@ -7536,9 +7536,9 @@ SQLITE_API int sqlite3_blob_open( ** METHOD: sqlite3_blob ** ** ^This function is used to move an existing [BLOB handle] so that it points -** to a different row of the same database table. ^The new row is identified +** to a different row of the same sqlitecipher table. ^The new row is identified ** by the rowid value passed as the second argument. Only the row can be -** changed. ^The database, table and column on which the blob handle is open +** changed. ^The sqlitecipher, table and column on which the blob handle is open ** remain the same. Moving an existing [BLOB handle] to a new row is ** faster than closing the existing handle and opening a new one. ** @@ -7552,7 +7552,7 @@ SQLITE_API int sqlite3_blob_open( ** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle ** always returns zero. ** -** ^This function sets the database handle error code and message. +** ^This function sets the sqlitecipher handle error code and message. */ SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); @@ -7565,7 +7565,7 @@ SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64); ** handle is still closed.)^ ** ** ^If the blob handle being closed was opened for read-write access, and if -** the database is in auto-commit mode and there are no other open read-write +** the sqlitecipher is in auto-commit mode and there are no other open read-write ** blob handles or active write statements, the current transaction is ** committed. ^If an error occurs while committing the transaction, an error ** code is returned and the transaction rolled back. @@ -7635,7 +7635,7 @@ SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset); ** ^(On success, sqlite3_blob_write() returns SQLITE_OK. ** Otherwise, an [error code] or an [extended error code] is returned.)^ ** ^Unless SQLITE_MISUSE is returned, this function sets the -** [database connection] error code and message accessible via +** [sqlitecipher connection] error code and message accessible via ** [sqlite3_errcode()] and [sqlite3_errmsg()] and related functions. ** ** ^If the [BLOB handle] passed as the first argument was not opened for @@ -7963,11 +7963,11 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); /* -** CAPI3REF: Retrieve the mutex for a database connection +** CAPI3REF: Retrieve the mutex for a sqlitecipher connection ** METHOD: sqlite3 ** ** ^This interface returns a pointer the [sqlite3_mutex] object that -** serializes access to the [database connection] given in the argument +** serializes access to the [sqlitecipher connection] given in the argument ** when the [threading mode] is Serialized. ** ^If the [threading mode] is Single-thread or Multi-thread then this ** routine returns a NULL pointer. @@ -7981,12 +7981,12 @@ SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*); ** ** ^The [sqlite3_file_control()] interface makes a direct call to the ** xFileControl method for the [sqlite3_io_methods] object associated -** with a particular database identified by the second argument. ^The -** name of the database is "main" for the main database or "temp" for the -** TEMP database, or the name that appears after the AS keyword for +** with a particular sqlitecipher identified by the second argument. ^The +** name of the sqlitecipher is "main" for the main sqlitecipher or "temp" for the +** TEMP sqlitecipher, or the name that appears after the AS keyword for ** databases that are added using the [ATTACH] SQL command. ** ^A NULL pointer can be used in place of "main" to refer to the -** main database file. +** main sqlitecipher file. ** ^The third and fourth parameters to this routine ** are passed directly through to the second and third parameters of ** the xFileControl method. ^The return value of the xFileControl @@ -8000,13 +8000,13 @@ SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*); ** the space pointed to by the 4th parameter. The ** [SQLITE_FCNTL_JOURNAL_POINTER] works similarly except that it returns ** the [sqlite3_file] object associated with the journal file instead of -** the main database. The [SQLITE_FCNTL_VFS_POINTER] opcode returns +** the main sqlitecipher. The [SQLITE_FCNTL_VFS_POINTER] opcode returns ** a pointer to the underlying [sqlite3_vfs] object for the file. ** The [SQLITE_FCNTL_DATA_VERSION] returns the data version counter ** from the pager. ** ** ^If the second parameter (zDbName) does not match the name of any -** open database file, then SQLITE_ERROR is returned. ^This error +** open sqlitecipher file, then SQLITE_ERROR is returned. ^This error ** code is not remembered and will not be recalled by [sqlite3_errcode()] ** or [sqlite3_errmsg()]. The underlying xFileControl method might ** also return SQLITE_ERROR. There is no way to distinguish between @@ -8382,8 +8382,8 @@ SQLITE_API int sqlite3_status64( ** METHOD: sqlite3 ** ** ^This interface is used to retrieve runtime status information -** about a single [database connection]. ^The first argument is the -** database connection object to be interrogated. ^The second argument +** about a single [sqlitecipher connection]. ^The first argument is the +** sqlitecipher connection object to be interrogated. ^The second argument ** is an integer constant, taken from the set of ** [SQLITE_DBSTATUS options], that ** determines the parameter to interrogate. The set of @@ -8403,7 +8403,7 @@ SQLITE_API int sqlite3_status64( SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg); /* -** CAPI3REF: Status Parameters for database connections +** CAPI3REF: Status Parameters for sqlitecipher connections ** KEYWORDS: {SQLITE_DBSTATUS options} ** ** These constants are the available integer "verbs" that can be passed as @@ -8443,7 +8443,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r ** ** [[SQLITE_DBSTATUS_CACHE_USED]] ^(
    SQLITE_DBSTATUS_CACHE_USED
    **
    This parameter returns the approximate number of bytes of heap -** memory used by all pager caches associated with the database connection.)^ +** memory used by all pager caches associated with the sqlitecipher connection.)^ ** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0. ** ** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]] @@ -8452,7 +8452,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r ** pager cache is shared between two or more connections the bytes of heap ** memory used by that pager cache is divided evenly between the attached ** connections.)^ In other words, if none of the pager caches associated -** with the database connection are shared, this request returns the same +** with the sqlitecipher connection are shared, this request returns the same ** value as DBSTATUS_CACHE_USED. Or, if one or more or the pager caches are ** shared, the value returned by this call will be smaller than that returned ** by DBSTATUS_CACHE_USED. ^The highwater mark associated with @@ -8463,14 +8463,14 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r ** memory used to store the schema for all databases associated ** with the connection - main, temp, and any [ATTACH]-ed databases.)^ ** ^The full amount of memory used by the schemas is reported, even if the -** schema memory is shared with other database connections due to +** schema memory is shared with other sqlitecipher connections due to ** [shared cache mode] being enabled. ** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0. ** ** [[SQLITE_DBSTATUS_STMT_USED]] ^(
    SQLITE_DBSTATUS_STMT_USED
    **
    This parameter returns the approximate number of bytes of heap ** and lookaside memory used by all prepared statements associated with -** the database connection.)^ +** the sqlitecipher connection.)^ ** ^The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always 0. **
    ** @@ -8490,8 +8490,8 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r **
    This parameter returns the number of dirty cache entries that have ** been written to disk. Specifically, the number of pages written to the ** wal file in wal mode databases, or the number of pages written to the -** database file in rollback mode databases. Any pages written as part of -** transaction rollback or database recovery operations are not included. +** sqlitecipher file in rollback mode databases. Any pages written as part of +** transaction rollback or sqlitecipher recovery operations are not included. ** If an IO or other error occurs while writing a page to disk, the effect ** on subsequent SQLITE_DBSTATUS_CACHE_WRITE requests is undefined.)^ ^The ** highwater mark associated with SQLITE_DBSTATUS_CACHE_WRITE is always 0. @@ -8672,7 +8672,7 @@ struct sqlite3_pcache_page { ** custom page cache using this API, an application can better control ** the amount of memory consumed by SQLite, the way in which ** that memory is allocated and released, and the policies used to -** determine exactly which parts of a database file are cached and for +** determine exactly which parts of a sqlitecipher file are cached and for ** how long. ** ** The alternative page cache mechanism is an @@ -8712,7 +8712,7 @@ struct sqlite3_pcache_page { ** ** [[the xCreate() page cache methods]] ** ^SQLite invokes the xCreate() method to construct a new cache instance. -** SQLite will typically create one cache instance for each open database file, +** SQLite will typically create one cache instance for each open sqlitecipher file, ** though this is not guaranteed. ^The ** first parameter, szPage, is the size in bytes of the pages that must ** be allocated by the cache. ^szPage will always a power of two. ^The @@ -8720,11 +8720,11 @@ struct sqlite3_pcache_page { ** associated with each page cache entry. ^The szExtra parameter will ** a number less than 250. SQLite will use the ** extra szExtra bytes on each page to store metadata about the underlying -** database page on disk. The value passed into szExtra depends +** sqlitecipher page on disk. The value passed into szExtra depends ** on the SQLite version, the target platform, and how SQLite was compiled. ** ^The third argument to xCreate(), bPurgeable, is true if the cache being -** created will be used to cache database pages of a file stored on disk, or -** false if it is used for an in-memory database. The cache implementation +** created will be used to cache sqlitecipher pages of a file stored on disk, or +** false if it is used for an in-memory sqlitecipher. The cache implementation ** does not have to do anything special based with the value of bPurgeable; ** it is purely advisory. ^On a cache where bPurgeable is false, SQLite will ** never invoke xUnpin() except to deliberately delete a page. @@ -8750,7 +8750,7 @@ struct sqlite3_pcache_page { ** an sqlite3_pcache_page object associated with that page, or a NULL pointer. ** The pBuf element of the returned sqlite3_pcache_page object will be a ** pointer to a buffer of szPage bytes used to store the content of a -** single database page. The pExtra element of sqlite3_pcache_page will be +** single sqlitecipher page. The pExtra element of sqlite3_pcache_page will be ** a pointer to the szExtra bytes of extra storage that SQLite has requested ** for each entry in the page cache. ** @@ -8872,19 +8872,19 @@ typedef struct sqlite3_backup sqlite3_backup; /* ** CAPI3REF: Online Backup API. ** -** The backup API copies the content of one database into another. +** The backup API copies the content of one sqlitecipher into another. ** It is useful either for creating backups of databases or ** for copying in-memory databases to or from persistent files. ** ** See Also: [Using the SQLite Online Backup API] ** -** ^SQLite holds a write transaction open on the destination database file +** ^SQLite holds a write transaction open on the destination sqlitecipher file ** for the duration of the backup operation. -** ^The source database is read-locked only while it is being read; +** ^The source sqlitecipher is read-locked only while it is being read; ** it is not locked continuously for the entire backup operation. -** ^Thus, the backup may be performed on a live source database without -** preventing other database connections from -** reading or writing to the source database while the backup is underway. +** ^Thus, the backup may be performed on a live source sqlitecipher without +** preventing other sqlitecipher connections from +** reading or writing to the source sqlitecipher while the backup is underway. ** ** ^(To perform a backup operation: **
      @@ -8901,25 +8901,25 @@ typedef struct sqlite3_backup sqlite3_backup; ** [[sqlite3_backup_init()]] sqlite3_backup_init() ** ** ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the -** [database connection] associated with the destination database -** and the database name, respectively. -** ^The database name is "main" for the main database, "temp" for the -** temporary database, or the name specified after the AS keyword in -** an [ATTACH] statement for an attached database. +** [sqlitecipher connection] associated with the destination sqlitecipher +** and the sqlitecipher name, respectively. +** ^The sqlitecipher name is "main" for the main sqlitecipher, "temp" for the +** temporary sqlitecipher, or the name specified after the AS keyword in +** an [ATTACH] statement for an attached sqlitecipher. ** ^The S and M arguments passed to -** sqlite3_backup_init(D,N,S,M) identify the [database connection] -** and database name of the source database, respectively. -** ^The source and destination [database connections] (parameters S and D) +** sqlite3_backup_init(D,N,S,M) identify the [sqlitecipher connection] +** and sqlitecipher name of the source sqlitecipher, respectively. +** ^The source and destination [sqlitecipher connections] (parameters S and D) ** must be different or else sqlite3_backup_init(D,N,S,M) will fail with ** an error. ** ** ^A call to sqlite3_backup_init() will fail, returning NULL, if ** there is already a read or read-write transaction open on the -** destination database. +** destination sqlitecipher. ** ** ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is ** returned and an error code and error message are stored in the -** destination [database connection] D. +** destination [sqlitecipher connection] D. ** ^The error code and message for the failed call to sqlite3_backup_init() ** can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or ** [sqlite3_errmsg16()] functions. @@ -8946,10 +8946,10 @@ typedef struct sqlite3_backup sqlite3_backup; ** ** ^(The sqlite3_backup_step() might return [SQLITE_READONLY] if **
        -**
      1. the destination database was opened read-only, or -**
      2. the destination database is using write-ahead-log journaling +**
      3. the destination sqlitecipher was opened read-only, or +**
      4. the destination sqlitecipher is using write-ahead-log journaling ** and the destination and source page sizes differ, or -**
      5. the destination database is an in-memory database and the +**
      6. the destination sqlitecipher is an in-memory sqlitecipher and the ** destination and source page sizes differ. **
      )^ ** @@ -8959,8 +8959,8 @@ typedef struct sqlite3_backup sqlite3_backup; ** busy-handler returns non-zero before the lock is available, then ** [SQLITE_BUSY] is returned to the caller. ^In this case the call to ** sqlite3_backup_step() can be retried later. ^If the source -** [database connection] -** is being used to write to the source database when sqlite3_backup_step() +** [sqlitecipher connection] +** is being used to write to the source sqlitecipher when sqlite3_backup_step() ** is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this ** case the call to sqlite3_backup_step() can be retried later on. ^(If ** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or @@ -8974,16 +8974,16 @@ typedef struct sqlite3_backup sqlite3_backup; ** on the destination file. ^The exclusive lock is not released until either ** sqlite3_backup_finish() is called or the backup operation is complete ** and sqlite3_backup_step() returns [SQLITE_DONE]. ^Every call to -** sqlite3_backup_step() obtains a [shared lock] on the source database that +** sqlite3_backup_step() obtains a [shared lock] on the source sqlitecipher that ** lasts for the duration of the sqlite3_backup_step() call. -** ^Because the source database is not locked between calls to -** sqlite3_backup_step(), the source database may be modified mid-way -** through the backup process. ^If the source database is modified by an -** external process or via a database connection other than the one being +** ^Because the source sqlitecipher is not locked between calls to +** sqlite3_backup_step(), the source sqlitecipher may be modified mid-way +** through the backup process. ^If the source sqlitecipher is modified by an +** external process or via a sqlitecipher connection other than the one being ** used by the backup operation, then the backup will be automatically ** restarted by the next call to sqlite3_backup_step(). ^If the source -** database is modified by the using the same database connection as is used -** by the backup operation, then the backup database is automatically +** sqlitecipher is modified by the using the same sqlitecipher connection as is used +** by the backup operation, then the backup sqlitecipher is automatically ** updated at the same time. ** ** [[sqlite3_backup_finish()]] sqlite3_backup_finish() @@ -8994,7 +8994,7 @@ typedef struct sqlite3_backup sqlite3_backup; ** ^The sqlite3_backup_finish() interfaces releases all ** resources associated with the [sqlite3_backup] object. ** ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any -** active write-transaction on the destination database is rolled back. +** active write-transaction on the destination sqlitecipher is rolled back. ** The [sqlite3_backup] object is invalid ** and may not be used following a call to sqlite3_backup_finish(). ** @@ -9015,34 +9015,34 @@ typedef struct sqlite3_backup sqlite3_backup; ** ^The sqlite3_backup_remaining() routine returns the number of pages still ** to be backed up at the conclusion of the most recent sqlite3_backup_step(). ** ^The sqlite3_backup_pagecount() routine returns the total number of pages -** in the source database at the conclusion of the most recent +** in the source sqlitecipher at the conclusion of the most recent ** sqlite3_backup_step(). ** ^(The values returned by these functions are only updated by -** sqlite3_backup_step(). If the source database is modified in a way that -** changes the size of the source database or the number of pages remaining, +** sqlite3_backup_step(). If the source sqlitecipher is modified in a way that +** changes the size of the source sqlitecipher or the number of pages remaining, ** those changes are not reflected in the output of sqlite3_backup_pagecount() ** and sqlite3_backup_remaining() until after the next ** sqlite3_backup_step().)^ ** ** Concurrent Usage of Database Handles ** -** ^The source [database connection] may be used by the application for other +** ^The source [sqlitecipher connection] may be used by the application for other ** purposes while a backup operation is underway or being initialized. -** ^If SQLite is compiled and configured to support threadsafe database -** connections, then the source database connection may be used concurrently +** ^If SQLite is compiled and configured to support threadsafe sqlitecipher +** connections, then the source sqlitecipher connection may be used concurrently ** from within other threads. ** ** However, the application must guarantee that the destination -** [database connection] is not passed to any other API (by any thread) after +** [sqlitecipher connection] is not passed to any other API (by any thread) after ** sqlite3_backup_init() is called and before the corresponding call to ** sqlite3_backup_finish(). SQLite does not currently check to see -** if the application incorrectly accesses the destination [database connection] +** if the application incorrectly accesses the destination [sqlitecipher connection] ** and so no error code is reported, but the operations may malfunction -** nevertheless. Use of the destination database connection while a +** nevertheless. Use of the destination sqlitecipher connection while a ** backup is in progress might also also cause a mutex deadlock. ** ** If running in [shared cache mode], the application must -** guarantee that the shared cache used by the destination database +** guarantee that the shared cache used by the destination sqlitecipher ** is not accessed while the backup is running. In practice this means ** that the application must guarantee that the disk file being ** backed up to is not accessed by any connection within the process, @@ -9056,10 +9056,10 @@ typedef struct sqlite3_backup sqlite3_backup; ** possible that they return invalid values. */ SQLITE_API sqlite3_backup *sqlite3_backup_init( - sqlite3 *pDest, /* Destination database handle */ - const char *zDestName, /* Destination database name */ - sqlite3 *pSource, /* Source database handle */ - const char *zSourceName /* Source database name */ + sqlite3 *pDest, /* Destination sqlitecipher handle */ + const char *zDestName, /* Destination sqlitecipher name */ + sqlite3 *pSource, /* Source sqlitecipher handle */ + const char *zSourceName /* Source sqlitecipher name */ ); SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage); SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p); @@ -9070,7 +9070,7 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); ** CAPI3REF: Unlock Notification ** METHOD: sqlite3 ** -** ^When running in shared-cache mode, a database operation may fail with +** ^When running in shared-cache mode, a sqlitecipher operation may fail with ** an [SQLITE_LOCKED] error if the required locks on the shared-cache or ** individual tables within the shared-cache cannot be obtained. See ** [SQLite Shared-Cache Mode] for a description of shared-cache locking. @@ -9081,12 +9081,12 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); ** ** See Also: [Using the SQLite Unlock Notification Feature]. ** -** ^Shared-cache locks are released when a database connection concludes +** ^Shared-cache locks are released when a sqlitecipher connection concludes ** its current transaction, either by committing it or rolling it back. ** ** ^When a connection (known as the blocked connection) fails to obtain a ** shared-cache lock and SQLITE_LOCKED is returned to the caller, the -** identity of the database connection (the blocking connection) that +** identity of the sqlitecipher connection (the blocking connection) that ** has locked the required resource is stored internally. ^After an ** application receives an SQLITE_LOCKED error, it may call the ** sqlite3_unlock_notify() method with the blocked connection handle as @@ -9138,12 +9138,12 @@ SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p); ** multiple times, it is invoked once with the set of void* context pointers ** specified by the blocked connections bundled together into an array. ** This gives the application an opportunity to prioritize any actions -** related to the set of unblocked database connections. +** related to the set of unblocked sqlitecipher connections. ** ** Deadlock Detection ** ** Assuming that after registering for an unlock-notify callback a -** database waits for the callback to be issued before taking any further +** sqlitecipher waits for the callback to be issued before taking any further ** action (a reasonable assumption), then using this API may cause the ** application to deadlock. For example, if connection X is waiting for ** connection Y's transaction to be concluded, and similarly connection @@ -9267,17 +9267,17 @@ SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); ** METHOD: sqlite3 ** ** ^The [sqlite3_wal_hook()] function is used to register a callback that -** is invoked each time data is committed to a database in wal mode. +** is invoked each time data is committed to a sqlitecipher in wal mode. ** ** ^(The callback is invoked by SQLite after the commit has taken place and -** the associated write-lock on the database released)^, so the implementation -** may read, write or [checkpoint] the database as required. +** the associated write-lock on the sqlitecipher released)^, so the implementation +** may read, write or [checkpoint] the sqlitecipher as required. ** ** ^The first parameter passed to the callback function when it is invoked ** is a copy of the third parameter passed to sqlite3_wal_hook() when -** registering the callback. ^The second is a copy of the database handle. -** ^The third parameter is the name of the database that was written to - -** either "main" or the name of an [ATTACH]-ed database. ^The fourth parameter +** registering the callback. ^The second is a copy of the sqlitecipher handle. +** ^The third parameter is the name of the sqlitecipher that was written to - +** either "main" or the name of an [ATTACH]-ed sqlitecipher. ^The fourth parameter ** is the number of pages currently in the write-ahead log file, ** including those that were just committed. ** @@ -9289,7 +9289,7 @@ SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); ** that does not correspond to any valid SQLite error code, the results ** are undefined. ** -** A single database handle may have at most a single write-ahead log callback +** A single sqlitecipher handle may have at most a single write-ahead log callback ** registered at one time. ^Calling [sqlite3_wal_hook()] replaces any ** previously registered write-ahead log callback. ^The return value is ** a copy of the third parameter from the previous call, if any, or 0. @@ -9308,7 +9308,7 @@ SQLITE_API void *sqlite3_wal_hook( ** METHOD: sqlite3 ** ** ^The [sqlite3_wal_autocheckpoint(D,N)] is a wrapper around -** [sqlite3_wal_hook()] that causes any database on [database connection] D +** [sqlite3_wal_hook()] that causes any sqlitecipher on [sqlitecipher connection] D ** to automatically [checkpoint] ** after committing a transaction if there are N or ** more frames in the [write-ahead log] file. ^Passing zero or @@ -9326,7 +9326,7 @@ SQLITE_API void *sqlite3_wal_hook( ** ^Checkpoints initiated by this mechanism are ** [sqlite3_wal_checkpoint_v2|PASSIVE]. ** -** ^Every new [database connection] defaults to having the auto-checkpoint +** ^Every new [sqlitecipher connection] defaults to having the auto-checkpoint ** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT] ** pages. The use of this interface ** is only necessary if the default setting is found to be suboptimal @@ -9335,15 +9335,15 @@ SQLITE_API void *sqlite3_wal_hook( SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N); /* -** CAPI3REF: Checkpoint a database +** CAPI3REF: Checkpoint a sqlitecipher ** METHOD: sqlite3 ** ** ^(The sqlite3_wal_checkpoint(D,X) is equivalent to ** [sqlite3_wal_checkpoint_v2](D,X,[SQLITE_CHECKPOINT_PASSIVE],0,0).)^ ** ** In brief, sqlite3_wal_checkpoint(D,X) causes the content in the -** [write-ahead log] for database X on [database connection] D to be -** transferred into the database file and for the write-ahead log to +** [write-ahead log] for sqlitecipher X on [sqlitecipher connection] D to be +** transferred into the sqlitecipher file and for the write-ahead log to ** be reset. See the [checkpointing] documentation for addition ** information. ** @@ -9357,18 +9357,18 @@ SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N); SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); /* -** CAPI3REF: Checkpoint a database +** CAPI3REF: Checkpoint a sqlitecipher ** METHOD: sqlite3 ** ** ^(The sqlite3_wal_checkpoint_v2(D,X,M,L,C) interface runs a checkpoint -** operation on database X of [database connection] D in mode M. Status +** operation on sqlitecipher X of [sqlitecipher connection] D in mode M. Status ** information is written back into integers pointed to by L and C.)^ ** ^(The M parameter must be a valid [checkpoint mode]:)^ ** **
      **
      SQLITE_CHECKPOINT_PASSIVE
      -** ^Checkpoint as many frames as possible without waiting for any database -** readers or writers to finish, then sync the database file if all frames +** ^Checkpoint as many frames as possible without waiting for any sqlitecipher +** readers or writers to finish, then sync the sqlitecipher file if all frames ** in the log were checkpointed. ^The [busy-handler callback] ** is never invoked in the SQLITE_CHECKPOINT_PASSIVE mode. ** ^On the other hand, passive mode might leave the checkpoint unfinished @@ -9377,19 +9377,19 @@ SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); **
      SQLITE_CHECKPOINT_FULL
      ** ^This mode blocks (it invokes the ** [sqlite3_busy_handler|busy-handler callback]) until there is no -** database writer and all readers are reading from the most recent database +** sqlitecipher writer and all readers are reading from the most recent sqlitecipher ** snapshot. ^It then checkpoints all frames in the log file and syncs the -** database file. ^This mode blocks new database writers while it is pending, -** but new database readers are allowed to continue unimpeded. +** sqlitecipher file. ^This mode blocks new sqlitecipher writers while it is pending, +** but new sqlitecipher readers are allowed to continue unimpeded. ** **
      SQLITE_CHECKPOINT_RESTART
      ** ^This mode works the same way as SQLITE_CHECKPOINT_FULL with the addition ** that after checkpointing the log file it blocks (calls the ** [busy-handler callback]) -** until all readers are reading from the database file only. ^This ensures +** until all readers are reading from the sqlitecipher file only. ^This ensures ** that the next writer will restart the log file from the beginning. ** ^Like SQLITE_CHECKPOINT_FULL, this mode blocks new -** database writer attempts while it is pending, but does not impede readers. +** sqlitecipher writer attempts while it is pending, but does not impede readers. ** **
      SQLITE_CHECKPOINT_TRUNCATE
      ** ^This mode works the same way as SQLITE_CHECKPOINT_RESTART with the @@ -9399,46 +9399,46 @@ SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); ** ** ^If pnLog is not NULL, then *pnLog is set to the total number of frames in ** the log file or to -1 if the checkpoint could not run because -** of an error or because the database is not in [WAL mode]. ^If pnCkpt is not +** of an error or because the sqlitecipher is not in [WAL mode]. ^If pnCkpt is not ** NULL,then *pnCkpt is set to the total number of checkpointed frames in the ** log file (including any that were already checkpointed before the function ** was called) or to -1 if the checkpoint could not run due to an error or -** because the database is not in WAL mode. ^Note that upon successful +** because the sqlitecipher is not in WAL mode. ^Note that upon successful ** completion of an SQLITE_CHECKPOINT_TRUNCATE, the log file will have been ** truncated to zero bytes and so both *pnLog and *pnCkpt will be set to zero. ** -** ^All calls obtain an exclusive "checkpoint" lock on the database file. ^If +** ^All calls obtain an exclusive "checkpoint" lock on the sqlitecipher file. ^If ** any other process is running a checkpoint operation at the same time, the ** lock cannot be obtained and SQLITE_BUSY is returned. ^Even if there is a ** busy-handler configured, it will not be invoked in this case. ** ** ^The SQLITE_CHECKPOINT_FULL, RESTART and TRUNCATE modes also obtain the -** exclusive "writer" lock on the database file. ^If the writer lock cannot be +** exclusive "writer" lock on the sqlitecipher file. ^If the writer lock cannot be ** obtained immediately, and a busy-handler is configured, it is invoked and ** the writer lock retried until either the busy-handler returns 0 or the lock ** is successfully obtained. ^The busy-handler is also invoked while waiting for -** database readers as described above. ^If the busy-handler returns 0 before -** the writer lock is obtained or while waiting for database readers, the +** sqlitecipher readers as described above. ^If the busy-handler returns 0 before +** the writer lock is obtained or while waiting for sqlitecipher readers, the ** checkpoint operation proceeds from that point in the same way as ** SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible ** without blocking any further. ^SQLITE_BUSY is returned in this case. ** ** ^If parameter zDb is NULL or points to a zero length string, then the ** specified operation is attempted on all WAL databases [attached] to -** [database connection] db. In this case the +** [sqlitecipher connection] db. In this case the ** values written to output parameters *pnLog and *pnCkpt are undefined. ^If ** an SQLITE_BUSY error is encountered when processing one or more of the ** attached WAL databases, the operation is still attempted on any remaining ** attached databases and SQLITE_BUSY is returned at the end. ^If any other -** error occurs while processing an attached database, processing is abandoned +** error occurs while processing an attached sqlitecipher, processing is abandoned ** and the error code is returned to the caller immediately. ^If no error ** (SQLITE_BUSY or otherwise) is encountered while processing the attached ** databases, SQLITE_OK is returned. ** -** ^If database zDb is the name of an attached database that is not in WAL +** ^If sqlitecipher zDb is the name of an attached sqlitecipher that is not in WAL ** mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. ^If ** zDb is not NULL (or a zero length string) and is not the name of any -** attached database, SQLITE_ERROR is returned to the caller. +** attached sqlitecipher, SQLITE_ERROR is returned to the caller. ** ** ^Unless it returns SQLITE_MISUSE, ** the sqlite3_wal_checkpoint_v2() interface @@ -9450,7 +9450,7 @@ SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb); */ SQLITE_API int sqlite3_wal_checkpoint_v2( sqlite3 *db, /* Database handle */ - const char *zDb, /* Name of attached database (or NULL) */ + const char *zDb, /* Name of attached sqlitecipher (or NULL) */ int eMode, /* SQLITE_CHECKPOINT_* value */ int *pnLog, /* OUT: Size of WAL log in frames */ int *pnCkpt /* OUT: Total number of frames checkpointed */ @@ -9481,7 +9481,7 @@ SQLITE_API int sqlite3_wal_checkpoint_v2( ** xCreate virtual table method then the behavior is undefined. ** ** In the call sqlite3_vtab_config(D,C,...) the D parameter is the -** [database connection] in which the virtual table is being created and +** [sqlitecipher connection] in which the virtual table is being created and ** which is passed in as the first argument to the [xConnect] or [xCreate] ** method that is invoking sqlite3_vtab_config(). The C parameter is one ** of the [virtual table configuration options]. The presence and meaning @@ -9516,7 +9516,7 @@ SQLITE_API int sqlite3_vtab_config(sqlite3*, int op, ...); ** that if [xUpdate] returns [SQLITE_CONSTRAINT], it will do so before ** any modifications to internal or persistent data structures have been made. ** If the [ON CONFLICT] mode is ABORT, FAIL, IGNORE or ROLLBACK, SQLite -** is able to roll back a statement or database transaction, and abandon +** is able to roll back a statement or sqlitecipher transaction, and abandon ** or continue processing the current SQL statement as appropriate. ** If the ON CONFLICT mode is REPLACE and the [xUpdate] method returns ** [SQLITE_CONSTRAINT], SQLite handles this as if the ON CONFLICT mode @@ -9991,21 +9991,21 @@ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); ** CAPI3REF: Flush caches to disk mid-transaction ** METHOD: sqlite3 ** -** ^If a write-transaction is open on [database connection] D when the +** ^If a write-transaction is open on [sqlitecipher connection] D when the ** [sqlite3_db_cacheflush(D)] interface invoked, any dirty ** pages in the pager-cache that are not currently in use are written out -** to disk. A dirty page may be in use if a database cursor created by an -** active SQL statement is reading from it, or if it is page 1 of a database +** to disk. A dirty page may be in use if a sqlitecipher cursor created by an +** active SQL statement is reading from it, or if it is page 1 of a sqlitecipher ** file (page 1 is always "in use"). ^The [sqlite3_db_cacheflush(D)] ** interface flushes caches for all schemas - "main", "temp", and ** any [attached] databases. ** -** ^If this function needs to obtain extra database locks before dirty pages +** ^If this function needs to obtain extra sqlitecipher locks before dirty pages ** can be flushed to disk, it does so. ^If those locks cannot be obtained ** immediately and there is a busy-handler callback configured, it is invoked ** in the usual manner. ^If the required lock still cannot be obtained, then -** the database is skipped and an attempt made to flush any dirty pages -** belonging to the next (if any) database. ^If any databases are skipped +** the sqlitecipher is skipped and an attempt made to flush any dirty pages +** belonging to the next (if any) sqlitecipher. ^If any databases are skipped ** because locks cannot be obtained, but no other error occurs, this ** function returns SQLITE_BUSY. ** @@ -10015,7 +10015,7 @@ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); ** ** ^Otherwise, if no error occurs, [sqlite3_db_cacheflush()] returns SQLITE_OK. ** -** ^This function does not set the database handle error code or message +** ^This function does not set the sqlitecipher handle error code or message ** returned by the [sqlite3_errcode()] and [sqlite3_errmsg()] functions. */ SQLITE_API int sqlite3_db_cacheflush(sqlite3*); @@ -10029,27 +10029,27 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*); ** ** ^The [sqlite3_preupdate_hook()] interface registers a callback function ** that is invoked prior to each [INSERT], [UPDATE], and [DELETE] operation -** on a database table. +** on a sqlitecipher table. ** ^At most one preupdate hook may be registered at a time on a single -** [database connection]; each call to [sqlite3_preupdate_hook()] overrides +** [sqlitecipher connection]; each call to [sqlite3_preupdate_hook()] overrides ** the previous setting. ** ^The preupdate hook is disabled by invoking [sqlite3_preupdate_hook()] ** with a NULL pointer as the second parameter. ** ^The third parameter to [sqlite3_preupdate_hook()] is passed through as ** the first parameter to callbacks. ** -** ^The preupdate hook only fires for changes to real database tables; the +** ^The preupdate hook only fires for changes to real sqlitecipher tables; the ** preupdate hook is not invoked for changes to [virtual tables] or to ** system tables like sqlite_sequence or sqlite_stat1. ** ** ^The second parameter to the preupdate callback is a pointer to -** the [database connection] that registered the preupdate hook. +** the [sqlitecipher connection] that registered the preupdate hook. ** ^The third parameter to the preupdate callback is one of the constants ** [SQLITE_INSERT], [SQLITE_DELETE], or [SQLITE_UPDATE] to identify the ** kind of update operation that is about to occur. ** ^(The fourth parameter to the preupdate callback is the name of the -** database within the database connection that is being modified. This -** will be "main" for the main database or "temp" for TEMP tables or +** sqlitecipher within the sqlitecipher connection that is being modified. This +** will be "main" for the main sqlitecipher or "temp" for TEMP tables or ** the name given after the AS keyword in the [ATTACH] statement for attached ** databases.)^ ** ^The fifth parameter to the preupdate callback is the name of the @@ -10070,7 +10070,7 @@ SQLITE_API int sqlite3_db_cacheflush(sqlite3*); ** provide additional information about a preupdate event. These routines ** may only be called from within a preupdate callback. Invoking any of ** these routines from outside of a preupdate callback or with a -** [database connection] pointer that is different from the one supplied +** [sqlitecipher connection] pointer that is different from the one supplied ** to the preupdate callback results in undefined and probably undesirable ** behavior. ** @@ -10151,19 +10151,19 @@ SQLITE_API int sqlite3_system_errno(sqlite3*); ** KEYWORDS: {snapshot} {sqlite3_snapshot} ** ** An instance of the snapshot object records the state of a [WAL mode] -** database for some specific point in history. +** sqlitecipher for some specific point in history. ** -** In [WAL mode], multiple [database connections] that are open on the -** same database file can each be reading a different historical version -** of the database file. When a [database connection] begins a read -** transaction, that connection sees an unchanging copy of the database +** In [WAL mode], multiple [sqlitecipher connections] that are open on the +** same sqlitecipher file can each be reading a different historical version +** of the sqlitecipher file. When a [sqlitecipher connection] begins a read +** transaction, that connection sees an unchanging copy of the sqlitecipher ** as it existed for the point in time when the transaction first started. -** Subsequent changes to the database from other connections are not seen +** Subsequent changes to the sqlitecipher from other connections are not seen ** by the reader until a new read transaction is started. ** ** The sqlite3_snapshot object records state information about an historical -** version of the database file so that it is possible to later open a new read -** transaction that sees that historical version of the database rather than +** version of the sqlitecipher file so that it is possible to later open a new read +** transaction that sees that historical version of the sqlitecipher rather than ** the most recent version. */ typedef struct sqlite3_snapshot { @@ -10176,7 +10176,7 @@ typedef struct sqlite3_snapshot { ** ** ^The [sqlite3_snapshot_get(D,S,P)] interface attempts to make a ** new [sqlite3_snapshot] object that records the current state of -** schema S in database connection D. ^On success, the +** schema S in sqlitecipher connection D. ^On success, the ** [sqlite3_snapshot_get(D,S,P)] interface writes a pointer to the newly ** created [sqlite3_snapshot] object into *P and returns SQLITE_OK. ** If there is not already a read-transaction open on schema S when @@ -10188,22 +10188,22 @@ typedef struct sqlite3_snapshot { ** in this case. ** **
        -**
      • The database handle must not be in [autocommit mode]. +**
      • The sqlitecipher handle must not be in [autocommit mode]. ** -**
      • Schema S of [database connection] D must be a [WAL mode] database. +**
      • Schema S of [sqlitecipher connection] D must be a [WAL mode] sqlitecipher. ** -**
      • There must not be a write transaction open on schema S of database +**
      • There must not be a write transaction open on schema S of sqlitecipher ** connection D. ** **
      • One or more transactions must have been written to the current wal ** file since it was created on disk (by any connection). This means -** that a snapshot cannot be taken on a wal mode database with no wal +** that a snapshot cannot be taken on a wal mode sqlitecipher with no wal ** file immediately after it is first opened. At least one transaction ** must be written to it first. **
      ** ** This function may also return SQLITE_NOMEM. If it is called with the -** database handle in autocommit mode but fails for some other reason, +** sqlitecipher handle in autocommit mode but fails for some other reason, ** whether or not a read transaction is opened on schema S is undefined. ** ** The [sqlite3_snapshot] object returned from a successful call to @@ -10225,14 +10225,14 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get( ** ** ^The [sqlite3_snapshot_open(D,S,P)] interface either starts a new read ** transaction or upgrades an existing one for schema S of -** [database connection] D such that the read transaction refers to +** [sqlitecipher connection] D such that the read transaction refers to ** historical [snapshot] P, rather than the most recent change to the -** database. ^The [sqlite3_snapshot_open()] interface returns SQLITE_OK +** sqlitecipher. ^The [sqlite3_snapshot_open()] interface returns SQLITE_OK ** on success or an appropriate [error code] if it fails. ** -** ^In order to succeed, the database connection must not be in +** ^In order to succeed, the sqlitecipher connection must not be in ** [autocommit mode] when [sqlite3_snapshot_open(D,S,P)] is called. If there -** is already a read transaction open on schema S, then the database handle +** is already a read transaction open on schema S, then the sqlitecipher handle ** must have no active statements (SELECT statements that have been passed ** to sqlite3_step() but not sqlite3_reset() or sqlite3_finalize()). ** SQLITE_ERROR is returned if either of these conditions is violated, or @@ -10244,20 +10244,20 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_get( ** ** If there is already a read transaction open when this function is ** invoked, then the same read transaction remains open (on the same -** database snapshot) if SQLITE_ERROR, SQLITE_BUSY or SQLITE_ERROR_SNAPSHOT +** sqlitecipher snapshot) if SQLITE_ERROR, SQLITE_BUSY or SQLITE_ERROR_SNAPSHOT ** is returned. If another error code - for example SQLITE_PROTOCOL or an ** SQLITE_IOERR error code - is returned, then the final state of the ** read transaction is undefined. If SQLITE_OK is returned, then the -** read transaction is now open on database snapshot P. +** read transaction is now open on sqlitecipher snapshot P. ** ** ^(A call to [sqlite3_snapshot_open(D,S,P)] will fail if the -** database connection D does not know that the database file for -** schema S is in [WAL mode]. A database connection might not know -** that the database file is in [WAL mode] if there has been no prior -** I/O on that database connection, or if the database entered [WAL mode] -** after the most recent I/O on the database connection.)^ +** sqlitecipher connection D does not know that the sqlitecipher file for +** schema S is in [WAL mode]. A sqlitecipher connection might not know +** that the sqlitecipher file is in [WAL mode] if there has been no prior +** I/O on that sqlitecipher connection, or if the sqlitecipher entered [WAL mode] +** after the most recent I/O on the sqlitecipher connection.)^ ** (Hint: Run "[PRAGMA application_id]" against a newly opened -** database connection in order to make it ready to use snapshots.) +** sqlitecipher connection in order to make it ready to use snapshots.) ** ** The [sqlite3_snapshot_open()] interface is only available when the ** [SQLITE_ENABLE_SNAPSHOT] compile-time option is used. @@ -10288,19 +10288,19 @@ SQLITE_API SQLITE_EXPERIMENTAL void sqlite3_snapshot_free(sqlite3_snapshot*); ** The sqlite3_snapshot_cmp(P1, P2) interface is used to compare the ages ** of two valid snapshot handles. ** -** If the two snapshot handles are not associated with the same database +** If the two snapshot handles are not associated with the same sqlitecipher ** file, the result of the comparison is undefined. ** ** Additionally, the result of the comparison is only valid if both of the ** snapshot handles were obtained by calling sqlite3_snapshot_get() since the ** last time the wal file was deleted. The wal file is deleted when the -** database is changed back to rollback mode or when the number of database +** sqlitecipher is changed back to rollback mode or when the number of sqlitecipher ** clients drops to zero. If either snapshot handle was obtained before the ** wal file was last deleted, the value returned by this function ** is undefined. ** ** Otherwise, this API returns a negative value if P1 refers to an older -** snapshot than P2, zero if the two handles refer to the same database +** snapshot than P2, zero if the two handles refer to the same sqlitecipher ** snapshot, and a positive value if P1 is a newer snapshot than P2. ** ** This interface is only available if SQLite is compiled with the @@ -10315,19 +10315,19 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp( ** CAPI3REF: Recover snapshots from a wal file ** METHOD: sqlite3_snapshot ** -** If a [WAL file] remains on disk after all database connections close +** If a [WAL file] remains on disk after all sqlitecipher connections close ** (either through the use of the [SQLITE_FCNTL_PERSIST_WAL] [file control] -** or because the last process to have the database opened exited without +** or because the last process to have the sqlitecipher opened exited without ** calling [sqlite3_close()]) and a new connection is subsequently opened -** on that database and [WAL file], the [sqlite3_snapshot_open()] interface +** on that sqlitecipher and [WAL file], the [sqlite3_snapshot_open()] interface ** will only be able to open the last transaction added to the WAL file ** even though the WAL file contains other valid transactions. ** -** This function attempts to scan the WAL file associated with database zDb -** of database handle db and make all valid snapshots available to +** This function attempts to scan the WAL file associated with sqlitecipher zDb +** of sqlitecipher handle db and make all valid snapshots available to ** sqlite3_snapshot_open(). It is an error if there is already a read -** transaction open on the database, or if the database is not a WAL mode -** database. +** transaction open on the sqlitecipher, or if the sqlitecipher is not a WAL mode +** sqlitecipher. ** ** SQLITE_OK is returned if successful, or an SQLite error code otherwise. ** @@ -10337,33 +10337,33 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_cmp( SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const char *zDb); /* -** CAPI3REF: Serialize a database +** CAPI3REF: Serialize a sqlitecipher ** ** The sqlite3_serialize(D,S,P,F) interface returns a pointer to memory -** that is a serialization of the S database on [database connection] D. -** If P is not a NULL pointer, then the size of the database in bytes +** that is a serialization of the S sqlitecipher on [sqlitecipher connection] D. +** If P is not a NULL pointer, then the size of the sqlitecipher in bytes ** is written into *P. ** -** For an ordinary on-disk database file, the serialization is just a -** copy of the disk file. For an in-memory database or a "TEMP" database, +** For an ordinary on-disk sqlitecipher file, the serialization is just a +** copy of the disk file. For an in-memory sqlitecipher or a "TEMP" sqlitecipher, ** the serialization is the same sequence of bytes which would be written -** to disk if that database where backed up to disk. +** to disk if that sqlitecipher where backed up to disk. ** ** The usual case is that sqlite3_serialize() copies the serialization of -** the database into memory obtained from [sqlite3_malloc64()] and returns +** the sqlitecipher into memory obtained from [sqlite3_malloc64()] and returns ** a pointer to that memory. The caller is responsible for freeing the ** returned value to avoid a memory leak. However, if the F argument ** contains the SQLITE_SERIALIZE_NOCOPY bit, then no memory allocations ** are made, and the sqlite3_serialize() function will return a pointer -** to the contiguous memory representation of the database that SQLite -** is currently using for that database, or NULL if the no such contiguous -** memory representation of the database exists. A contiguous memory -** representation of the database will usually only exist if there has +** to the contiguous memory representation of the sqlitecipher that SQLite +** is currently using for that sqlitecipher, or NULL if the no such contiguous +** memory representation of the sqlitecipher exists. A contiguous memory +** representation of the sqlitecipher will usually only exist if there has ** been a prior call to [sqlite3_deserialize(D,S,...)] with the same ** values of D and S. -** The size of the database is written into *P even if the +** The size of the sqlitecipher is written into *P even if the ** SQLITE_SERIALIZE_NOCOPY bit is set but no contiguous copy -** of the database exists. +** of the sqlitecipher exists. ** ** A call to sqlite3_serialize(D,S,P,F) might return NULL even if the ** SQLITE_SERIALIZE_NOCOPY bit is omitted from argument F if a memory @@ -10373,7 +10373,7 @@ SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_snapshot_recover(sqlite3 *db, const c ** [SQLITE_OMIT_DESERIALIZE] option. */ SQLITE_API unsigned char *sqlite3_serialize( - sqlite3 *db, /* The database connection */ + sqlite3 *db, /* The sqlitecipher connection */ const char *zSchema, /* Which DB to serialize. ex: "main", "temp", ... */ sqlite3_int64 *piSize, /* Write size of the DB here, if not NULL */ unsigned int mFlags /* Zero or more SQLITE_SERIALIZE_* flags */ @@ -10386,38 +10386,38 @@ SQLITE_API unsigned char *sqlite3_serialize( ** the F argument to [sqlite3_serialize(D,S,P,F)]. ** ** SQLITE_SERIALIZE_NOCOPY means that [sqlite3_serialize()] will return -** a pointer to contiguous in-memory database that it is currently using, -** without making a copy of the database. If SQLite is not currently using -** a contiguous in-memory database, then this option causes +** a pointer to contiguous in-memory sqlitecipher that it is currently using, +** without making a copy of the sqlitecipher. If SQLite is not currently using +** a contiguous in-memory sqlitecipher, then this option causes ** [sqlite3_serialize()] to return a NULL pointer. SQLite will only be -** using a contiguous in-memory database if it has been initialized by a +** using a contiguous in-memory sqlitecipher if it has been initialized by a ** prior call to [sqlite3_deserialize()]. */ #define SQLITE_SERIALIZE_NOCOPY 0x001 /* Do no memory allocations */ /* -** CAPI3REF: Deserialize a database +** CAPI3REF: Deserialize a sqlitecipher ** ** The sqlite3_deserialize(D,S,P,N,M,F) interface causes the -** [database connection] D to disconnect from database S and then -** reopen S as an in-memory database based on the serialization contained -** in P. The serialized database P is N bytes in size. M is the size of +** [sqlitecipher connection] D to disconnect from sqlitecipher S and then +** reopen S as an in-memory sqlitecipher based on the serialization contained +** in P. The serialized sqlitecipher P is N bytes in size. M is the size of ** the buffer P, which might be larger than N. If M is larger than N, and ** the SQLITE_DESERIALIZE_READONLY bit is not set in F, then SQLite is -** permitted to add content to the in-memory database as long as the total +** permitted to add content to the in-memory sqlitecipher as long as the total ** size does not exceed M bytes. ** ** If the SQLITE_DESERIALIZE_FREEONCLOSE bit is set in F, then SQLite will -** invoke sqlite3_free() on the serialization buffer when the database +** invoke sqlite3_free() on the serialization buffer when the sqlitecipher ** connection closes. If the SQLITE_DESERIALIZE_RESIZEABLE bit is set, then ** SQLite will try to increase the buffer size using sqlite3_realloc64() -** if writes on the database cause it to grow larger than M bytes. +** if writes on the sqlitecipher cause it to grow larger than M bytes. ** ** The sqlite3_deserialize() interface will fail with SQLITE_BUSY if the -** database is currently in a read transaction or is involved in a backup +** sqlitecipher is currently in a read transaction or is involved in a backup ** operation. ** -** It is not possible to deserialized into the TEMP database. If the +** It is not possible to deserialized into the TEMP sqlitecipher. If the ** S argument to sqlite3_deserialize(D,S,P,N,M,F) is "temp" then the ** function returns SQLITE_ERROR. ** @@ -10429,9 +10429,9 @@ SQLITE_API unsigned char *sqlite3_serialize( ** [SQLITE_OMIT_DESERIALIZE] option. */ SQLITE_API int sqlite3_deserialize( - sqlite3 *db, /* The database connection */ + sqlite3 *db, /* The sqlitecipher connection */ const char *zSchema, /* Which DB to reopen with the deserialization */ - unsigned char *pData, /* The serialized database content */ + unsigned char *pData, /* The serialized sqlitecipher content */ sqlite3_int64 szDb, /* Number bytes in the deserialization */ sqlite3_int64 szBuf, /* Total size of buffer pData[] */ unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */ @@ -10443,19 +10443,19 @@ SQLITE_API int sqlite3_deserialize( ** The following are allowed values for 6th argument (the F argument) to ** the [sqlite3_deserialize(D,S,P,N,M,F)] interface. ** -** The SQLITE_DESERIALIZE_FREEONCLOSE means that the database serialization +** The SQLITE_DESERIALIZE_FREEONCLOSE means that the sqlitecipher serialization ** in the P argument is held in memory obtained from [sqlite3_malloc64()] ** and that SQLite should take ownership of this memory and automatically ** free it when it has finished using it. Without this flag, the caller ** is responsible for freeing any dynamically allocated memory. ** ** The SQLITE_DESERIALIZE_RESIZEABLE flag means that SQLite is allowed to -** grow the size of the database using calls to [sqlite3_realloc64()]. This +** grow the size of the sqlitecipher using calls to [sqlite3_realloc64()]. This ** flag should only be used if SQLITE_DESERIALIZE_FREEONCLOSE is also used. -** Without this flag, the deserialized database cannot increase in size beyond +** Without this flag, the deserialized sqlitecipher cannot increase in size beyond ** the number of bytes specified by the M parameter. ** -** The SQLITE_DESERIALIZE_READONLY flag means that the deserialized database +** The SQLITE_DESERIALIZE_READONLY flag means that the deserialized sqlitecipher ** should be treated as read-only. */ #define SQLITE_DESERIALIZE_FREEONCLOSE 1 /* Call sqlite3_free() on close */ @@ -10611,7 +10611,7 @@ extern "C" { ** CAPI3REF: Session Object Handle ** ** An instance of this object is a [session] that can be used to -** record changes to a database. +** record changes to a sqlitecipher. */ typedef struct sqlite3_session sqlite3_session; @@ -10627,32 +10627,32 @@ typedef struct sqlite3_changeset_iter sqlite3_changeset_iter; ** CAPI3REF: Create A New Session Object ** CONSTRUCTOR: sqlite3_session ** -** Create a new session object attached to database handle db. If successful, +** Create a new session object attached to sqlitecipher handle db. If successful, ** a pointer to the new object is written to *ppSession and SQLITE_OK is ** returned. If an error occurs, *ppSession is set to NULL and an SQLite ** error code (e.g. SQLITE_NOMEM) is returned. ** ** It is possible to create multiple session objects attached to a single -** database handle. +** sqlitecipher handle. ** ** Session objects created using this function should be deleted using the -** [sqlite3session_delete()] function before the database handle that they -** are attached to is itself closed. If the database handle is closed before +** [sqlite3session_delete()] function before the sqlitecipher handle that they +** are attached to is itself closed. If the sqlitecipher handle is closed before ** the session object is deleted, then the results of calling any session ** module function, including [sqlite3session_delete()] on the session object ** are undefined. ** ** Because the session module uses the [sqlite3_preupdate_hook()] API, it ** is not possible for an application to register a pre-update hook on a -** database handle that has one or more session objects attached. Nor is -** it possible to create a session object attached to a database handle for +** sqlitecipher handle that has one or more session objects attached. Nor is +** it possible to create a session object attached to a sqlitecipher handle for ** which a pre-update hook is already defined. The results of attempting ** either of these things are undefined. ** ** The session object will be used to create changesets for tables in -** database zDb, where zDb is either "main", or "temp", or the name of an -** attached database. It is not an error if database zDb is not attached -** to the database when the session object is created. +** sqlitecipher zDb, where zDb is either "main", or "temp", or the name of an +** attached sqlitecipher. It is not an error if sqlitecipher zDb is not attached +** to the sqlitecipher when the session object is created. */ SQLITE_API int sqlite3session_create( sqlite3 *db, /* Database handle */ @@ -10669,7 +10669,7 @@ SQLITE_API int sqlite3session_create( ** results of attempting to use pSession with any other session module ** function are undefined. ** -** Session objects must be deleted before the database handle to which they +** Session objects must be deleted before the sqlitecipher handle to which they ** are attached is closed. Refer to the documentation for ** [sqlite3session_create()] for details. */ @@ -10713,7 +10713,7 @@ SQLITE_API int sqlite3session_object_config(sqlite3_session*, int op, void *pArg ** METHOD: sqlite3_session ** ** Enable or disable the recording of changes by a session object. When -** enabled, a session object records changes made to the database. When +** enabled, a session object records changes made to the sqlitecipher. When ** disabled - it does not. A newly created session object is enabled. ** Refer to the documentation for [sqlite3session_changeset()] for further ** details regarding how enabling and disabling a session object affects @@ -10768,7 +10768,7 @@ SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect) ** documentation for [sqlite3session_changeset()] for further details. ** ** Or, if argument zTab is NULL, then changes are recorded for all tables -** in the database. If additional tables are added to the database (by +** in the sqlitecipher. If additional tables are added to the sqlitecipher (by ** executing "CREATE TABLE" statements) after this call is made, changes for ** the new tables are also recorded. ** @@ -10777,7 +10777,7 @@ SQLITE_API int sqlite3session_indirect(sqlite3_session *pSession, int bIndirect) ** PRIMARY KEY is an "INTEGER PRIMARY KEY" (rowid alias) or not. The PRIMARY ** KEY may consist of a single column, or may be a composite key. ** -** It is not an error if the named table does not exist in the database. Nor +** It is not an error if the named table does not exist in the sqlitecipher. Nor ** is it an error if the named table does not have a PRIMARY KEY. However, ** no changes will be recorded in either of these scenarios. ** @@ -10853,10 +10853,10 @@ SQLITE_API void sqlite3session_table_filter( ** ** A changeset consists of zero or more INSERT, UPDATE and/or DELETE changes, ** each representing a change to a single row of an attached table. An INSERT -** change contains the values of each field of a new database row. A DELETE -** contains the original values of each field of a deleted database row. An +** change contains the values of each field of a new sqlitecipher row. A DELETE +** contains the original values of each field of a deleted sqlitecipher row. An ** UPDATE change contains the original values of each field of an updated -** database row along with the updated values for each updated non-primary-key +** sqlitecipher row along with the updated values for each updated non-primary-key ** column. It is not possible for an UPDATE change to represent a change that ** modifies the values of primary key columns. If such a change is made, it ** is represented in a changeset as a DELETE followed by an INSERT. @@ -10873,12 +10873,12 @@ SQLITE_API void sqlite3session_table_filter( ** ** The contents of a changeset may be traversed using an iterator created ** using the [sqlite3changeset_start()] API. A changeset may be applied to -** a database with a compatible schema using the [sqlite3changeset_apply()] +** a sqlitecipher with a compatible schema using the [sqlite3changeset_apply()] ** API. ** ** Within a changeset generated by this function, all changes related to a ** single table are grouped together. In other words, when iterating through -** a changeset or when applying a changeset to a database, all changes related +** a changeset or when applying a changeset to a sqlitecipher, all changes related ** to a single table are processed before moving on to the next table. Tables ** are sorted in the same order in which they were attached (or auto-attached) ** to the sqlite3_session object. The order in which the changes related to @@ -10908,22 +10908,22 @@ SQLITE_API void sqlite3session_table_filter( ** or updates a record). ** ** When this function is called, the requested changeset is created using -** both the accumulated records and the current contents of the database +** both the accumulated records and the current contents of the sqlitecipher ** file. Specifically: ** **
        -**
      • For each record generated by an insert, the database is queried +**
      • For each record generated by an insert, the sqlitecipher is queried ** for a row with a matching primary key. If one is found, an INSERT ** change is added to the changeset. If no such row is found, no change ** is added to the changeset. ** -**
      • For each record generated by an update or delete, the database is +**
      • For each record generated by an update or delete, the sqlitecipher is ** queried for a row with a matching primary key. If such a row is ** found and one or more of the non-primary key fields have been ** modified from their original values, an UPDATE change is added to ** the changeset. Or, if no such row is found in the table, a DELETE ** change is added to the changeset. If there is a row with a matching -** primary key in the database, but all fields contain their original +** primary key in the sqlitecipher, but all fields contain their original ** values, no change is added to the changeset. **
      ** @@ -10977,8 +10977,8 @@ SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession ** does not have a primary key, this function is a no-op (but does not return ** an error). ** -** Argument zFromDb must be the name of a database ("main", "temp" etc.) -** attached to the same database handle as the session object that contains +** Argument zFromDb must be the name of a sqlitecipher ("main", "temp" etc.) +** attached to the same sqlitecipher handle as the session object that contains ** a table compatible with the table attached to the session by this function. ** A table is considered compatible if it: ** @@ -10994,7 +10994,7 @@ SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession ** APIs, tables without PRIMARY KEYs are simply ignored. ** ** This function adds a set of changes to the session object that could be -** used to update the table in database zFrom (call this the "from-table") +** used to update the table in sqlitecipher zFrom (call this the "from-table") ** so that its content is the same as the table attached to the session ** object (call this the "to-table"). Specifically: ** @@ -11012,10 +11012,10 @@ SQLITE_API sqlite3_int64 sqlite3session_changeset_size(sqlite3_session *pSession ** ** To clarify, if this function is called and then a changeset constructed ** using [sqlite3session_changeset()], then after applying that changeset to -** database zFrom the contents of the two compatible tables would be +** sqlitecipher zFrom the contents of the two compatible tables would be ** identical. ** -** It an error if database zFrom does not exist or does not contain the +** It an error if sqlitecipher zFrom does not exist or does not contain the ** required compatible table. ** ** If the operation is successful, SQLITE_OK is returned. Otherwise, an SQLite @@ -11356,7 +11356,7 @@ SQLITE_API int sqlite3changeset_conflict( ** This function may only be called with an iterator passed to an ** SQLITE_CHANGESET_FOREIGN_KEY conflict handler callback. In this case ** it sets the output variable to the total number of known foreign key -** violations in the destination database and returns SQLITE_OK. +** violations in the destination sqlitecipher and returns SQLITE_OK. ** ** In all other cases this function returns SQLITE_MISUSE. */ @@ -11402,7 +11402,7 @@ SQLITE_API int sqlite3changeset_finalize(sqlite3_changeset_iter *pIter); ** CAPI3REF: Invert A Changeset ** ** This function is used to "invert" a changeset object. Applying an inverted -** changeset to a database reverses the effects of applying the uninverted +** changeset to a sqlitecipher reverses the effects of applying the uninverted ** changeset. Specifically: ** **
        @@ -11631,8 +11631,8 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*); /* ** CAPI3REF: Apply A Changeset To A Database ** -** Apply a changeset or patchset to a database. These functions attempt to -** update the "main" database attached to handle db with the changes found in +** Apply a changeset or patchset to a sqlitecipher. These functions attempt to +** update the "main" sqlitecipher attached to handle db with the changes found in ** the changeset passed via the second and third arguments. ** ** The fourth argument (xFilter) passed to these functions is the "filter @@ -11645,7 +11645,7 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*); ** is NULL, all changes related to the table are attempted. ** ** For each table that is not excluded by the filter callback, this function -** tests that the target database contains a compatible table. A table is +** tests that the target sqlitecipher contains a compatible table. A table is ** considered compatible if all of the following are true: ** **
          @@ -11687,22 +11687,22 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*); ** **
          **
          DELETE Changes
          -** For each DELETE change, the function checks if the target database +** For each DELETE change, the function checks if the target sqlitecipher ** contains a row with the same primary key value (or values) as the ** original row values stored in the changeset. If it does, and the values ** stored in all non-primary key columns also match the values stored in -** the changeset the row is deleted from the target database. +** the changeset the row is deleted from the target sqlitecipher. ** ** If a row with matching primary key values is found, but one or more of ** the non-primary key fields contains a value different from the original ** row value stored in the changeset, the conflict-handler function is ** invoked with [SQLITE_CHANGESET_DATA] as the second argument. If the -** database table has more columns than are recorded in the changeset, +** sqlitecipher table has more columns than are recorded in the changeset, ** only the values of those non-primary key fields are compared against -** the current database contents - any trailing database table columns +** the current sqlitecipher contents - any trailing sqlitecipher table columns ** are ignored. ** -** If no row with matching primary key values is found in the database, +** If no row with matching primary key values is found in the sqlitecipher, ** the conflict-handler function is invoked with [SQLITE_CHANGESET_NOTFOUND] ** passed as the second argument. ** @@ -11715,11 +11715,11 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*); ** **
          INSERT Changes
          ** For each INSERT change, an attempt is made to insert the new row into -** the database. If the changeset row contains fewer fields than the -** database table, the trailing fields are populated with their default +** the sqlitecipher. If the changeset row contains fewer fields than the +** sqlitecipher table, the trailing fields are populated with their default ** values. ** -** If the attempt to insert the row fails because the database already +** If the attempt to insert the row fails because the sqlitecipher already ** contains a row with the same primary key values, the conflict handler ** function is invoked with the second argument set to ** [SQLITE_CHANGESET_CONFLICT]. @@ -11732,11 +11732,11 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*); ** [SQLITE_CHANGESET_REPLACE]. ** **
          UPDATE Changes
          -** For each UPDATE change, the function checks if the target database +** For each UPDATE change, the function checks if the target sqlitecipher ** contains a row with the same primary key value (or values) as the ** original row values stored in the changeset. If it does, and the values ** stored in all modified non-primary key columns also match the values -** stored in the changeset the row is updated within the target database. +** stored in the changeset the row is updated within the target sqlitecipher. ** ** If a row with matching primary key values is found, but one or more of ** the modified non-primary key fields contains a value different from an @@ -11746,7 +11746,7 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*); ** to be modified, only those fields need to match the original values to ** avoid the SQLITE_CHANGESET_DATA conflict-handler callback. ** -** If no row with matching primary key values is found in the database, +** If no row with matching primary key values is found in the sqlitecipher, ** the conflict-handler function is invoked with [SQLITE_CHANGESET_NOTFOUND] ** passed as the second argument. ** @@ -11765,8 +11765,8 @@ SQLITE_API void sqlite3changegroup_delete(sqlite3_changegroup*); ** ** All changes made by these functions are enclosed in a savepoint transaction. ** If any other error (aside from a constraint failure when attempting to -** write to the target database) occurs, then the savepoint transaction is -** rolled back, restoring the target database to its original state, and an +** write to the target sqlitecipher) occurs, then the savepoint transaction is +** rolled back, restoring the target sqlitecipher to its original state, and an ** SQLite error code returned. ** ** If the output parameters (ppRebase) and (pnRebase) are non-NULL and @@ -11852,17 +11852,17 @@ SQLITE_API int sqlite3changeset_apply_v2( **
          SQLITE_CHANGESET_DATA
          ** The conflict handler is invoked with CHANGESET_DATA as the second argument ** when processing a DELETE or UPDATE change if a row with the required -** PRIMARY KEY fields is present in the database, but one or more other +** PRIMARY KEY fields is present in the sqlitecipher, but one or more other ** (non primary-key) fields modified by the update do not contain the ** expected "before" values. ** -** The conflicting row, in this case, is the database row with the matching +** The conflicting row, in this case, is the sqlitecipher row with the matching ** primary key. ** **
          SQLITE_CHANGESET_NOTFOUND
          ** The conflict handler is invoked with CHANGESET_NOTFOUND as the second ** argument when processing a DELETE or UPDATE change if a row with the -** required PRIMARY KEY fields is not present in the database. +** required PRIMARY KEY fields is not present in the sqlitecipher. ** ** There is no conflicting row in this case. The results of invoking the ** sqlite3changeset_conflict() API are undefined. @@ -11872,12 +11872,12 @@ SQLITE_API int sqlite3changeset_apply_v2( ** handler while processing an INSERT change if the operation would result ** in duplicate primary key values. ** -** The conflicting row in this case is the database row with the matching +** The conflicting row in this case is the sqlitecipher row with the matching ** primary key. ** **
          SQLITE_CHANGESET_FOREIGN_KEY
          ** If foreign key handling is enabled, and applying a changeset leaves the -** database in a state containing foreign key violations, the conflict +** sqlitecipher in a state containing foreign key violations, the conflict ** handler is invoked with CHANGESET_FOREIGN_KEY as the second argument ** exactly once before the changeset is committed. If the conflict handler ** returns CHANGESET_OMIT, the changes, including those that caused the @@ -11926,9 +11926,9 @@ SQLITE_API int sqlite3changeset_apply_v2( ** on the type of change. ** ** If CHANGESET_REPLACE is returned by an SQLITE_CHANGESET_CONFLICT conflict -** handler, then the conflicting row is removed from the database and a +** handler, then the conflicting row is removed from the sqlitecipher and a ** second attempt to apply the change is made. If this second attempt fails, -** the original row is restored to the database before continuing. +** the original row is restored to the sqlitecipher before continuing. ** **
          SQLITE_CHANGESET_ABORT
          ** If this value is returned, any changes applied so far are rolled back @@ -11943,11 +11943,11 @@ SQLITE_API int sqlite3changeset_apply_v2( ** CAPI3REF: Rebasing changesets ** EXPERIMENTAL ** -** Suppose there is a site hosting a database in state S0. And that -** modifications are made that move that database to state S1 and a +** Suppose there is a site hosting a sqlitecipher in state S0. And that +** modifications are made that move that sqlitecipher to state S1 and a ** changeset recorded (the "local" changeset). Then, a changeset based ** on S0 is received from another site (the "remote" changeset) and -** applied to the database. The database is then in state +** applied to the sqlitecipher. The sqlitecipher is then in state ** (S1+"remote"), where the exact state depends on any conflict ** resolution decisions (OMIT or REPLACE) made while applying "remote". ** Rebasing a changeset is to update it to take those conflict @@ -12020,7 +12020,7 @@ SQLITE_API int sqlite3changeset_apply_v2( ** OMIT. ** ** In order to rebase a local changeset, the remote changeset must first -** be applied to the local database using sqlite3changeset_apply_v2() and +** be applied to the local sqlitecipher using sqlite3changeset_apply_v2() and ** the buffer of rebase information captured. Then: ** **
            @@ -12682,7 +12682,7 @@ struct Fts5ExtensionApi { **
          1. FTS5_TOKENIZE_AUX - The tokenizer is being invoked to ** satisfy an fts5_api.xTokenize() request made by an auxiliary ** function. Or an fts5_api.xColumnSize() request made by the same -** on a columnsize=0 database. +** on a columnsize=0 sqlitecipher. **
        ** ** For each token in the input string, the supplied callback xToken() must @@ -12799,7 +12799,7 @@ struct Fts5ExtensionApi { ** because the index contains entries for both "first" and "1st", prefix ** queries such as 'fi*' or '1s*' will match correctly. However, because ** extra entries are added to the FTS index, this method uses more space -** within the database. +** within the sqlitecipher. ** ** Method (2) offers a midpoint between (1) and (3). Using this method, ** a query such as '1s*' will match documents that contain the literal diff --git a/srcs/database/include/sqlite3ext.h b/srcs/libs/include/sqlite3/sqlite3ext.h similarity index 99% rename from srcs/database/include/sqlite3ext.h rename to srcs/libs/include/sqlite3/sqlite3ext.h index 2cdd0e4..5b2fc3c 100644 --- a/srcs/database/include/sqlite3ext.h +++ b/srcs/libs/include/sqlite3/sqlite3ext.h @@ -364,7 +364,7 @@ struct sqlite3_api_routines { ** is also defined in the file "loadext.c". */ typedef int (*sqlite3_loadext_entry)( - sqlite3 *db, /* Handle to the database. */ + sqlite3 *db, /* Handle to the sqlitecipher. */ char **pzErrMsg, /* Used to set error string on failure. */ const sqlite3_api_routines *pThunk /* Extension API function pointers. */ ); diff --git a/srcs/lwip/src/include/netif/bridgeif.h b/srcs/lwip/src/include/netif/bridgeif.h index f4f8cf1..ab21146 100644 --- a/srcs/lwip/src/include/netif/bridgeif.h +++ b/srcs/lwip/src/include/netif/bridgeif.h @@ -73,7 +73,7 @@ typedef struct bridgeif_initdata_s { /** Maximum number of ports in the bridge (ports are stored in an array, this influences memory allocated for netif->state of the bridge netif). */ u8_t max_ports; - /** Maximum number of dynamic/learning entries in the bridge's forwarding database. + /** Maximum number of dynamic/learning entries in the bridge's forwarding sqlitecipher. In the default implementation, this controls memory consumption only. */ u16_t max_fdb_dynamic_entries; /** Maximum number of static forwarding entries. Influences memory consumption! */ diff --git a/srcs/lwip/src/include/netif/ppp/ppp.h b/srcs/lwip/src/include/netif/ppp/ppp.h index 3d73c36..aff8364 100644 --- a/srcs/lwip/src/include/netif/ppp/ppp.h +++ b/srcs/lwip/src/include/netif/ppp/ppp.h @@ -440,7 +440,7 @@ struct ppp_pcb_s { * RFC 1994 says: * * In practice, within or associated with each PPP server, there is a - * database which associates "user" names with authentication + * sqlitecipher which associates "user" names with authentication * information ("secrets"). It is not anticipated that a particular * named user would be authenticated by multiple methods. This would * make the user vulnerable to attacks which negotiate the least secure diff --git a/srcs/lwip/src/netif/bridgeif.c b/srcs/lwip/src/netif/bridgeif.c index 8a97bce..aea5b71 100644 --- a/srcs/lwip/src/netif/bridgeif.c +++ b/srcs/lwip/src/netif/bridgeif.c @@ -124,7 +124,7 @@ u8_t bridgeif_netif_client_id = 0xff; /** * @ingroup bridgeif - * Add a static entry to the forwarding database. + * Add a static entry to the forwarding sqlitecipher. * A static entry marks where frames to a specific eth address (unicast or group address) are * forwarded. * bits [0..(BRIDGEIF_MAX_PORTS-1)]: hw ports @@ -162,7 +162,7 @@ bridgeif_fdb_add(struct netif *bridgeif, const struct eth_addr *addr, bridgeif_p /** * @ingroup bridgeif - * Remove a static entry from the forwarding database + * Remove a static entry from the forwarding sqlitecipher */ err_t bridgeif_fdb_remove(struct netif *bridgeif, const struct eth_addr *addr) diff --git a/srcs/lwip/src/netif/bridgeif_fdb.c b/srcs/lwip/src/netif/bridgeif_fdb.c index 6739fc2..ec9d96e 100644 --- a/srcs/lwip/src/netif/bridgeif_fdb.c +++ b/srcs/lwip/src/netif/bridgeif_fdb.c @@ -65,7 +65,7 @@ typedef struct bridgeif_dfdb_s { /** * @ingroup bridgeif_fdb - * A real simple and slow implementation of an auto-learning forwarding database that + * A real simple and slow implementation of an auto-learning forwarding sqlitecipher that * remembers known src mac addresses to know which port to send frames destined for that * mac address. * diff --git a/srcs/lwip/src/netif/ppp/auth.c b/srcs/lwip/src/netif/ppp/auth.c index c8673ad..dfc6e78 100644 --- a/srcs/lwip/src/netif/ppp/auth.c +++ b/srcs/lwip/src/netif/ppp/auth.c @@ -381,7 +381,7 @@ option_t auth_options[] = { &explicit_remote, MAXNAMELEN }, { "login", o_bool, &uselogin, - "Use system password database for PAP", OPT_A2COPY | 1 , + "Use system password sqlitecipher for PAP", OPT_A2COPY | 1 , &session_mgmt }, { "enable-session", o_bool, &session_mgmt, "Enable session accounting for remote peers", OPT_PRIV | 1 }, @@ -1546,7 +1546,7 @@ auth_reset(unit) /* * check_passwd - Check the user name and passwd against the PAP secrets - * file. If requested, also check against the system password database, + * file. If requested, also check against the system password sqlitecipher, * and login the user if OK. * * returns: @@ -1618,7 +1618,7 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg) } else { /* * If the secret is "@login", it means to check - * the password against the login database. + * the password against the login sqlitecipher. */ int login_secret = strcmp(secret, "@login") == 0; ret = UPAP_AUTHACK; diff --git a/srcs/lwip/src/netif/ppp/eap.c b/srcs/lwip/src/netif/ppp/eap.c index 8fb5636..20889a6 100644 --- a/srcs/lwip/src/netif/ppp/eap.c +++ b/srcs/lwip/src/netif/ppp/eap.c @@ -511,7 +511,7 @@ static void eap_figure_next_state(ppp_pcb *pcb, int status) { break; } } - /* Look up user in secrets database. */ + /* Look up user in secrets sqlitecipher. */ if (get_srp_secret(pcb->eap.es_unit, pcb->eap.es_server.ea_peer, pcb->eap.es_server.ea_name, (char *)secbuf, 1) != 0) { /* Set up default in case SRP entry is bad */ diff --git a/srcs/lwip/src/netif/ppp/multilink.c b/srcs/lwip/src/netif/ppp/multilink.c index 62014e8..4fbf011 100644 --- a/srcs/lwip/src/netif/ppp/multilink.c +++ b/srcs/lwip/src/netif/ppp/multilink.c @@ -204,7 +204,7 @@ mp_join_bundle() } /* - * Check if the bundle ID is already in the database. + * Check if the bundle ID is already in the sqlitecipher. */ unit = -1; lock_db();