init
This commit is contained in:
68
include/glacier_config.h
Normal file
68
include/glacier_config.h
Normal file
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* glacier.h - Function declarations for libglacier
|
||||
*
|
||||
* This file is part of Glacier.
|
||||
*
|
||||
* Glacier 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.
|
||||
*
|
||||
* Glacier 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 Glacier. If
|
||||
* not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GLACIERCONFIG_H_
|
||||
#define GLACIERCONFIG_H_
|
||||
|
||||
/*
|
||||
* init_config
|
||||
* DESCRIPTION: Init_config initializes the libconfig library, so it can read the required runtime files
|
||||
* PARAMETERS:
|
||||
* None.
|
||||
* RETURN VAUES:
|
||||
* 0 on success, 1 on failure
|
||||
* CAVEATS:
|
||||
* None.
|
||||
* EXAMPLE:
|
||||
* init_config();
|
||||
*/
|
||||
|
||||
int init_config();
|
||||
|
||||
/**************************************************************************************************************/
|
||||
|
||||
/*
|
||||
* die_config
|
||||
* DESCRPTION: Die_config destroys the loaded libconfig library.
|
||||
* PARAMETERS:
|
||||
* None.
|
||||
* RETURN VALUES:
|
||||
* 0 on success, 1 on failure
|
||||
* CAVEATS:
|
||||
* None.
|
||||
* EXAMPLE:
|
||||
* die_config();
|
||||
*/
|
||||
|
||||
int die_config();
|
||||
|
||||
/**************************************************************************************************************/
|
||||
|
||||
/*
|
||||
* load_setting_from_config
|
||||
* DESCRIPTION: Initialize all settings from glacier.cfg.
|
||||
* PARAMETERS:
|
||||
* None.
|
||||
* RETURN VALUES:
|
||||
* None.
|
||||
* EXAMPLE:
|
||||
* load_setting_from_config();
|
||||
*/
|
||||
|
||||
void load_setting_from_config();
|
||||
|
||||
#endif
|
||||
78
include/glacier_log.h
Normal file
78
include/glacier_log.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* glacier_log.h - Logging function declarations for libglacier
|
||||
*
|
||||
* This file is part of Glacier.
|
||||
*
|
||||
* Glacier 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.
|
||||
*
|
||||
* Glacier 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 Glacier. If
|
||||
* not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GLACIERLOG_H_
|
||||
#define GLACIERLOG_H_
|
||||
|
||||
/*
|
||||
* infolog
|
||||
*
|
||||
* DESCRIPTION: Infolog outputs a stylized info message. It follows Glacier's uniform CLI style.
|
||||
* PARAMETERS:
|
||||
* char MSG[] -> The message to output
|
||||
* RETURN VALUES:
|
||||
* None.
|
||||
* CAVEATS:
|
||||
* * Cannot output variables. If you must output variables, use printf instead.
|
||||
* * A NEWLINE ('\n') character is implied, therefore putting one at the end of
|
||||
* a string is not needed.
|
||||
* EXAMPLE:
|
||||
* infolog("This is an info message.");
|
||||
*/
|
||||
|
||||
void infolog(char MSG[]);
|
||||
|
||||
/**************************************************************************************************************/
|
||||
|
||||
/*
|
||||
* warnlog
|
||||
*
|
||||
* DESCRIPTION: Warnlog outputs a stylized warning message. It follows Glacier's uniform CLI style.
|
||||
* PARAMETERS:
|
||||
* char MSG[] -> The message to output
|
||||
* RETURN VALUES:
|
||||
* None.
|
||||
* CAVEATS:
|
||||
* * Cannot output variables. If you must output variables, use printf instead.
|
||||
* * A NEWLINE ('\n') character is implied, therefore putting one at the end of
|
||||
* a string is not needed.
|
||||
* EXAMPLE:
|
||||
* warnlog("This is a warning message.");
|
||||
*/
|
||||
|
||||
void warnlog(char MSG[]);
|
||||
|
||||
/**************************************************************************************************************/
|
||||
|
||||
/*
|
||||
* errlog
|
||||
* DESCRIPTION: Errlog outputs a stylized error message. It follows Glacier's uniform CLI style.
|
||||
* PARAMETERS:
|
||||
* char MSG[] -> The message to output
|
||||
* RETURN VALUES:
|
||||
* None.
|
||||
* CAVEATS:
|
||||
* * Cannot output variables. If you must output variables, use printf instead.
|
||||
* * A NEWLINE ('\n') character is implied, therefore putting one at the end of
|
||||
* a string is not needed.
|
||||
* EXAMPLE:
|
||||
* errlog("This is an error message.");
|
||||
*/
|
||||
|
||||
void errlog(char MSG[]);
|
||||
|
||||
#endif
|
||||
24
include/glacier_runtime.h
Normal file
24
include/glacier_runtime.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* glacier_runtime.h - Runtime function declarations for libglacier
|
||||
*
|
||||
* This file is part of Glacier.
|
||||
*
|
||||
* Glacier 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.
|
||||
*
|
||||
* Glacier 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 Glacier. If
|
||||
* not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GLACIERRUNTIME_H_
|
||||
#define GLACIERRUNTIME_H_
|
||||
|
||||
/*
|
||||
* runtime_exists
|
||||
*
|
||||
* DESCRIPTION: runtime_exists checks if all necessary runtime files exist.
|
||||
Reference in New Issue
Block a user