0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd:Ⓜ️ Fix subobject-linkage.

This commit is contained in:
Jason Volk 2019-01-18 12:56:44 -08:00
parent 52e6c28383
commit b947aee02d
20 changed files with 267 additions and 172 deletions

View file

@ -18,8 +18,6 @@ namespace ircd::m::app
struct registration;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::app::namespace_
:json::tuple
<
@ -34,10 +32,7 @@ struct ircd::m::app::namespace_
{
using super_type::tuple;
};
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::app::namespaces
:json::tuple
<
@ -53,10 +48,7 @@ struct ircd::m::app::namespaces
{
using super_type::tuple;
};
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::app::registration
:json::tuple
<
@ -93,4 +85,3 @@ struct ircd::m::app::registration
{
using super_type::tuple;
};
#pragma GCC diagnostic pop

View file

@ -16,8 +16,6 @@ namespace ircd::m
struct createroom;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::createroom
:json::tuple
<
@ -38,7 +36,7 @@ struct ircd::m::createroom
/// If this is included, an m.room.name event will be sent into the room
/// to indicate the name of the room. See Room Events for more information
/// on m.room.name.
json::property<name::name, json::string>,
json::property<name::name_, json::string>,
/// If this is included, an m.room.topic event will be sent into the room to
/// indicate the topic for the room. See Room Events for more information on
@ -88,4 +86,3 @@ struct ircd::m::createroom
{
using super_type::tuple;
};
#pragma GCC diagnostic pop

View file

@ -16,8 +16,6 @@ namespace ircd::m
struct edu;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::edu
:json::tuple
<
@ -32,4 +30,3 @@ struct ircd::m::edu
using super_type::tuple;
using super_type::operator=;
};
#pragma GCC diagnostic pop

View file

@ -46,8 +46,6 @@ namespace ircd::m
ed25519::sig sign(const event &);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
/// The Main Event
///
/// This json::tuple provides at least all of the legal members of the matrix
@ -116,4 +114,3 @@ struct ircd::m::event
event(const json::object &, const keys &);
event() = default;
};
#pragma GCC diagnostic pop

View file

@ -25,8 +25,6 @@ namespace ircd::m
std::string pretty_oneline(const event::prev &);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::event::prev
:json::tuple
<
@ -56,4 +54,3 @@ struct ircd::m::event::prev
using super_type::tuple;
using super_type::operator=;
};
#pragma GCC diagnostic pop

View file

@ -10,8 +10,6 @@
#pragma once
#define HAVE_IRCD_M_FILTER_H
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
namespace ircd::m
{
@ -94,5 +92,3 @@ struct ircd::m::filter
filter(const user &, const string_view &filter_id, const mutable_buffer &);
using super_type::operator=;
};
#pragma GCC diagnostic pop

View file

@ -16,8 +16,6 @@ namespace ircd::m
struct invite_3pid;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::invite_3pid
:json::tuple
<
@ -35,4 +33,3 @@ struct ircd::m::invite_3pid
{
using super_type::tuple;
};
#pragma GCC diagnostic pop

View file

@ -18,8 +18,6 @@ namespace ircd::m
bool verify(const m::keys &);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
/// Contains the public keys and proof of identity for a remote server.
///
/// A user who wishes to verify a signature from a remote server must have
@ -62,4 +60,3 @@ struct ircd::m::keys
using super_type::tuple;
using super_type::operator=;
};
#pragma GCC diagnostic pop

View file

@ -16,8 +16,6 @@ namespace ircd::m
struct login;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::login
:json::tuple
<
@ -54,4 +52,3 @@ struct ircd::m::login
{
using super_type::tuple;
};
#pragma GCC diagnostic pop

View file

