2020-02-21 20:07:49 +01:00
|
|
|
// The Construct
|
2018-02-04 03:22:01 +01:00
|
|
|
//
|
2020-02-21 20:07:49 +01:00
|
|
|
// Copyright (C) Construct Developers, Authors & Contributors
|
|
|
|
// Copyright (C) 2016-2020 Jason Volk <jason@zemos.net>
|
2018-02-04 03:22:01 +01:00
|
|
|
//
|
|
|
|
// Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
// purpose with or without fee is hereby granted, provided that the above
|
|
|
|
// copyright notice and this permission notice is present in all copies. The
|
|
|
|
// full license for this software is available in the LICENSE file.
|
2007-01-25 07:40:21 +01:00
|
|
|
|
2019-04-21 00:41:11 +02:00
|
|
|
#ifndef HAVE_IRCD_IRCD_H
|
2018-06-16 00:13:18 +02:00
|
|
|
#define HAVE_IRCD_IRCD_H
|
|
|
|
|
2020-02-21 20:07:49 +01:00
|
|
|
//////////////////////////////////////////////////////////////////////////////>
|
|
|
|
//
|
|
|
|
// This is an aggregate header which ties together the general public
|
|
|
|
// interfaces for IRCd. Include this header to operate and embed the library in
|
|
|
|
// your application; no other includes from the project should be required.
|
|
|
|
//
|
|
|
|
// This header only includes standard library headers; we may forward declare
|
|
|
|
// third-party symbols, but only if their headers are not required.
|
|
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////////////////////>
|
|
|
|
|
|
|
|
//
|
|
|
|
// Project configuration
|
|
|
|
//
|
|
|
|
|
|
|
|
#include "config.h" // Generated by ./configure; do not edit
|
|
|
|
#include "assert.h" // Custom assert (during debug builds)
|
2022-07-08 19:22:29 +02:00
|
|
|
#include "portable.h" // Additional developer config pre-std
|
|
|
|
#include "stdinc.h" // Standard library includes.
|
|
|
|
#include "stduse.h" // Additional developer config post-std
|
2020-02-21 20:07:49 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Project library interfaces
|
|
|
|
//
|
|
|
|
|
2020-10-10 08:43:27 +02:00
|
|
|
#include "util/mask.h"
|
2022-02-24 23:35:58 +01:00
|
|
|
#include "util/align.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "string_view.h"
|
|
|
|
#include "vector_view.h"
|
|
|
|
#include "byte_view.h"
|
|
|
|
#include "buffer/buffer.h"
|
2020-10-16 18:44:04 +02:00
|
|
|
#include "vg.h"
|
2021-02-17 18:49:47 +01:00
|
|
|
#include "simd/simd.h"
|
2021-05-02 23:43:10 +02:00
|
|
|
#include "simt/simt.h"
|
2023-02-05 21:04:30 +01:00
|
|
|
#include "allocator/allocator.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "util/util.h"
|
|
|
|
#include "exception.h"
|
2020-02-26 20:57:54 +01:00
|
|
|
#include "panic.h"
|
2020-12-13 15:03:47 +01:00
|
|
|
#include "terminate.h"
|
2019-01-18 17:55:06 +01:00
|
|
|
#include "run.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "demangle.h"
|
2019-09-20 07:02:57 +02:00
|
|
|
#include "backtrace.h"
|
2022-06-23 19:24:06 +02:00
|
|
|
#include "versions.h"
|
2020-06-19 10:04:30 +02:00
|
|
|
#include "info.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "logger.h"
|
2020-08-12 01:02:56 +02:00
|
|
|
#include "stringops.h"
|
2021-02-17 18:49:47 +01:00
|
|
|
#include "lex_cast.h"
|
2019-07-11 22:46:32 +02:00
|
|
|
#include "strl.h"
|
2019-09-18 18:49:40 +02:00
|
|
|
#include "strn.h"
|
2019-07-11 22:46:32 +02:00
|
|
|
#include "cmp.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "tokens.h"
|
2021-02-17 18:49:47 +01:00
|
|
|
#include "globular.h"
|
|
|
|
#include "leb128.h"
|
|
|
|
#include "sys.h"
|
|
|
|
#include "rand.h"
|
|
|
|
#include "crh.h"
|
|
|
|
#include "fpe.h"
|
|
|
|
#include "icu.h"
|
2021-08-11 13:31:32 +02:00
|
|
|
#include "utf8.h"
|
|
|
|
#include "utf16.h"
|
2021-02-17 18:49:47 +01:00
|
|
|
#include "b64.h"
|
|
|
|
#include "b58.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "iov.h"
|
2021-02-17 18:49:47 +01:00
|
|
|
#include "time.h"
|
2021-02-17 18:51:10 +01:00
|
|
|
#include "math/math.h"
|
2019-02-26 21:57:43 +01:00
|
|
|
#include "grammar.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "parse.h"
|
2021-02-17 18:49:47 +01:00
|
|
|
#include "fmt.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "json/json.h"
|
2020-08-01 06:34:45 +02:00
|
|
|
#include "cbor.h"
|
2021-02-17 18:49:47 +01:00
|
|
|
#include "color.h"
|
|
|
|
#include "rfc1459.h"
|
|
|
|
#include "rfc1035.h"
|
|
|
|
#include "rfc3986.h"
|
2020-06-11 09:43:36 +02:00
|
|
|
#include "nacl.h"
|
|
|
|
#include "ed25519.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "openssl.h"
|
2020-02-12 00:38:27 +01:00
|
|
|
#include "pbc.h"
|
2018-12-05 00:20:12 +01:00
|
|
|
#include "http.h"
|
2019-06-22 01:54:22 +02:00
|
|
|
#include "http2/http2.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "conf.h"
|
2020-04-20 02:51:51 +02:00
|
|
|
#include "magic.h"
|
2019-03-12 23:00:14 +01:00
|
|
|
#include "stats.h"
|
2019-07-31 23:06:13 +02:00
|
|
|
#include "prof/prof.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "fs/fs.h"
|
2020-12-13 01:07:42 +01:00
|
|
|
#include "ios/ios.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "ctx/ctx.h"
|
2022-03-10 02:37:20 +01:00
|
|
|
#include "cl/cl.h"
|
2021-02-26 04:05:02 +01:00
|
|
|
#include "gpt/gpt.h"
|
2020-10-20 03:37:11 +02:00
|
|
|
#include "exec.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "db/db.h"
|
|
|
|
#include "js.h"
|
|
|
|
#include "mods/mods.h"
|
|
|
|
#include "net/net.h"
|
|
|
|
#include "server/server.h"
|
2021-01-16 03:41:25 +01:00
|
|
|
#include "png.h"
|
2021-10-06 22:07:21 +02:00
|
|
|
#include "beep.h"
|
2019-09-25 02:55:01 +02:00
|
|
|
#include "magick.h"
|
2019-02-18 19:40:21 +01:00
|
|
|
#include "resource/resource.h"
|
2018-06-16 00:13:18 +02:00
|
|
|
#include "client.h"
|
|
|
|
|
2017-09-12 18:37:44 +02:00
|
|
|
/// \brief Internet Relay Chat daemon. This is the principal namespace for IRCd.
|
|
|
|
///
|
2017-08-28 23:51:22 +02:00
|
|
|
namespace ircd
|
|
|
|
{
|
2020-02-27 18:17:09 +01:00
|
|
|
// Library version information (also see info.h for more version related)
|
2019-09-25 21:48:00 +02:00
|
|
|
extern const info::versions version_api;
|
|
|
|
extern const info::versions version_abi;
|
2019-03-02 21:25:51 +01:00
|
|
|
|
2020-09-27 23:44:33 +02:00
|
|
|
// Diagnostic Mode Options
|
|
|
|
extern conf::item<std::string> diagnostic;
|
|
|
|
|
2020-10-01 07:01:21 +02:00
|
|
|
// Restart-Assist
|
|
|
|
extern conf::item<std::string> restart;
|
|
|
|
|
2020-09-16 03:01:40 +02:00
|
|
|
// Operating Mode Selectors
|
2019-03-02 21:25:51 +01:00
|
|
|
extern conf::item<bool> debugmode;
|
2020-09-16 03:01:40 +02:00
|
|
|
extern conf::item<bool> maintenance;
|
2019-06-01 11:02:37 +02:00
|
|
|
extern conf::item<bool> soft_assert;
|
2020-09-16 03:01:40 +02:00
|
|
|
extern conf::item<bool> write_avoid; // implies maintenance
|
|
|
|
extern conf::item<bool> read_only; // implies write_avoid
|
2020-04-25 06:26:06 +02:00
|
|
|
extern conf::item<bool> defaults;
|
2020-12-19 01:37:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
namespace ircd
|
|
|
|
{
|
|
|
|
/// Prototype of the continuation supplied to the user's main function.
|
|
|
|
using main_continuation = void (*)();
|
|
|
|
|
|
|
|
/// Prototype of the user's main function.
|
|
|
|
using user_function = void (main_continuation);
|
|
|
|
|
|
|
|
/// User's main function
|
|
|
|
using user_main = std::function<user_function>;
|
2019-09-07 23:03:09 +02:00
|
|
|
|
2020-02-27 18:17:09 +01:00
|
|
|
// Informational
|
2019-09-25 21:48:00 +02:00
|
|
|
seconds uptime();
|
2020-02-27 18:17:09 +01:00
|
|
|
|
|
|
|
// Control panel
|
2019-09-25 21:48:00 +02:00
|
|
|
bool quit() noexcept;
|
2020-12-19 01:37:05 +01:00
|
|
|
void init(boost::asio::executor &&, user_main);
|
2017-08-28 23:51:22 +02:00
|
|
|
}
|
2019-04-21 00:41:11 +02:00
|
|
|
|
|
|
|
#endif // HAVE_IRCD_IRCD_H
|