main#
Defines
-
MAIL(x)#
Functions
-
void log_flush()#
Flush the log.
EXAMPLES:
log_flush();
-
int main(int argc, char *argv[])#
Main application entry point.
EXAMPLES:
main(1, const char* args[] = {"sunshine", nullptr});
- Parameters:
argc – The number of arguments.
argv – The arguments.
-
std::uint16_t map_port(int port)#
Map a specified port based on the base port.
EXAMPLES:
std::uint16_t mapped_port = map_port(1);
- Parameters:
port – The port to map as a difference from the base port.
- Returns:
std:uint16_t
: The mapped port number.
-
void open_url(const std::string &url)#
-
void print_help(const char *name)#
Print help to stdout.
EXAMPLES:
print_help("sunshine");
- Parameters:
name – The name of the program.
-
std::string read_file(const char *path)#
Read a file to string.
EXAMPLES:
std::string contents = read_file("path/to/file");
- Parameters:
path – The path of the file.
- Returns:
std::string
: The contents of the file.
-
int write_file(const char *path, const std::string_view &contents)#
Writes a file.
EXAMPLES:
int write_status = write_file("path/to/file", "file contents");
- Parameters:
path – The path of the file.
contents – The contents to write.
- Returns:
int
:0
on success,-1
on failure.
Variables
-
boost::log::sources::severity_logger<int> debug#
-
bool display_cursor#
-
boost::log::sources::severity_logger<int> error#
-
boost::log::sources::severity_logger<int> fatal#
-
boost::log::sources::severity_logger<int> info#
-
thread_pool_util::ThreadPool task_pool#
-
boost::log::sources::severity_logger<int> verbose#
-
boost::log::sources::severity_logger<int> warning#