WHY2/include/chat/config.h

47 lines
1.8 KiB
C
Raw Normal View History

2023-04-20 09:54:25 +02:00
/*
This is part of WHY2
Copyright (C) 2022 Václav Šmejkal
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef WHY2_CHAT_CONFIG_H
#define WHY2_CHAT_CONFIG_H
2024-01-23 18:27:24 +01:00
#ifdef __cplusplus
extern "C" {
#endif
2024-08-30 00:44:38 +02:00
#include <why2/flags.h> //damn i really hate including headers in headers
2024-02-21 08:49:05 +01:00
//CONFIG MACROS
#define WHY2_CHAT_CONFIG_DIR WHY2_CONFIG_DIR "/WHY2"
2024-02-21 11:22:27 +01:00
#define WHY2_CHAT_CONFIG_URL "https://raw.githubusercontent.com/ENGO150/WHY2/development/src/chat/config/"
2024-01-23 19:20:26 +01:00
#define WHY2_CHAT_CONFIG_SERVER "server.toml"
#define WHY2_CHAT_CONFIG_CLIENT "client.toml"
void why2_chat_init_server_config(void); //CHECK IF SERVER CONFIG EXISTS, CREATE IT
void why2_chat_init_client_config(void); //Dementia is a term used to describe a group of symptoms affecting memory, thinking and social abilities. In people who have dementia, the symptoms interfere with their daily lives. Dementia isn't one specific disease. Several diseases can cause dementia. ...
2023-04-20 09:54:25 +02:00
2024-02-21 08:49:05 +01:00
char *why2_toml_read(const char* path, const char* key); //READ key FROM path TOML FILE
void why2_toml_read_free(char* s); //DEALLOCATE THE READ VALUE
2024-01-23 18:27:24 +01:00
2024-02-21 10:30:17 +01:00
char *why2_chat_server_config(char *key); //why2_toml_read BUT YOU DO NOT HAVE TO INCLUDE path
char *why2_chat_client_config(char *key); //hihi, *grabs shotgun quietly*
2024-01-23 18:27:24 +01:00
#ifdef __cplusplus
}
#endif
2023-04-20 09:54:25 +02:00
#endif