--- lbbs/include/database.h 2005/05/06 15:48:44 1.3 +++ lbbs/include/database.h 2025/11/16 11:06:06 1.12 @@ -1,25 +1,33 @@ -/*************************************************************************** - database.h - description - ------------------- - begin : Mon Oct 18 2004 - copyright : (C) 2004 by Leaflet - email : leaflet@leafok.com - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +/* SPDX-License-Identifier: GPL-3.0-or-later */ +/* + * database + * - configuration and function of DB connection + * + * Copyright (C) 2004-2025 Leaflet + */ #ifndef _DATABASE_H_ #define _DATABASE_H_ #include -extern MYSQL *db_open (); +enum database_constant_t +{ + SQL_BUFFER_LEN = 10240, + DB_host_max_len = 256, + DB_username_max_len = 50, + DB_password_max_len = 50, + DB_database_max_len = 50, + DB_timezone_max_len = 50, +}; + +// Database +extern char DB_host[DB_host_max_len + 1]; +extern char DB_username[DB_username_max_len + 1]; +extern char DB_password[DB_password_max_len + 1]; +extern char DB_database[DB_database_max_len + 1]; +extern char DB_timezone[DB_timezone_max_len + 1]; + +extern MYSQL *db_open(); #endif //_DATABASE_H_