@ -11,6 +11,11 @@
#pragma once
#define HAVE_IRCD_M_NAME_H
namespace ircd::m
{
struct name;
}
/// All strings used for json::tuple keys in ircd::m (matrix protocol) are
/// contained within this namespace. These strings allow constant time access
/// to JSON in a tuple using recursive constexpr function inlining provided by
@ -20,129 +25,128 @@
/// to where they're used because:
///
/// * There can't be any duplicates.
/// * Eventually addressing the issue of subobject-linkage might be easier;
/// this namespace could become a struct with linkage if that ever helps.
/// * Addressing the issue of subobject-linkage.
///
namespace ircd::m::name
struct ircd::m::name
{
constexpr const char *const auth_events {"auth_events"};
constexpr const char *const content {"content"};
constexpr const char *const depth {"depth"};
constexpr const char *const event_id {"event_id"};
constexpr const char *const hashes {"hashes"};
constexpr const char *const membership {"membership"};
constexpr const char *const origin {"origin"};
constexpr const char *const origin_server_ts {"origin_server_ts"};
constexpr const char *const prev_events {"prev_events"};
constexpr const char *const prev_state {"prev_state"};
constexpr const char *const redacts {"redacts"};
constexpr const char *const room_id {"room_id"};
constexpr const char *const sender {"sender"};
constexpr const char *const signatures {"signatures"};
constexpr const char *const state_key {"state_key"};
constexpr const char *const type {"type"};
constexpr const char *const unsigned_ {"unsigned"};
static constexpr const char *const auth_events {"auth_events"};
static constexpr const char *const content {"content"};
static constexpr const char *const depth {"depth"};
static constexpr const char *const event_id {"event_id"};
static constexpr const char *const hashes {"hashes"};
static constexpr const char *const membership {"membership"};
static constexpr const char *const origin {"origin"};
static constexpr const char *const origin_server_ts {"origin_server_ts"};
static constexpr const char *const prev_events {"prev_events"};
static constexpr const char *const prev_state {"prev_state"};
static constexpr const char *const redacts {"redacts"};
static constexpr const char *const room_id {"room_id"};
static constexpr const char *const sender {"sender"};
static constexpr const char *const signatures {"signatures"};
static constexpr const char *const state_key {"state_key"};
static constexpr const char *const type {"type"};
static constexpr const char *const unsigned_ {"unsigned"};
constexpr const char *const edus {"edus"};
constexpr const char *const pdu_failures {"pdu_failures"};
constexpr const char *const pdus {"pdus"};
static constexpr const char *const edus {"edus"};
static constexpr const char *const pdu_failures {"pdu_failures"};
static constexpr const char *const pdus {"pdus"};
constexpr const char *const destination {"destination"};
constexpr const char *const method {"method"};
constexpr const char *const uri {"uri"};
static constexpr const char *const destination {"destination"};
static constexpr const char *const method {"method"};
static constexpr const char *const uri {"uri"};
constexpr const char *const old_verify_keys {"old_verify_keys"};
constexpr const char *const server_name {"server_name"};
constexpr const char *const tls_fingerprints {"tls_fingerprints"};
constexpr const char *const valid_until_ts {"valid_until_ts"};
constexpr const char *const verify_keys {"verify_keys"};
static constexpr const char *const old_verify_keys {"old_verify_keys"};
static constexpr const char *const server_name {"server_name"};
static constexpr const char *const tls_fingerprints {"tls_fingerprints"};
static constexpr const char *const valid_until_ts {"valid_until_ts"};
static constexpr const char *const verify_keys {"verify_keys"};
constexpr const char *const m_room_aliases {"m.room.aliases"};
constexpr const char *const m_room_canonical_alias {"m.room.canonical_alias"};
constexpr const char *const m_room_create {"m.room.create"};
constexpr const char *const m_room_join_rules {"m.room.join_rules"};
constexpr const char *const m_room_member {"m.room.member"};
constexpr const char *const m_room_power_levels {"m.room.power_levels"};
constexpr const char *const m_room_message {"m.room.message"};
constexpr const char *const m_room_name {"m.room.name"};
constexpr const char *const m_room_topic {"m.room.topic"};
constexpr const char *const m_room_avatar {"m.room.avatar"};
constexpr const char *const m_room_pinned_events {"m.room.pinned_events"};
constexpr const char *const m_room_history_visibility {"m.room.history_visibility"};
constexpr const char *const m_room_third_party_invite {"m.room.third_party_invite"};
constexpr const char *const m_room_guest_access {"m.room.guest_access"};
static constexpr const char *const m_room_aliases {"m.room.aliases"};
static constexpr const char *const m_room_canonical_alias {"m.room.canonical_alias"};
static constexpr const char *const m_room_create {"m.room.create"};
static constexpr const char *const m_room_join_rules {"m.room.join_rules"};
static constexpr const char *const m_room_member {"m.room.member"};
static constexpr const char *const m_room_power_levels {"m.room.power_levels"};
static constexpr const char *const m_room_message {"m.room.message"};
static constexpr const char *const m_room_name {"m.room.name"};
static constexpr const char *const m_room_topic {"m.room.topic"};
static constexpr const char *const m_room_avatar {"m.room.avatar"};
static constexpr const char *const m_room_pinned_events {"m.room.pinned_events"};
static constexpr const char *const m_room_history_visibility {"m.room.history_visibility"};
static constexpr const char *const m_room_third_party_invite {"m.room.third_party_invite"};
static constexpr const char *const m_room_guest_access {"m.room.guest_access"};
constexpr const char *const event_fields {"event_fields"};
constexpr const char *const event_format {"event_format"};
constexpr const char *const account_data {"account_data"};
constexpr const char *const presence {"presence"};
constexpr const char *const room {"room"};
constexpr const char *const timeline {"timeline"};
constexpr const char *const ephemeral {"ephemeral"};
constexpr const char *const state {"state"};
constexpr const char *const rooms {"rooms"};
constexpr const char *const not_rooms {"not_rooms"};
constexpr const char *const include_leave {"include_leave"};
constexpr const char *const types {"types"};
constexpr const char *const not_types {"not_types"};
constexpr const char *const senders {"senders"};
constexpr const char *const not_senders {"not_senders"};
constexpr const char *const limit {"limit"};
constexpr const char *const contains_url {"contains_url"};
static constexpr const char *const event_fields {"event_fields"};
static constexpr const char *const event_format {"event_format"};
static constexpr const char *const account_data {"account_data"};
static constexpr const char *const presence {"presence"};
static constexpr const char *const room {"room"};
static constexpr const char *const timeline {"timeline"};
static constexpr const char *const ephemeral {"ephemeral"};
static constexpr const char *const state {"state"};
static constexpr const char *const rooms {"rooms"};
static constexpr const char *const not_rooms {"not_rooms"};
static constexpr const char *const include_leave {"include_leave"};
static constexpr const char *const types {"types"};
static constexpr const char *const not_types {"not_types"};
static constexpr const char *const senders {"senders"};
static constexpr const char *const not_senders {"not_senders"};
static constexpr const char *const limit {"limit"};
static constexpr const char *const contains_url {"contains_url"};
constexpr const char *const edu_type {"edu_type"};
static constexpr const char *const edu_type {"edu_type"};
constexpr const char *const user_id {"user_id"};
constexpr const char *const last_active_ago {"last_active_ago"};
constexpr const char *const currently_active {"currently_active"};
constexpr const char *const status_msg {"status_msg"};
static constexpr const char *const user_id {"user_id"};
static constexpr const char *const last_active_ago {"last_active_ago"};
static constexpr const char *const currently_active {"currently_active"};
static constexpr const char *const status_msg {"status_msg"};
constexpr const char *const ts {"ts"};
constexpr const char *const data {"data"};
constexpr const char *const event_ids {"event_ids"};
static constexpr const char *const ts {"ts"};
static constexpr const char *const data {"data"};
static constexpr const char *const event_ids {"event_ids"};
constexpr const char *const typing {"typing"};
constexpr const char *const timeout {"timeout"};
static constexpr const char *const typing {"typing"};
static constexpr const char *const timeout {"timeout"};
constexpr const char *const user {"user"};
constexpr const char *const medium {"medium"};
constexpr const char *const address {"address"};
constexpr const char *const password {"password"};
constexpr const char *const token {"token"};
constexpr const char *const device_id {"device_id"};
constexpr const char *const initial_device_display_name {"initial_device_display_name"};
static constexpr const char *const user {"user"};
static constexpr const char *const medium {"medium"};
static constexpr const char *const address {"address"};
static constexpr const char *const password {"password"};
static constexpr const char *const token {"token"};
static constexpr const char *const device_id {"device_id"};
static constexpr const char *const initial_device_display_name {"initial_device_display_name"};
constexpr const char *const username {"username"};
constexpr const char *const bind_email {"bind_email"};
constexpr const char *const auth {"auth"};
constexpr const char *const inhibit_login {"inhibit_login"};
static constexpr const char *const username {"username"};
static constexpr const char *const bind_email {"bind_email"};
static constexpr const char *const auth {"auth"};
static constexpr const char *const inhibit_login {"inhibit_login"};
constexpr const char *const visibility {"visibility"};
constexpr const char *const room_alias_name {"room_alias_name"};
constexpr const char *const name {"name"};
constexpr const char *const topic {"topic"};
constexpr const char *const invite {"invite"};
constexpr const char *const invite_3pid {"invite_3pid"};
constexpr const char *const creation_content {"creation_content"};
constexpr const char *const initial_state {"initial_state"};
constexpr const char *const preset {"preset"};
constexpr const char *const is_direct {"is_direct"};
constexpr const char *const guest_can_join {"guest_can_join"};
static constexpr const char *const visibility {"visibility"};
static constexpr const char *const room_alias_name {"room_alias_name"};
static constexpr const char *const name_ {"name"};
static constexpr const char *const topic {"topic"};
static constexpr const char *const invite {"invite"};
static constexpr const char *const invite_3pid {"invite_3pid"};
static constexpr const char *const creation_content {"creation_content"};
static constexpr const char *const initial_state {"initial_state"};
static constexpr const char *const preset {"preset"};
static constexpr const char *const is_direct {"is_direct"};
static constexpr const char *const guest_can_join {"guest_can_join"};
constexpr const char *const id_server {"id_server"};
static constexpr const char *const id_server {"id_server"};
constexpr const char *const id {"id"};
constexpr const char *const url {"url"};
constexpr const char *const as_token {"as_token"};
constexpr const char *const hs_token {"hs_token"};
constexpr const char *const sender_localpart {"sender_localpart"};
constexpr const char *const namespaces {"namespaces"};
constexpr const char *const rate_limited {"rate_limited"};
constexpr const char *const protocols {"protocols"};
static constexpr const char *const id {"id"};
static constexpr const char *const url {"url"};
static constexpr const char *const as_token {"as_token"};
static constexpr const char *const hs_token {"hs_token"};
static constexpr const char *const sender_localpart {"sender_localpart"};
static constexpr const char *const namespaces {"namespaces"};
static constexpr const char *const rate_limited {"rate_limited"};
static constexpr const char *const protocols {"protocols"};
constexpr const char *const users {"users"};
constexpr const char *const aliases {"aliases"};
static constexpr const char *const users {"users"};
static constexpr const char *const aliases {"aliases"};
constexpr const char *const exclusive {"exclusive"};
constexpr const char *const regex {"regex"};
}
static constexpr const char *const exclusive {"exclusive"};
static constexpr const char *const regex {"regex"};
};

