2018-01-22 03:32:15 -08:00
|
|
|
// Matrix Construct
|
|
|
|
//
|
|
|
|
// Copyright (C) Matrix Construct Developers, Authors & Contributors
|
2019-07-11 20:27:59 -07:00
|
|
|
// Copyright (C) 2016-2019 Jason Volk <jason@zemos.net>
|
2018-01-22 03:32:15 -08: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.
|
|
|
|
|
|
|
|
#pragma once
|
2019-07-11 20:27:59 -07:00
|
|
|
#define HAVE_IRCD_M_FED_H
|
2018-01-22 03:32:15 -08:00
|
|
|
|
2020-03-07 17:15:58 -08:00
|
|
|
/// Federation Interface
|
2020-03-05 19:35:20 -08:00
|
|
|
namespace ircd::m::fed
|
2018-04-05 22:11:46 -07:00
|
|
|
{
|
2020-03-05 20:10:55 -08:00
|
|
|
net::hostport matrix_service(net::hostport);
|
2020-03-07 17:15:58 -08:00
|
|
|
|
2020-03-07 17:09:09 -08:00
|
|
|
id::event::buf fetch_head(const id::room &room_id, const string_view &remote, const id::user &);
|
|
|
|
id::event::buf fetch_head(const id::room &room_id, const string_view &remote);
|
2020-03-07 19:01:59 -08:00
|
|
|
|
|
|
|
string_view fetch_well_known(const mutable_buffer &out, const string_view &origin);
|
|
|
|
string_view well_known(const mutable_buffer &out, const string_view &origin);
|
2018-04-05 22:11:46 -07:00
|
|
|
}
|
|
|
|
|
2020-03-07 17:15:58 -08:00
|
|
|
#include "request.h"
|
2018-02-19 14:34:34 -08:00
|
|
|
#include "version.h"
|
2018-05-07 14:46:53 -07:00
|
|
|
#include "key.h"
|
2018-02-24 23:53:32 -08:00
|
|
|
#include "query.h"
|
2018-04-02 18:24:57 -07:00
|
|
|
#include "user.h"
|
2019-02-07 21:04:52 -08:00
|
|
|
#include "user_keys.h"
|
2018-01-22 03:32:15 -08:00
|
|
|
#include "make_join.h"
|
2018-01-22 10:05:45 -08:00
|
|
|
#include "send_join.h"
|
2018-04-03 12:58:18 -07:00
|
|
|
#include "invite.h"
|
2019-07-11 20:32:32 -07:00
|
|
|
#include "invite2.h"
|
2018-01-22 03:32:15 -08:00
|
|
|
#include "event.h"
|
2018-04-08 11:27:59 -07:00
|
|
|
#include "event_auth.h"
|
2019-02-16 14:24:56 -08:00
|
|
|
#include "query_auth.h"
|
2018-01-22 03:32:15 -08:00
|
|
|
#include "state.h"
|
|
|
|
#include "backfill.h"
|
2018-06-03 18:43:17 -07:00
|
|
|
#include "frontfill.h"
|
2018-04-08 13:27:18 -07:00
|
|
|
#include "public_rooms.h"
|
2018-01-22 10:05:45 -08:00
|
|
|
#include "send.h"
|
2018-03-28 01:00:08 -07:00
|
|
|
#include "groups.h"
|
2020-03-05 20:10:55 -08:00
|
|
|
|
|
|
|
inline ircd::net::hostport
|
|
|
|
ircd::m::fed::matrix_service(net::hostport remote)
|
|
|
|
{
|
|
|
|
net::service(remote) = net::service(remote)?: m::canon_service;
|
|
|
|
return remote;
|
|
|
|
}
|