/* EQEmu: EQEmulator Copyright (C) 2001-2026 EQEmu Development Team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #pragma once #include "common/eq_stream_intf.h" #include "common/timer.h" #include #include #include #define STREAM_IDENT_WAIT_MS 30000 class OpcodeManager; class StructStrategy; class EQStreamInterface; class EQStreamIdentifier { public: ~EQStreamIdentifier(); //registration interface. void RegisterPatch(EQStreamInterface::Signature sig, const char *name, OpcodeManager ** opcodes, const StructStrategy *structs); //main processing interface void Process(); void AddStream(std::shared_ptr eqs); EQStreamInterface *PopIdentified(); protected: //registered patches.. class Patch { public: std::string name; EQStreamInterface::Signature signature; OpcodeManager ** opcodes; const StructStrategy *structs; }; std::vector m_patches; //we own these objects. //pending streams.. class Record { public: Record(std::shared_ptr s); std::shared_ptr stream; //we own this Timer expire; }; std::vector m_streams; //we own these objects, and the streams contained in them. std::queue m_identified; //we own these objects };