// Matrix Construct // // Copyright (C) Matrix Construct Developers, Authors & Contributors // Copyright (C) 2016-2018 Jason Volk // // 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 #define HAVE_IRCD_M_FILTER_H #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsubobject-linkage" namespace ircd::m { struct filter; struct room_filter; struct event_filter; struct room_event_filter; bool match(const event_filter &, const event &); bool match(const room_event_filter &, const event &); } /// 5.1 "Filter" we use event_filter here struct ircd::m::event_filter :json::tuple < json::property, json::property, json::property, json::property, json::property > { using super_type::tuple; event_filter(const mutable_buffer &, const json::members &); event_filter() = default; using super_type::operator=; }; /// 5.1 "RoomEventFilter" struct ircd::m::room_event_filter :json::tuple < json::property, json::property, json::property, json::property, json::property, json::property, json::property, json::property > { using super_type::tuple; room_event_filter(const mutable_buffer &, const json::members &); room_event_filter() = default; using super_type::operator=; }; /// 5.1 "RoomFilter" struct ircd::m::room_filter :json::tuple < json::property, json::property, json::property, json::property, json::property, json::property, json::property > { using super_type::tuple; room_filter(const mutable_buffer &, const json::members &); room_filter() = default; using super_type::operator=; }; struct ircd::m::filter :json::tuple < json::property, json::property, json::property, json::property, json::property > { using super_type::tuple; filter(const user &, const string_view &filter_id, const mutable_buffer &); using super_type::operator=; }; #pragma GCC diagnostic pop