2017-09-12 18:37:44 +02:00
|
|
|
# IRCd Library Definitions
|
|
|
|
|
|
|
|
This directory contains definitions and linkage for `libircd`
|
2018-01-04 22:34:32 +01:00
|
|
|
|
2018-02-16 03:32:03 +01:00
|
|
|
The purpose of `libircd` is to facilitate the execution of a server which
|
|
|
|
handles requests from end-users. The library hosts a set of pluggable modules
|
|
|
|
which may introduce the actual application features (or the "business logic")
|
2018-12-19 21:24:16 +01:00
|
|
|
of the server.
|
2018-02-16 03:32:03 +01:00
|
|
|
|
2018-12-19 21:24:16 +01:00
|
|
|
> The executable linking and invoking `libircd` may be referred to as the
|
2018-12-20 20:03:01 +01:00
|
|
|
"embedding" or "user" or "executable" interchangably in this documentation.
|
2018-02-16 03:32:03 +01:00
|
|
|
|
2018-12-20 20:03:01 +01:00
|
|
|
## Organization
|
2018-02-16 03:32:03 +01:00
|
|
|
|
2018-12-20 20:03:01 +01:00
|
|
|
##### Implied #include <ircd.h>
|
2018-02-16 03:32:03 +01:00
|
|
|
|
2018-12-20 20:03:01 +01:00
|
|
|
The `ircd.h` [standard include group](../include/ircd#what-to-include)
|
|
|
|
is pre-compiled and included *first* by default for every compilation unit in
|
|
|
|
this directory. Developers do not have to worry about including project headers
|
|
|
|
in a compilation unit, especially when creating and reorganizing either of them.
|
2018-02-16 03:32:03 +01:00
|
|
|
|
2018-12-20 20:03:01 +01:00
|
|
|
Note that because `ircd.h` is include _above_ any manually included header,
|
|
|
|
there is a theoretical possibility for a conflict. We make a serious effort
|
|
|
|
to prevent `ircd.h` from introducing pollution outside of our very specific
|
|
|
|
namespaces (see: [Project Namespaces](../include/ircd#project-namespaces)).
|
2018-02-16 03:32:03 +01:00
|
|
|
|
2018-12-20 20:03:01 +01:00
|
|
|
##### Dependency Isolation
|
2018-02-16 03:32:03 +01:00
|
|
|
|
2018-12-20 20:03:01 +01:00
|
|
|
Compilation units are primarily oriented around the inclusion of a specific
|
|
|
|
dependency which is not involved in the [ircd.h include group](../include/ircd#what-to-include).
|
2018-02-16 03:32:03 +01:00
|
|
|
|
2018-12-20 20:03:01 +01:00
|
|
|
For example, the `magic.cc` unit was created to include `<magic.h>`
|
|
|
|
internally and then provide definitions to our own interfaces in `ircd.h`. We
|
|
|
|
don't include `<magic.h>` from `ircd.h` nor do we include it from
|
|
|
|
any other compilation unit. This simply isolates `libmagic` as a dependency.
|