#pragma once #include "connection.hpp" #include "client.hpp" #include "settings.hpp" #include #include #include #include class Registration : public std::enable_shared_from_this { Connection &connection_; const Settings &settings_; std::shared_ptr self_; std::unordered_map caps; std::unordered_set outstanding; boost::signals2::scoped_connection slot_; auto on_connect() -> void; auto send_req() -> void; auto on_msg_cap_ls(const IrcMsg &msg) -> void; auto on_msg_cap_ack(const IrcMsg &msg) -> void; auto listen_for_cap_ack() -> void; auto listen_for_cap_ls() -> void; public: Registration( Connection &, const Settings &, std::shared_ptr ); static auto start( Connection &, const Settings &, std::shared_ptr ) -> std::shared_ptr; };