# HG changeset patch # User David Demelier # Date 1565891273 -7200 # Node ID bf2bdb41f1810e98061c0f04f9234cc5bdfd6a53 # Parent f50164e4f794ea6a2e3b8ccec2fd68b13cc87a1c doc: improve doxygen documentation diff -r f50164e4f794 -r bf2bdb41f181 cmake/function/IrccdDefineExecutable.cmake --- a/cmake/function/IrccdDefineExecutable.cmake Thu Aug 15 09:07:41 2019 +0200 +++ b/cmake/function/IrccdDefineExecutable.cmake Thu Aug 15 19:47:53 2019 +0200 @@ -20,17 +20,27 @@ # irccd_define_executable # ----------------------- # +# Synopsis: +# # irccd_define_executable( # TARGET target name -# EXPORT (Optional) export executable through CMake # DESCRIPTION short description (Required if installed) # SOURCES src1, src2, srcn +# EXPORT (Optional) export executable through CMake # FLAGS (Optional) C/C++ flags (without -D) # LIBRARIES (Optional) libraries to link # INCLUDES (Optional) includes for the target # ) # -# Create an executable that can be installed or not. +# Create an executable and optionally install it. +# +# The function create a new executable named with the parameter TARGET. The +# argument SOURCES should contains the C++ source files and headers. +# +# Optional argument FLAGS, INCLUDES, LIBRARIES may be passed to set compile +# flags, private libraries and public libraries respectively. +# +# If export boolean parameter is set, the executable is exported and installed. # include(${CMAKE_CURRENT_LIST_DIR}/IrccdInstallDependencies.cmake) diff -r f50164e4f794 -r bf2bdb41f181 cmake/function/IrccdDefineLibrary.cmake --- a/cmake/function/IrccdDefineLibrary.cmake Thu Aug 15 09:07:41 2019 +0200 +++ b/cmake/function/IrccdDefineLibrary.cmake Thu Aug 15 19:47:53 2019 +0200 @@ -20,10 +20,13 @@ # irccd_define_library # -------------------- # +# Synopsis: +# # irccd_define_library( # TARGET target name # SOURCES src1, src2, srcn # EXPORT (Optional) set to true to export library through irccd +# and install it # HEADERS (Optional) directory of headers to install # FLAGS (Optional) C/C++ flags (without -D) # LIBRARIES (Optional) libraries to link @@ -31,6 +34,21 @@ # PUBLIC_INCLUDES (Optional) includes to share with target dependencies # ) # +# Create a library and optionally install it. +# +# The function create a new library named with the parameter TARGET, you should +# prefix it with "lib" as its the convention within irccd (e.g. libfoo), the +# prefix is automatically removed. +# +# The argument SOURCES should contains the C++ source files and HEADERS should +# points to a directory to be installed verbatim in the include directory. +# +# Optional argument FLAGS, LOCAL_INCLUDES, PUBLIC_INCLUDES, LIBRARIES may be +# passed to set compile flags, private includes, public includes and libraries +# respectively. +# +# If export boolean parameter is set, the library is exported and installed. +# include(${CMAKE_CURRENT_LIST_DIR}/IrccdInstallDependencies.cmake) diff -r f50164e4f794 -r bf2bdb41f181 cmake/function/IrccdDefineMan.cmake --- a/cmake/function/IrccdDefineMan.cmake Thu Aug 15 09:07:41 2019 +0200 +++ b/cmake/function/IrccdDefineMan.cmake Thu Aug 15 19:47:53 2019 +0200 @@ -20,6 +20,8 @@ # irccd_define_man # ---------------- # +# Synopsis: +# # irccd_define_man( # INPUT file path to the input man page # SECTION section (e.g. man1 man3) diff -r f50164e4f794 -r bf2bdb41f181 cmake/function/IrccdDefinePlugin.cmake --- a/cmake/function/IrccdDefinePlugin.cmake Thu Aug 15 09:07:41 2019 +0200 +++ b/cmake/function/IrccdDefinePlugin.cmake Thu Aug 15 19:47:53 2019 +0200 @@ -53,8 +53,8 @@ # Additional documentation in manual page format can be specified with the MAN # parameter. # -# A CMake option is also created in the form OPTION_ where PLG is the -# uppercase NAME value. +# A CMake option is also created in the form IRCCD_WITH_OPTION_ where PLG +# is the uppercase NAME value. # include(${CMAKE_CURRENT_LIST_DIR}/IrccdInstallDependencies.cmake) diff -r f50164e4f794 -r bf2bdb41f181 doc/doxygen/CMakeLists.txt --- a/doc/doxygen/CMakeLists.txt Thu Aug 15 09:07:41 2019 +0200 +++ b/doc/doxygen/CMakeLists.txt Thu Aug 15 19:47:53 2019 +0200 @@ -16,12 +16,13 @@ project(doxygen) -set(DOXYGEN_FILE_PATTERNS "*.hpp") +set(DOXYGEN_FILE_PATTERNS *.hpp *.dox) set(DOXYGEN_PREDEFINED BOOST_ASIO_HAS_LOCAL_SOCKETS IRCCD_HAVE_SSL IRCCD_HAVE_JS) set(DOXYGEN_PROJECT_NAME irccd) set(DOXYGEN_PROJECT_NUMBER ${IRCCD_VERSION}) set(DOXYGEN_QUIET YES) set(DOXYGEN_RECURSIVE YES) +set(DOXYGEN_SHOW_FILES NO) set(DOXYGEN_EXTRACT_ALL YES) set(DOXYGEN_WARN_NO_PARAMDOC YES) set( @@ -36,9 +37,9 @@ doxygen_add_docs( doxygen ALL - ${CMAKE_CURRENT_SOURCE_DIR}/mainpage.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/modules.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/pages.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mainpage.dox + ${CMAKE_CURRENT_SOURCE_DIR}/modules.dox + ${CMAKE_CURRENT_SOURCE_DIR}/pages.dox ${CMAKE_SOURCE_DIR}/libirccd ${CMAKE_SOURCE_DIR}/libirccd-daemon ${CMAKE_SOURCE_DIR}/libirccd-ctl @@ -46,3 +47,8 @@ ${CMAKE_SOURCE_DIR}/libirccd-test WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} ) + +install( + DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ + DESTINATION ${CMAKE_INSTALL_DOCDIR}/doxygen +) diff -r f50164e4f794 -r bf2bdb41f181 doc/doxygen/mainpage.cpp --- a/doc/doxygen/mainpage.cpp Thu Aug 15 09:07:41 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/** - * \mainpage - * - * Welcome to the irccd C++ API. - * - * ## Introduction - * - * The irccd libraries let you create your own native plugins but also your own - * bot from scratch if you want. - * - * ## Libraries - * - * The irccd libraries are split and described as following: - * - * | Library | Description | Dependencies | - * |-----------------|-------------------------------------------------|------------------------------| - * | libirccd | Common utilities | libjson | - * | libirccd-ctl | Classes to connect to irccd instance | libirccd-daemon | - * | libirccd-test | Tools to create unit tests | libirccd-daemon, libirccd-js | - * | libirccd-js | Libraries to create Javascript APIs and plugins | libirccd-daemon, libduktape | - * | libirccd-daemon | Everything related to irccd instance | libirccd | - * - * There is also external libraries shipped with irccd: - * - * | Library | Description | Link | - * |---------------|----------------------|-------------| - * | libduktape | Javascript engine | [duktape][] | - * | libjson | Niels Lohmanns' JSON | [json][] | - * - * [duktape]: http://duktape.org - * [json]: https://github.com/nlohmann/json - */ diff -r f50164e4f794 -r bf2bdb41f181 doc/doxygen/mainpage.dox --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/doxygen/mainpage.dox Thu Aug 15 19:47:53 2019 +0200 @@ -0,0 +1,32 @@ +/** + * \mainpage + * + * Welcome to the irccd C++ API. + * + * ## Introduction + * + * The irccd libraries let you create your own native plugins but also your own + * bot from scratch if you want. + * + * ## Libraries + * + * The irccd libraries are split and described as following: + * + * | Library | Description | Dependencies | Convenient header | + * |-----------------|-------------------------------------------------|------------------------------|---------------------| + * | libirccd | Common utilities | libjson | none | + * | libirccd-ctl | Classes to connect to irccd instance | libirccd-daemon | <%irccd/ctl.hpp> | + * | libirccd-test | Tools to create unit tests | libirccd-daemon, libirccd-js | <%irccd/test.hpp> | + * | libirccd-js | Libraries to create Javascript APIs and plugins | libirccd-daemon, libduktape | <%irccd/js.hpp> | + * | libirccd-daemon | Everything related to irccd instance | libirccd | <%irccd/daemon.hpp> | + * + * There is also external libraries shipped with irccd: + * + * | Library | Description | Link | + * |---------------|----------------------|-------------| + * | libduktape | Javascript engine | [duktape][] | + * | libjson | Niels Lohmanns' JSON | [json][] | + * + * [duktape]: http://duktape.org + * [json]: https://github.com/nlohmann/json + */ diff -r f50164e4f794 -r bf2bdb41f181 doc/doxygen/modules.cpp --- a/doc/doxygen/modules.cpp Thu Aug 15 09:07:41 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* - * modules.cpp -- doxygen modules page - * - * Copyright (c) 2013-2019 David Demelier - * - * 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 appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/** - * \defgroup daemon irccd::daemon - * \brief Module libirccd-daemon - */ - -/** - * \defgroup daemon-transports transports - * \ingroup daemon - * \brief Servers, clients and commands. - */ - -/** - * \defgroup daemon-servers servers - * \ingroup daemon - * \brief IRC server, events and functions. - */ - -/** - * \defgroup daemon-plugins plugins - * \ingroup daemon - * \brief Plugin objects and functions. - */ - -/** - * \defgroup daemon-loggers loggers - * \ingroup daemon - * \brief Log mechanism. - */ - -/** - * \defgroup daemon-loggers-sinks sinks - * \ingroup daemon-loggers - * \brief Predefined logger sinks. - */ - -/** - * \brief Specialized loggable traits. - * \defgroup daemon-loggers-traits traits - * \ingroup daemon-loggers - */ - - -/** - * \defgroup daemon-rules rules - * \ingroup daemon - * \brief Rule objects. - */ - -/** - * \defgroup daemon-utilites utilities - * \ingroup daemon - * \brief Utilities. - */ - -/** - * \defgroup daemon-services services - * \ingroup daemon - * \brief Irccd services. - */ - -/** - * \defgroup ctl irccd::ctl - * \brief Module libirccd-ctl - */ - -/** - * \defgroup core irccd - * \brief Module libirccd - */ - -/** - * \defgroup core-networking networking - * \ingroup core - * \brief Networking support. - * - * Each irccd instance is controllable via sockets using JSON messages. - * - * This mechanism is offered via the triplet stream/acceptor/connector. Irccd - * uses different acceptors to wait for clients to connect and then construct - * a stream of it. Once ready, streams are ready to receive and send messages. - * - * On the client side (e.g. irccdctl), a generic connector is created to connect - * to the irccd instance. Once ready, a stream is also created and ready to - * perform the same receive and send messages. - * - * By default, irccd provides predefined implementations for TCP/IP, local unix - * sockets and optionally TLS over those. - */ - -/** - * \defgroup core-streams streams - * \ingroup core-networking - * \brief Generic I/O streams. - */ - -/** - * \defgroup core-acceptors acceptors - * \ingroup core-networking - * \brief Generic I/O acceptors. - */ - -/** - * \defgroup core-connectors connectors - * \ingroup core-networking - * \brief Generic I/O connectors. - */ - -/** - * \defgroup js irccd::js - * \brief Javascript support. - */ - -/** - * \defgroup js-api api - * \ingroup js - * \brief Javascript APIs. - */ diff -r f50164e4f794 -r bf2bdb41f181 doc/doxygen/modules.dox --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/doxygen/modules.dox Thu Aug 15 19:47:53 2019 +0200 @@ -0,0 +1,140 @@ +/* + * modules.cpp -- doxygen modules page + * + * Copyright (c) 2013-2019 David Demelier + * + * 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 appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * \defgroup daemon irccd::daemon + * \brief Module libirccd-daemon + */ + +/** + * \defgroup daemon-transports transports + * \ingroup daemon + * \brief Servers, clients and commands. + */ + +/** + * \defgroup daemon-transport-commands commands + * \ingroup daemon-transports + * \brief Predefined transport commands available. + */ + +/** + * \defgroup daemon-servers servers + * \ingroup daemon + * \brief IRC server, events and functions. + */ + +/** + * \defgroup daemon-server-events events + * \ingroup daemon-servers + * \brief IRC structures for events. + */ + +/** + * \defgroup daemon-plugins plugins + * \ingroup daemon + * \brief Plugin objects and functions. + */ + +/** + * \defgroup daemon-loggers loggers + * \ingroup daemon + * \brief Log mechanism. + */ + +/** + * \defgroup daemon-loggers-sinks sinks + * \ingroup daemon-loggers + * \brief Predefined logger sinks. + */ + +/** + * \brief Specialized loggable traits. + * \defgroup daemon-loggers-traits traits + * \ingroup daemon-loggers + */ + +/** + * \defgroup daemon-rules rules + * \ingroup daemon + * \brief Rule objects. + */ + +/** + * \defgroup daemon-services services + * \ingroup daemon + * \brief Irccd services. + */ + +/** + * \defgroup ctl irccd::ctl + * \brief Module libirccd-ctl + */ + +/** + * \defgroup core irccd + * \brief Module libirccd + */ + +/** + * \defgroup core-networking networking + * \ingroup core + * \brief Networking support. + * + * Each irccd instance is controllable via sockets using JSON messages. + * + * This mechanism is offered via the triplet stream/acceptor/connector. Irccd + * uses different acceptors to wait for clients to connect and then construct + * a stream of it. Once ready, streams are ready to receive and send messages. + * + * On the client side (e.g. irccdctl), a generic connector is created to connect + * to the irccd instance. Once ready, a stream is also created and ready to + * perform the same receive and send messages. + * + * By default, irccd provides predefined implementations for TCP/IP, local unix + * sockets and optionally TLS over those. + */ + +/** + * \defgroup core-streams streams + * \ingroup core-networking + * \brief Generic I/O streams. + */ + +/** + * \defgroup core-acceptors acceptors + * \ingroup core-networking + * \brief Generic I/O acceptors. + */ + +/** + * \defgroup core-connectors connectors + * \ingroup core-networking + * \brief Generic I/O connectors. + */ + +/** + * \defgroup js irccd::js + * \brief Javascript support. + */ + +/** + * \defgroup js-api api + * \ingroup js + * \brief Javascript APIs. + */ diff -r f50164e4f794 -r bf2bdb41f181 doc/doxygen/pages.cpp --- a/doc/doxygen/pages.cpp Thu Aug 15 09:07:41 2019 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,280 +0,0 @@ - -/* - * pages.cpp -- doxygen related pages - * - * Copyright (c) 2013-2019 David Demelier - * - * 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 appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -/** - * \page overview Overview - * \brief Architecture overview. - * - * \subpage overview-irccd - */ - -/** - * \page overview-irccd Irccd overview - * \brief Irccd architecture overview. - * - * The irccd daemon runs different services to deliver the bot functionalities. - * The main loop is controlled with a `boost::asio::io_context` and completely - * mono-threaded. - * - * ~~~ - * +--------------+ - * | | - * | rule_service | - * | | - * +-------^------+ - * | - * | - * | - * +----------------+ +---+---+ +-------------------+ - * | | | | | | - * | plugin_service <-------+ irccd +-------> transport_service | - * | | | | | | - * +----------------+ +---+---+ +-------------------+ - * | - * | - * | - * +-------v--------+ - * | | - * | server_service | - * | | - * +----------------+ - * ~~~ - * - * Look at the different subpages for more information. - * - * - \subpage overview-plugins - * - \subpage overview-rules - * - \subpage overview-servers - * - \subpage overview-transports - */ - -/** - * \page overview-plugins Plugins - * \brief Plugins overview - * - * The plugins are the essential part of irccd, they are called for each IRC - * events for each IRC servers. - * - * Plugins can be written in Javascript or in C++. - * - * ~~~ - * uses uses - * +----------------+ +----------------+ +---------------+ - * | | | | 0..* | | - * | server_service +-------> plugin_service +--+------+ plugin_loader | - * | | | | | | | - * +----------------+ +----------------+ | +-------+-------+ - * | | - * | invoke | find or open - * | | - * | +---v----+ - * | 0..* | | - * +----------+ plugin | - * | | - * +----^---+ - * | - * | inherits - * | - * +-----+-----+ - * | | - * | js_plugin | - * | | - * +-----------+ - * ~~~ - * - * ## The plugin_service - * - * The plugin_service class opens, loads, reload or unload plugins. It also - * invoke plugins for IRC events from server_service. - * - * It also uses plugin_loaders objects to find new plugins once requested or - * opens them. - * - * ## The plugin_loader class - * - * This abstract class is responsible of searching and opening plugins. It has a - * convenient predefined function that will search for standard path according - * to a file extension. - * - * ## The plugin class - * - * The abstract plugin class is the user point of customization. It contains - * various virtual functions to be redefined for IRC events the user is - * interested in. - * - * ## The js_plugin class - * - * If built with Javascript support and linked against libirccd-js, one can use - * js_plugin to load Javscript plugin files. - * - * This class will call global functions defined in the file. More information - * in the official Javascript API. - */ - -/** - * \page overview-rules Rules - * \brief Rules overview - * - * The rules is the mechanism in irccd that accept/forbid plugin commands - * invocations depending on user criterias. It's a kind of plugin firewall. - * - * It's usage is pretty simple. - * - * ~~~ - * +----------------+ asks +--------------+ - * | | | | - * | server_service +-----------> rule_service | - * | | | | - * +----------------+ +-------+------+ - * | - * | - * | 0..* - * +------+ - * | | - * | rule | - * | | - * +------+ - * ~~~ - * - * ## The rule_service class - * - * Owns a set of rule and provide functions to check if a rule will match - * depending on the following criterias: - * - * - the server name - * - the origin user - * - the channel name - * - the plugin name - * - the event name - * - * Then, if the rule match, its action is considered (accept or drop). - * - * ## The rule class - * - * A simple data that contains all criterias. - * - * ## Notes - * - * You may wonder why it's server_service that uses rule_service. It's because - * the server_service is the only one that knows all criterias, some IRC events - * don't have those. - * - * This may change in the future. - */ - -/** - * \page overview-servers Servers - * \brief Servers overview - * - * This page explains the overview related to IRC servers. - * - * ~~~ - * +----------------+ invoke +----------------+ - * | | | | - * | server_service +------+-------> plugin_service | - * | | | | | - * +-------+--------+ | +----------------+ - * | | - * | | dispatches - * | 0..* | - * +---+----+ | +-------------------+ - * | | | | | - * | server | +-------> transport_service | - * | | | | - * +---+----+ +-------------------+ - * | - * | - * | 1 - * +-----+------+ - * | | - * | connection | - * | | - * +------------+ - * ~~~ - * - * ## The server_service class - * - * This class is responsible of servers, it receives messages from them and then - * invoke plugins and dispatches IRC events to all irccdctl clients connected. - * - * ## The server class - * - * The server class is higher level than connection. It stores all options, user - * information, settings and messages queues for IRC. - * - * It also does authentication and has various IRC commands predefined. - * - * ## The connection class - * - * The connection class is the lowest part of the IRC connection, it only - * receives and sends messages with appropriate parsing. - */ - -/** - * \page overview-transports Transports - * \brief Transports overview - * - * The transports feature is dedicated into irccd to irccdctl dialogs. It - * allows: - * - * - Requests from irccdctl, - * - Events from irccd to all irccdctl, - * - Different type of protocols (TCP/IP, local and TLS). - * - * It consists of different parts. - * - * ~~~ - * +-------------------+ +---------+ - * | | 0..* | | - * | transport_service +---------+ command | - * | | | | - * +---------+---------+ +----^----+ - * | | - * | | executes - * | 0..* | - * +---------+--------+ +----+-------------+ - * | | 1 0..* | | - * | transport_server +----------+ transport_client | - * | | | | - * +------------------+ +------------------+ - * ~~~ - * - * ## The transport_service class - * - * This class owns several transport_server, it will wait for a new client in - * each of those servers. - * - * It's also dedicated to broadcast messages to all connected transport_clients. - * - * ## The transport_server class - * - * This class has only one purpose, to accept a new client. It's abstract and - * the underlying implementation is responsible of doing its own operation. - * - * ## The transport_client class - * - * This stateful class represent a direct connection to a irccdctl client. - * - * It does authentication if required and process input messages. It does not - * call commands directly but dispatch that to the transport_service. - * - * ## The command class - * - * This abstract class defines an operation to perform. - */ diff -r f50164e4f794 -r bf2bdb41f181 doc/doxygen/pages.dox --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/doc/doxygen/pages.dox Thu Aug 15 19:47:53 2019 +0200 @@ -0,0 +1,425 @@ + +/* + * pages.cpp -- doxygen related pages + * + * Copyright (c) 2013-2019 David Demelier + * + * 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 appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/** + * \page overview Overview + * \brief Architecture overview. + * + * \subpage overview-irccd + */ + +/** + * \page overview-irccd Irccd overview + * \brief Irccd architecture overview. + * + * The irccd daemon runs different services to deliver the bot functionalities. + * The main loop is controlled with a `boost::asio::io_context` and completely + * mono-threaded. + * + * ~~~ + * +--------------+ + * | | + * | rule_service | + * | | + * +-------^------+ + * | + * | + * | + * +----------------+ +---+---+ +-------------------+ + * | | | | | | + * | plugin_service <-------+ irccd +-------> transport_service | + * | | | | | | + * +----------------+ +---+---+ +-------------------+ + * | + * | + * | + * +-------v--------+ + * | | + * | server_service | + * | | + * +----------------+ + * ~~~ + * + * Look at the different subpages for more information. + * + * - \subpage overview-plugins + * - \subpage overview-rules + * - \subpage overview-servers + * - \subpage overview-transports + */ + +/** + * \page overview-plugins Plugins + * \brief Plugins overview + * + * The plugins are the essential part of irccd, they are called for each IRC + * events for each IRC servers. + * + * Plugins can be written in Javascript or in C++. + * + * ~~~ + * uses uses + * +----------------+ +----------------+ +---------------+ + * | | | | 0..* | | + * | server_service +-------> plugin_service +--+------+ plugin_loader | + * | | | | | | | + * +----------------+ +----------------+ | +-------+-------+ + * | | + * | invoke | find or open + * | | + * | +---v----+ + * | 0..* | | + * +----------+ plugin | + * | | + * +----^---+ + * | + * | inherits + * | + * +-----+-----+ + * | | + * | js_plugin | + * | | + * +-----------+ + * ~~~ + * + * ## The plugin_service + * + * The plugin_service class opens, loads, reload or unload plugins. It also + * invoke plugins for IRC events from server_service. + * + * It also uses plugin_loaders objects to find new plugins once requested or + * opens them. + * + * ## The plugin_loader class + * + * This abstract class is responsible of searching and opening plugins. It has a + * convenient predefined function that will search for standard path according + * to a file extension. + * + * ## The plugin class + * + * The abstract plugin class is the user point of customization. It contains + * various virtual functions to be redefined for IRC events the user is + * interested in. + * + * ## The js_plugin class + * + * If built with Javascript support and linked against libirccd-js, one can use + * js_plugin to load Javscript plugin files. + * + * This class will call global functions defined in the file. More information + * in the official Javascript API. + */ + +/** + * \page overview-rules Rules + * \brief Rules overview + * + * The rules is the mechanism in irccd that accept/forbid plugin commands + * invocations depending on user criterias. It's a kind of plugin firewall. + * + * It's usage is pretty simple. + * + * ~~~ + * +----------------+ asks +--------------+ + * | | | | + * | server_service +-----------> rule_service | + * | | | | + * +----------------+ +-------+------+ + * | + * | + * | 0..* + * +------+ + * | | + * | rule | + * | | + * +------+ + * ~~~ + * + * ## The rule_service class + * + * Owns a set of rule and provide functions to check if a rule will match + * depending on the following criterias: + * + * - the server name + * - the origin user + * - the channel name + * - the plugin name + * - the event name + * + * Then, if the rule match, its action is considered (accept or drop). + * + * ## The rule class + * + * A simple data that contains all criterias. + * + * ## Notes + * + * You may wonder why it's server_service that uses rule_service. It's because + * the server_service is the only one that knows all criterias, some IRC events + * don't have those. + * + * This may change in the future. + */ + +/** + * \page overview-servers Servers + * \brief Servers overview + * + * This page explains the overview related to IRC servers. + * + * ~~~ + * +----------------+ invoke +----------------+ + * | | | | + * | server_service +------+-------> plugin_service | + * | | | | | + * +-------+--------+ | +----------------+ + * | | + * | | dispatches + * | 0..* | + * +---+----+ | +-------------------+ + * | | | | | + * | server | +-------> transport_service | + * | | | | + * +---+----+ +-------------------+ + * | + * | + * | 1 + * +-----+------+ + * | | + * | connection | + * | | + * +------------+ + * ~~~ + * + * ## The server_service class + * + * This class is responsible of servers, it receives messages from them and then + * invoke plugins and dispatches IRC events to all irccdctl clients connected. + * + * ## The server class + * + * The server class is higher level than connection. It stores all options, user + * information, settings and messages queues for IRC. + * + * It also does authentication and has various IRC commands predefined. + * + * ## The connection class + * + * The connection class is the lowest part of the IRC connection, it only + * receives and sends messages with appropriate parsing. + */ + +/** + * \page overview-transports Transports + * \brief Transports overview + * + * The transports feature is dedicated into irccd to irccdctl dialogs. It + * allows: + * + * - Requests from irccdctl, + * - Events from irccd to all irccdctl, + * - Different type of protocols (TCP/IP, local and TLS). + * + * It consists of different parts. + * + * ~~~ + * +-------------------+ +---------+ + * | | 0..* | | + * | transport_service +---------+ command | + * | | | | + * +---------+---------+ +----^----+ + * | | + * | | executes + * | 0..* | + * +---------+--------+ +----+-------------+ + * | | 1 0..* | | + * | transport_server +----------+ transport_client | + * | | | | + * +------------------+ +------------------+ + * ~~~ + * + * ## The transport_service class + * + * This class owns several transport_server, it will wait for a new client in + * each of those servers. + * + * It's also dedicated to broadcast messages to all connected transport_clients. + * + * ## The transport_server class + * + * This class has only one purpose, to accept a new client. It's abstract and + * the underlying implementation is responsible of doing its own operation. + * + * ## The transport_client class + * + * This stateful class represent a direct connection to a irccdctl client. + * + * It does authentication if required and process input messages. It does not + * call commands directly but dispatch that to the transport_service. + * + * ## The command class + * + * This abstract class defines an operation to perform. + */ + +/** + * \page CMake CMake usage + * \brief Using CMake to extend irccd. + * + * Irccd is built with CMake and also provide configuration package files and + * macros once installed. You may use these macros to create plugins, link to + * irccd and such. + * + * ## Usage + * + * You should use the main `irccd` configuration package, it already exports + * everything. + * + * ```cmake + * find_package(irccd REQUIRED) + * ``` + * + * ## Targets + * + * The same targets are available as described in the mainpage, so you can link + * to libirccd like this: + * + * ```cmake + * find_package(irccd REQUIRED) + * target_link_libraries(foo irccd::libirccd) + * ``` + * + * ## Macros + * + * Several macros are available to help you in the process of creating a plugin + * and installing it. + * + * ### irccd_define_plugin + * + * Create a Javascript or native plugin. + * + * The NAME parameter identifies the plugin. The same name will be used for the + * plugin filename. + * + * Both Javascript and native plugins are supported specified by the TYPE + * parameter to JS or NATIVE respectively. For Javascript plugin, a unique file + * must be given as SCRIPT parameter. For native plugins, any source files can + * be given as SOURCES parameter. + * + * Additional documentation in manual page format can be specified with the MAN + * parameter. + * + * A CMake option is also created in the form IRCCD_WITH_OPTION_ where PLG + * is the uppercase NAME value. + * + * ``` + * irccd_define_plugin( + * NAME canonical plugin name + * TYPE JS + * MAN manual page + * SCRIPT absolute path to the Javascript file (ending with .js) + * ) + * ``` + * + * Synopsis for native plugins. + * + * ``` + * irccd_define_plugin( + * NAME canonical plugin name + * TYPE NATIVE + * MAN manual page + * SOURCES c++ source files + * INCLUDES additional includes + * LIBRARIES additional libraries + * ) + * ``` + * + * ### irccd_define_library + * + * Synopsis: + * + * ``` + * irccd_define_library( + * TARGET target name + * SOURCES src1, src2, srcn + * EXPORT (Optional) set to true to export library through irccd + * and install it + * HEADERS (Optional) directory of headers to install + * FLAGS (Optional) C/C++ flags (without -D) + * LIBRARIES (Optional) libraries to link + * LOCAL_INCLUDES (Optional) local includes for the target only + * PUBLIC_INCLUDES (Optional) includes to share with target dependencies + * ) + * ``` + * + * Create a library and optionally install it. + * + * The function create a new library named with the parameter TARGET, you should + * prefix it with "lib" as its the convention within irccd (e.g. libfoo), the + * prefix is automatically removed. + * + * The argument SOURCES should contains the C++ source files and HEADERS should + * points to a directory to be installed verbatim in the include directory. + * + * Optional argument FLAGS, LOCAL_INCLUDES, PUBLIC_INCLUDES may be passed to set + * compile flags, private includes, public includes and libraries respectively. + * + * If export boolean parameter is set, the library is exported and installed. + * + * ### irccd_define_executable + * + * Synopsis: + * + * ``` + * irccd_define_executable( + * TARGET target name + * DESCRIPTION short description (Required if installed) + * SOURCES src1, src2, srcn + * EXPORT (Optional) export executable through CMake + * FLAGS (Optional) C/C++ flags (without -D) + * LIBRARIES (Optional) libraries to link + * INCLUDES (Optional) includes for the target + * ) + * ``` + * + * Create an executable and optionally install it. + * + * The function create a new executable named with the parameter TARGET. The + * argument SOURCES should contains the C++ source files and headers. + * + * Optional argument FLAGS, INCLUDES, LIBRARIES may be passed to set compile + * flags, private libraries and public libraries respectively. + * + * If export boolean parameter is set, the executable is exported and installed. + * + * ### irccd_define_man + * + * Synopsis: + * + * ``` + * irccd_define_man( + * INPUT file path to the input man page + * SECTION section (e.g. man1 man3) + * OUTPUT (Optional) file name to rename + * ) + * ``` + * + * This function configure the manual and install it if IRCCD_WITH_MAN is set. + */ diff -r f50164e4f794 -r bf2bdb41f181 libirccd-ctl/irccd/ctl/controller.hpp --- a/libirccd-ctl/irccd/ctl/controller.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-ctl/irccd/ctl/controller.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -31,7 +31,12 @@ #include #include -namespace irccd::ctl { +namespace irccd { + +/** + * \brief Namespace for irccdctl utilities. + */ +namespace ctl { /** * \brief Main irccdctl interface. @@ -121,6 +126,8 @@ void send(nlohmann::json message, stream::send_handler handler); }; -} // !irccd::ctl +} // !ctl + +} // !irccd #endif // !IRCCD_CTL_CONTROLLER_HPP diff -r f50164e4f794 -r bf2bdb41f181 libirccd-daemon/irccd/daemon/bot.hpp --- a/libirccd-daemon/irccd/daemon/bot.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-daemon/irccd/daemon/bot.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -33,10 +33,12 @@ #include +namespace irccd { + /** * \brief Main irccd namespace */ -namespace irccd::daemon { +namespace daemon { namespace logger { @@ -244,7 +246,9 @@ */ auto make_error_code(bot_error::error e) noexcept -> std::error_code; -} // !irccd::daemon +} // !daemon + +} // !irccd namespace std { diff -r f50164e4f794 -r bf2bdb41f181 libirccd-daemon/irccd/daemon/dynlib_plugin.hpp --- a/libirccd-daemon/irccd/daemon/dynlib_plugin.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-daemon/irccd/daemon/dynlib_plugin.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -34,7 +34,7 @@ namespace irccd::daemon { /** - * \ingroup plugins + * \ingroup daemon-plugins * \brief Implementation for searching native plugins. */ class dynlib_plugin_loader : public plugin_loader { diff -r f50164e4f794 -r bf2bdb41f181 libirccd-daemon/irccd/daemon/irc.hpp --- a/libirccd-daemon/irccd/daemon/irc.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-daemon/irccd/daemon/irc.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -38,7 +38,14 @@ # include #endif -namespace irccd::daemon::irc { +namespace irccd { + +namespace daemon { + +/** + * \brief IRC related classes. + */ +namespace irc { /** * \brief Describe errors. @@ -1390,6 +1397,10 @@ void send(std::string_view message, send_handler handler); }; -} // !irccd::daemon::irc +} // !irc + +} // !daemon + +} // !irccd #endif // !IRCCD_IRC_HPP diff -r f50164e4f794 -r bf2bdb41f181 libirccd-daemon/irccd/daemon/logger.hpp --- a/libirccd-daemon/irccd/daemon/logger.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-daemon/irccd/daemon/logger.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -31,7 +31,14 @@ #include #include -namespace irccd::daemon::logger { +namespace irccd { + +namespace daemon { + +/** + * \brief Loggers, sinks and filters. + */ +namespace logger { class filter; class sink; @@ -449,6 +456,10 @@ #endif // !IRCCD_HAVE_SYSLOG -} // !irccd::daemon::logger +} // !logger + +} // !daemon + +} // !irccd #endif // !IRCCD_DAEMON_LOGGER_HPP diff -r f50164e4f794 -r bf2bdb41f181 libirccd-daemon/irccd/daemon/plugin.hpp --- a/libirccd-daemon/irccd/daemon/plugin.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-daemon/irccd/daemon/plugin.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -53,7 +53,7 @@ struct whois_event; /** - * \ingroup plugins + * \ingroup daemon-plugins * \brief Abstract plugin. * * A plugin is identified by name and can be loaded and unloaded at runtime. @@ -313,7 +313,7 @@ }; /** - * \ingroup plugins + * \ingroup daemon-plugins * \brief Abstract interface for searching plugins. * * This class is used to make loading of plugins extensible, the plugin_service @@ -382,7 +382,7 @@ }; /** - * \ingroup plugins + * \ingroup daemon-plugins * \brief Plugin error. */ class plugin_error : public std::system_error { diff -r f50164e4f794 -r bf2bdb41f181 libirccd-daemon/irccd/daemon/plugin_service.hpp --- a/libirccd-daemon/irccd/daemon/plugin_service.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-daemon/irccd/daemon/plugin_service.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -45,8 +45,7 @@ /** * \brief Manage plugins. - * \ingroup plugins - * \ingroup services + * \ingroup daemon-services */ class plugin_service { public: @@ -262,7 +261,7 @@ /** * \brief Implement Loggable traits for plugin. - * \ingroup logger-traits + * \ingroup daemon-loggers-traits */ template <> struct type_traits { diff -r f50164e4f794 -r bf2bdb41f181 libirccd-daemon/irccd/daemon/rule_service.hpp --- a/libirccd-daemon/irccd/daemon/rule_service.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-daemon/irccd/daemon/rule_service.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -42,7 +42,7 @@ /** * \brief Store and solve rules. - * \ingroup services + * \ingroup daemon-services */ class rule_service { private: @@ -134,7 +134,7 @@ /** * \brief Specialization for rule. - * \ingroup logger-traits + * \ingroup daemon-loggers-traits */ template <> struct type_traits { diff -r f50164e4f794 -r bf2bdb41f181 libirccd-daemon/irccd/daemon/server.hpp --- a/libirccd-daemon/irccd/daemon/server.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-daemon/irccd/daemon/server.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -67,7 +67,7 @@ /** * \brief Describe a whois information. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct whois_info { std::string nick; //!< user's nickname @@ -79,7 +79,7 @@ /** * \brief Connection success event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct connect_event { std::shared_ptr server; //!< The server. @@ -87,7 +87,7 @@ /** * \brief Connection success event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct disconnect_event { std::shared_ptr server; //!< The server. @@ -95,7 +95,7 @@ /** * \brief Invite event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct invite_event { std::shared_ptr server; //!< The server. @@ -106,7 +106,7 @@ /** * \brief Join event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct join_event { std::shared_ptr server; //!< The server. @@ -116,7 +116,7 @@ /** * \brief Kick event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct kick_event { std::shared_ptr server; //!< The server. @@ -128,7 +128,7 @@ /** * \brief Message event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct message_event { std::shared_ptr server; //!< The server. @@ -139,7 +139,7 @@ /** * \brief CTCP action event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct me_event { std::shared_ptr server; //!< The server. @@ -150,7 +150,7 @@ /** * \brief Mode event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct mode_event { std::shared_ptr server; //!< The server. @@ -164,7 +164,7 @@ /** * \brief Names listing event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct names_event { std::shared_ptr server; //!< The server. @@ -174,7 +174,7 @@ /** * \brief Nick change event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct nick_event { std::shared_ptr server; //!< The server. @@ -184,7 +184,7 @@ /** * \brief Notice event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct notice_event { std::shared_ptr server; //!< The server. @@ -195,7 +195,7 @@ /** * \brief Part event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct part_event { std::shared_ptr server; //!< The server. @@ -206,7 +206,7 @@ /** * \brief Topic event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct topic_event { std::shared_ptr server; //!< The server. @@ -217,7 +217,7 @@ /** * \brief Whois event. - * \ingroup daemon-events + * \ingroup daemon-server-events */ struct whois_event { std::shared_ptr server; //!< The server. @@ -226,7 +226,7 @@ /** * \brief Store all possible events. - * \ingroup daemon-events + * \ingroup daemon-server-events */ using event = std::variant< std::monostate, @@ -248,7 +248,7 @@ /** * \brief The class that connect to a IRC server. - * \ingroup server + * \ingroup daemon-servers * * This class is higher level than irc connection, it does identify process, * parsing message, translating messages and queue'ing user requests. @@ -797,6 +797,7 @@ /** * \brief Server error. + * \ingroup daemon-servers */ class server_error : public std::system_error { public: diff -r f50164e4f794 -r bf2bdb41f181 libirccd-daemon/irccd/daemon/server_service.hpp --- a/libirccd-daemon/irccd/daemon/server_service.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-daemon/irccd/daemon/server_service.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -43,7 +43,7 @@ /** * \brief Manage IRC servers. - * \ingroup services + * \ingroup daemon-services * * This class holds servers and wait for IRC events to come and then are * dispatched through the plugins. @@ -169,7 +169,7 @@ /** * \brief Specialization for server. - * \ingroup logger-traits + * \ingroup daemon-loggers-traits */ template <> struct type_traits { diff -r f50164e4f794 -r bf2bdb41f181 libirccd-daemon/irccd/daemon/transport_command.hpp --- a/libirccd-daemon/irccd/daemon/transport_command.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-daemon/irccd/daemon/transport_command.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -42,7 +42,7 @@ /** * \brief Server side remote command - * \ingroup transports + * \ingroup daemon-transport-commands */ class transport_command { public: @@ -95,7 +95,7 @@ /** * \brief Implementation of plugin-config transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -120,7 +120,7 @@ /** * \brief Implementation of plugin-info transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -145,7 +145,7 @@ /** * \brief Implementation of plugin-list transport command. - * \ingroup transports + * \ingroup daemon-transport-commands */ class plugin_list_command : public transport_command { public: @@ -166,7 +166,7 @@ /** * \brief Implementation of plugin-load transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -193,7 +193,7 @@ /** * \brief Implementation of plugin-reload transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -219,7 +219,7 @@ /** * \brief Implementation of plugin-unload transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -245,7 +245,7 @@ /** * \brief Implementation of rule-add transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -270,7 +270,7 @@ /** * \brief Implementation of rule-edit transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -296,7 +296,7 @@ /** * \brief Implementation of rule-info transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -321,7 +321,7 @@ /** * \brief Implementation of rule-list transport command. - * \ingroup transports + * \ingroup daemon-transport-commands */ class rule_list_command : public transport_command { public: @@ -342,7 +342,7 @@ /** * \brief Implementation of rule-move transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -367,7 +367,7 @@ /** * \brief Implementation of rule-remove transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -392,7 +392,7 @@ /** * \brief Implementation of server-connect transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -421,7 +421,7 @@ /** * \brief Implementation of server-disconnect transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -447,7 +447,7 @@ /** * \brief Implementation of server-info transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -473,7 +473,7 @@ /** * \brief Implementation of server-invite transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -501,7 +501,7 @@ /** * \brief Implementation of server-join transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -528,7 +528,7 @@ /** * \brief Implementation of server-kick transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -556,7 +556,7 @@ /** * \brief Implementation of server-list transport command. - * \ingroup transports + * \ingroup daemon-transport-commands */ class server_list_command : public transport_command { public: @@ -577,7 +577,7 @@ /** * \brief Implementation of server-me transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -604,7 +604,7 @@ /** * \brief Implementation of server-message transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -631,7 +631,7 @@ /** * \brief Implementation of server-mode transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -659,7 +659,7 @@ /** * \brief Implementation of server-nick transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -686,7 +686,7 @@ /** * \brief Implementation of server-notice transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -713,7 +713,7 @@ /** * \brief Implementation of server-part transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -740,7 +740,7 @@ /** * \brief Implementation of server-reconnect transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * @@ -766,7 +766,7 @@ /** * \brief Implementation of server-topic transport command. - * \ingroup transports + * \ingroup daemon-transport-commands * * Replies: * diff -r f50164e4f794 -r bf2bdb41f181 libirccd-daemon/irccd/daemon/transport_server.hpp --- a/libirccd-daemon/irccd/daemon/transport_server.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-daemon/irccd/daemon/transport_server.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -265,6 +265,10 @@ } // !irccd::daemon +/** + * \cond IRCCD_HIDDEN_SYMBOLS + */ + namespace std { template <> @@ -273,4 +277,8 @@ } // !std +/** + * \endcond + */ + #endif // !IRCCD_DAEMON_TRANSPORT_SERVER_HPP diff -r f50164e4f794 -r bf2bdb41f181 libirccd-daemon/irccd/daemon/transport_service.hpp --- a/libirccd-daemon/irccd/daemon/transport_service.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-daemon/irccd/daemon/transport_service.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -44,8 +44,7 @@ /** * \brief Manage transport servers and clients. - * \ingroup services - * \ingroup transports + * \ingroup daemon-services */ class transport_service { public: diff -r f50164e4f794 -r bf2bdb41f181 libirccd-js/irccd/js.hpp --- a/libirccd-js/irccd/js.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-js/irccd/js.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -42,4 +42,15 @@ #include "js/unicode_api.hpp" #include "js/util_api.hpp" +namespace irccd { + +/** + * \brief Javascript namespace. + */ +namespace js { + +} // !js + +} // !irccd + #endif // !IRCCD_JS_HPP diff -r f50164e4f794 -r bf2bdb41f181 libirccd-js/irccd/js/api.hpp --- a/libirccd-js/irccd/js/api.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-js/irccd/js/api.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -44,6 +44,7 @@ class plugin; /** + * \ingroup js * \ingroup js-api * \brief Javascript API module. */ diff -r f50164e4f794 -r bf2bdb41f181 libirccd-js/irccd/js/duk.hpp --- a/libirccd-js/irccd/js/duk.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-js/irccd/js/duk.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -34,10 +34,14 @@ #include "duktape.h" +namespace irccd { + +namespace js { + /** * \brief Miscellaneous Duktape extras. */ -namespace irccd::js::duk { +namespace duk { // {{{ stack_guard @@ -884,6 +888,10 @@ // }}} -} // !irccd::js::duk +} // !duk + +} // !js + +} // !irccd #endif // !IRCCD_JS_DUK_HPP diff -r f50164e4f794 -r bf2bdb41f181 libirccd-js/irccd/js/irccd_api.hpp --- a/libirccd-js/irccd/js/irccd_api.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-js/irccd/js/irccd_api.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -33,13 +33,15 @@ #include "api.hpp" -namespace irccd::daemon { +namespace irccd { + +namespace daemon { class bot; } // !daemon -namespace irccd::js { +namespace js { /** * \ingroup js-api @@ -104,6 +106,8 @@ } // !duk -} // !irccd::js +} // !js + +} // !irccd #endif // !IRCCD_JS_IRCCD_API_HPP diff -r f50164e4f794 -r bf2bdb41f181 libirccd-js/irccd/js/plugin.hpp --- a/libirccd-js/irccd/js/plugin.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-js/irccd/js/plugin.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -39,7 +39,7 @@ /** * \ingroup js * \ingroup daemon-plugins - * \brief JavaScript plugins for irccd. + * \brief Javascript plugins for irccd. */ class plugin : public daemon::plugin { public: @@ -241,7 +241,8 @@ }; /** - * \ingroup plugins + * \ingroup js + * \ingroup daemon-plugins * \brief Implementation for searching Javascript plugins. */ class plugin_loader : public daemon::plugin_loader { diff -r f50164e4f794 -r bf2bdb41f181 libirccd-test/irccd/test.hpp --- a/libirccd-test/irccd/test.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd-test/irccd/test.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -39,4 +39,15 @@ #include "test/mock_stream.hpp" #include "test/test_plugin_loader.hpp" +namespace irccd { + +/** + * \brief Namespace for unit tests. + */ +namespace test { + +} // !test + +} // !irccd + #endif // !IRCCD_TEST_HPP diff -r f50164e4f794 -r bf2bdb41f181 libirccd/irccd/core.hpp --- a/libirccd/irccd/core.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd/irccd/core.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -40,4 +40,11 @@ #include "ini_util.hpp" #include "xdg.hpp" +/** + * \brief Parent namespace. + */ +namespace irccd { + +} // !irccd + #endif // !IRCCD_CORE_HPP diff -r f50164e4f794 -r bf2bdb41f181 libirccd/irccd/ini.hpp --- a/libirccd/irccd/ini.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd/irccd/ini.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -114,10 +114,12 @@ #include #include +namespace irccd { + /** * \brief Namespace for ini related classes. */ -namespace irccd::ini { +namespace ini { class document; @@ -490,6 +492,8 @@ */ void dump(const tokens& tokens); -} // !irccd::ini +} // !ini + +} // !irccd #endif // !IRCCD_INI_HPP diff -r f50164e4f794 -r bf2bdb41f181 libirccd/irccd/json_util.hpp --- a/libirccd/irccd/json_util.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd/irccd/json_util.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -30,10 +30,12 @@ #include +namespace irccd { + /** * \brief Utilities for JSON. */ -namespace irccd::json_util { +namespace json_util { /** * \brief Describe how to convert a JSON value. @@ -287,6 +289,8 @@ */ auto contains(const nlohmann::json& array, const nlohmann::json& value) noexcept -> bool; -} // !irccd::json_util +} // !json_util + +} // !irccd #endif // !IRCCD_JSON_UTIL_HPP diff -r f50164e4f794 -r bf2bdb41f181 libirccd/irccd/string_util.hpp --- a/libirccd/irccd/string_util.hpp Thu Aug 15 09:07:41 2019 +0200 +++ b/libirccd/irccd/string_util.hpp Thu Aug 15 19:47:53 2019 +0200 @@ -38,10 +38,12 @@ #include #include +namespace irccd { + /** * \brief String utilities. */ -namespace irccd::string_util { +namespace string_util { // {{{ subst @@ -397,6 +399,8 @@ // }}} -} // !irccd::string_util +} // !string_util + +} // !irccd #endif // !IRCCD_STRING_UTIL_HPP diff -r f50164e4f794 -r bf2bdb41f181 man/irccd.conf.5 --- a/man/irccd.conf.5 Thu Aug 15 09:07:41 2019 +0200 +++ b/man/irccd.conf.5 Thu Aug 15 19:47:53 2019 +0200 @@ -41,8 +41,8 @@ .Ss The @include and @tryinclude statements Irccd adds an extension to this format by adding an .\" @include and @tryinclude -.Ar @include keyword which -let you splitting your configuration file. +.Ar @include keyword +which let you splitting your configuration file. .Pp Note: this @include statement must be at the beginning of the file and must be surrounded by quotes if the file name has spaces.