View file

@ -16,8 +16,6 @@ namespace ircd::m
struct presence;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::edu::m_presence
:json::tuple
<
@ -31,7 +29,6 @@ struct ircd::m::edu::m_presence
using super_type::tuple;
using super_type::operator=;
};
#pragma GCC diagnostic pop
struct ircd::m::presence
:edu::m_presence

View file

@ -27,8 +27,6 @@ struct ircd::m::edu::m_receipt
struct m_read;
};
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::edu::m_receipt::m_read
:json::tuple
<
@ -39,4 +37,3 @@ struct ircd::m::edu::m_receipt::m_read
using super_type::tuple;
using super_type::operator=;
};
#pragma GCC diagnostic pop

View file

@ -16,8 +16,6 @@ namespace ircd::m
struct registar;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::registar
:json::tuple
<
@ -31,4 +29,3 @@ struct ircd::m::registar
{
using super_type::tuple;
};
#pragma GCC diagnostic pop

View file

@ -20,8 +20,6 @@ namespace ircd::m
/// protocol uses a JSON authorization object to create the X-Matrix
/// authorization header on federation requests.
///
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::request
:json::tuple
<
@ -63,7 +61,6 @@ struct ircd::m::request
using super_type::tuple;
request() = default;
};
#pragma GCC diagnostic pop
struct ircd::m::request::x_matrix
{

View file

@ -29,6 +29,7 @@
///
namespace ircd::m::state
{
struct name;
struct node;
constexpr size_t ID_MAX_SZ { 64 };
@ -89,16 +90,13 @@ namespace ircd::m::state
}
/// JSON property name strings specifically for use in m::state
namespace ircd::m::state::name
struct ircd::m::state::name
{
constexpr const char *const key {"k"};
constexpr const char *const val {"v"};
constexpr const char *const child {"c"};
constexpr const char *const count {"n"};
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
static constexpr const char *const key {"k"};
static constexpr const char *const val {"v"};
static constexpr const char *const child {"c"};
static constexpr const char *const count {"n"};
};
/// Format for node: Node is plaintext and not binary at this time. In fact,
/// *evil chuckle*, node might as well be JSON and can easily become content
@ -177,7 +175,6 @@ struct ircd::m::state::node
using super_type::tuple;
using super_type::operator=;
};
#pragma GCC diagnostic pop
/// Internal representation of a node for manipulation purposes. This is
/// because json::tuple's (like most of json::) are oriented around the

