2018-02-04 03:22:01 +01:00
|
|
|
// Matrix Construct
|
|
|
|
//
|
2018-01-14 03:03:04 +01:00
|
|
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
2018-02-04 03:22:01 +01:00
|
|
|
// Copyright (C) 2016-2018 Jason Volk <jason@zemos.net>
|
2018-01-14 03:03:04 +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
|
2018-02-04 03:22:01 +01:00
|
|
|
// copyright notice and this permission notice is present in all copies. The
|
|
|
|
// full license for this software is available in the LICENSE file.
|
2018-01-14 03:03:04 +01:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#define HAVE_IRCD_SERVER_H
|
|
|
|
|
|
|
|
/// The interface for when IRCd plays the role of client to other nodes
|
|
|
|
///
|
|
|
|
namespace ircd::server
|
|
|
|
{
|
|
|
|
struct init;
|
|
|
|
struct link;
|
|
|
|
struct node;
|
2018-01-15 09:11:32 +01:00
|
|
|
struct request;
|
|
|
|
struct tag;
|
2018-01-14 03:03:04 +01:00
|
|
|
|
|
|
|
IRCD_EXCEPTION(ircd::error, error);
|
2018-01-16 09:45:51 +01:00
|
|
|
IRCD_EXCEPTION(error, buffer_overrun);
|
2018-01-16 13:01:26 +01:00
|
|
|
IRCD_EXCEPTION(error, unavailable);
|
|
|
|
IRCD_EXCEPTION(error, canceled);
|
2018-01-14 03:03:04 +01:00
|
|
|
|
|
|
|
extern ircd::log::log log;
|
|
|
|
extern std::map<string_view, std::shared_ptr<node>> nodes;
|
|
|
|
|
2018-01-16 05:04:45 +01:00
|
|
|
size_t tag_count();
|
|
|
|
size_t link_count();
|
|
|
|
size_t node_count();
|
2018-01-16 03:04:23 +01:00
|
|
|
|
2018-01-14 03:03:04 +01:00
|
|
|
bool exists(const net::hostport &);
|
|
|
|
node &find(const net::hostport &);
|
|
|
|
node &get(const net::hostport &);
|
|
|
|
}
|
|
|
|
|
2018-01-15 06:09:35 +01:00
|
|
|
#include "tag.h"
|
2018-01-15 09:11:32 +01:00
|
|
|
#include "request.h"
|
2018-01-14 03:03:04 +01:00
|
|
|
#include "link.h"
|
|
|
|
#include "node.h"
|
|
|
|
|
|
|
|
/// Subsystem initialization / destruction from ircd::main
|
|
|
|
///
|
|
|
|
struct ircd::server::init
|
|
|
|
{
|
|
|
|
void interrupt();
|
|
|
|
|
|
|
|
init();
|
|
|
|
~init() noexcept;
|
|
|
|
};
|