View file

@ -10,8 +10,6 @@
#pragma once
#define HAVE_IRCD_M_TXN_H
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
namespace ircd::m
{
@ -41,5 +39,3 @@ struct ircd::m::txn
using super_type::tuple;
using super_type::operator=;
};
#pragma GCC diagnostic pop

View file

@ -16,8 +16,6 @@ namespace ircd::m
struct typing;
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsubobject-linkage"
struct ircd::m::edu::m_typing
:json::tuple
<
@ -30,7 +28,6 @@ struct ircd::m::edu::m_typing
using super_type::tuple;
using super_type::operator=;
};
#pragma GCC diagnostic pop
struct ircd::m::typing
:m::edu::m_typing

View file

@ -127,6 +127,7 @@ libircd_la_SOURCES = \
server.cc \
client.cc \
resource.cc \
m/name.cc \
m/id.cc \
m/event.cc \
m/dbs.cc \

130
ircd/m/name.cc Normal file
View file

@ -0,0 +1,130 @@
// Matrix Construct
//
// Copyright (C) Matrix Construct Developers, Authors & Contributors
// Copyright (C) 2016-2018 Jason Volk <jason@zemos.net>
//
// 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.
constexpr const char *const ircd::m::name::auth_events;
constexpr const char *const ircd::m::name::content;
constexpr const char *const ircd::m::name::depth;
constexpr const char *const ircd::m::name::event_id;
constexpr const char *const ircd::m::name::hashes;
constexpr const char *const ircd::m::name::membership;
constexpr const char *const ircd::m::name::origin;
constexpr const char *const ircd::m::name::origin_server_ts;
constexpr const char *const ircd::m::name::prev_events;
constexpr const char *const ircd::m::name::prev_state;
constexpr const char *const ircd::m::name::redacts;
constexpr const char *const ircd::m::name::room_id;
constexpr const char *const ircd::m::name::sender;
constexpr const char *const ircd::m::name::signatures;
constexpr const char *const ircd::m::name::state_key;
constexpr const char *const ircd::m::name::type;
constexpr const char *const ircd::m::name::unsigned_;
constexpr const char *const ircd::m::name::edus;
constexpr const char *const ircd::m::name::pdu_failures;
constexpr const char *const ircd::m::name::pdus;
constexpr const char *const ircd::m::name::destination;
constexpr const char *const ircd::m::name::method;
constexpr const char *const ircd::m::name::uri;
constexpr const char *const ircd::m::name::old_verify_keys;
constexpr const char *const ircd::m::name::server_name;
constexpr const char *const ircd::m::name::tls_fingerprints;
constexpr const char *const ircd::m::name::valid_until_ts;
constexpr const char *const ircd::m::name::verify_keys;
constexpr const char *const ircd::m::name::m_room_aliases;
constexpr const char *const ircd::m::name::m_room_canonical_alias;
constexpr const char *const ircd::m::name::m_room_create;
constexpr const char *const ircd::m::name::m_room_join_rules;
constexpr const char *const ircd::m::name::m_room_member;
constexpr const char *const ircd::m::name::m_room_power_levels;
constexpr const char *const ircd::m::name::m_room_message;
constexpr const char *const ircd::m::name::m_room_name;
constexpr const char *const ircd::m::name::m_room_topic;
constexpr const char *const ircd::m::name::m_room_avatar;
constexpr const char *const ircd::m::name::m_room_pinned_events;
constexpr const char *const ircd::m::name::m_room_history_visibility;
constexpr const char *const ircd::m::name::m_room_third_party_invite;
constexpr const char *const ircd::m::name::m_room_guest_access;
constexpr const char *const ircd::m::name::event_fields;
constexpr const char *const ircd::m::name::event_format;
constexpr const char *const ircd::m::name::account_data;
constexpr const char *const ircd::m::name::presence;
constexpr const char *const ircd::m::name::room;
constexpr const char *const ircd::m::name::timeline;
constexpr const char *const ircd::m::name::ephemeral;
constexpr const char *const ircd::m::name::state;
constexpr const char *const ircd::m::name::rooms;
constexpr const char *const ircd::m::name::not_rooms;
constexpr const char *const ircd::m::name::include_leave;
constexpr const char *const ircd::m::name::types;
constexpr const char *const ircd::m::name::not_types;
constexpr const char *const ircd::m::name::senders;
constexpr const char *const ircd::m::name::not_senders;
constexpr const char *const ircd::m::name::limit;
constexpr const char *const ircd::m::name::contains_url;
constexpr const char *const ircd::m::name::edu_type;
constexpr const char *const ircd::m::name::user_id;
constexpr const char *const ircd::m::name::last_active_ago;
constexpr const char *const ircd::m::name::currently_active;
constexpr const char *const ircd::m::name::status_msg;
constexpr const char *const ircd::m::name::ts;
constexpr const char *const ircd::m::name::data;
constexpr const char *const ircd::m::name::event_ids;
constexpr const char *const ircd::m::name::typing;
constexpr const char *const ircd::m::name::timeout;
constexpr const char *const ircd::m::name::user;
constexpr const char *const ircd::m::name::medium;
constexpr const char *const ircd::m::name::address;
constexpr const char *const ircd::m::name::password;
constexpr const char *const ircd::m::name::token;
constexpr const char *const ircd::m::name::device_id;
constexpr const char *const ircd::m::name::initial_device_display_name;
constexpr const char *const ircd::m::name::username;
constexpr const char *const ircd::m::name::bind_email;
constexpr const char *const ircd::m::name::auth;
constexpr const char *const ircd::m::name::inhibit_login;
constexpr const char *const ircd::m::name::visibility;
constexpr const char *const ircd::m::name::room_alias_name;
constexpr const char *const ircd::m::name::name_;
constexpr const char *const ircd::m::name::topic;
constexpr const char *const ircd::m::name::invite;
constexpr const char *const ircd::m::name::invite_3pid;
constexpr const char *const ircd::m::name::creation_content;
constexpr const char *const ircd::m::name::initial_state;
constexpr const char *const ircd::m::name::preset;
constexpr const char *const ircd::m::name::is_direct;
constexpr const char *const ircd::m::name::guest_can_join;
constexpr const char *const ircd::m::name::id_server;
constexpr const char *const ircd::m::name::id;
constexpr const char *const ircd::m::name::url;
constexpr const char *const ircd::m::name::as_token;
constexpr const char *const ircd::m::name::hs_token;
constexpr const char *const ircd::m::name::sender_localpart;
constexpr const char *const ircd::m::name::namespaces;
constexpr const char *const ircd::m::name::rate_limited;
constexpr const char *const ircd::m::name::protocols;
constexpr const char *const ircd::m::name::users;
constexpr const char *const ircd::m::name::aliases;
constexpr const char *const ircd::m::name::exclusive;
constexpr const char *const ircd::m::name::regex;

View file

@ -8,6 +8,22 @@
// copyright notice and this permission notice is present in all copies. The
// full license for this software is available in the LICENSE file.
// Linkages for the state::node json::tuple property strings. This is similar
// to m::name (name.h / name.cc) but since this is very specific to m::state
// we keep it here.
constexpr const char *const
ircd::m::state::name::key;
constexpr const char *const
ircd::m::state::name::val;
constexpr const char *const
ircd::m::state::name::child;
constexpr const char *const
ircd::m::state::name::count;
/// Convenience to make a key and then get a value
void
ircd::m::state::get(const string_view &root,