1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-01 00:27:44 +00:00
sapphire/src/lobby/LobbyPacketContainer.h

44 lines
820 B
C
Raw Normal View History

#ifndef LOBBY_PACKET_CONTAINER_H_
#define LOBBY_PACKET_CONTAINER_H_
2017-08-08 13:53:47 +02:00
2022-01-27 18:35:19 -03:00
#include <array>
2017-08-08 13:53:47 +02:00
#include <vector>
#include <string.h>
2018-03-06 22:22:19 +01:00
#include <Network/CommonNetwork.h>
#include <Util/Util.h>
2017-08-08 13:53:47 +02:00
#include "Forwards.h"
namespace Sapphire::Network::Packets
2018-10-28 21:53:21 +01:00
{
2017-08-08 13:53:47 +02:00
using FFXIVPacketBasePtr = std::shared_ptr< Sapphire::Network::Packets::FFXIVPacketBase >;
2017-08-08 13:53:47 +02:00
2018-10-28 21:53:21 +01:00
class LobbyPacketContainer
{
public:
LobbyPacketContainer( uint8_t* encKey = nullptr );
2017-08-08 13:53:47 +02:00
2018-10-28 21:53:21 +01:00
~LobbyPacketContainer();
2017-08-08 13:53:47 +02:00
2018-10-28 21:53:21 +01:00
void addPacket( FFXIVPacketBasePtr pEntry );
2017-08-08 13:53:47 +02:00
2018-10-28 21:53:21 +01:00
uint16_t getSize() const;
2018-10-28 21:53:21 +01:00
uint8_t* getRawData( bool addstuff = true );
2017-08-08 13:53:47 +02:00
2018-10-28 21:53:21 +01:00
private:
Sapphire::Network::Packets::FFXIVARR_PACKET_HEADER m_header;
2017-08-08 13:53:47 +02:00
2018-10-28 21:53:21 +01:00
uint8_t* m_encKey;
2017-08-08 13:53:47 +02:00
2018-10-28 21:53:21 +01:00
std::vector< FFXIVPacketBasePtr > m_entryList;
2022-01-27 18:35:19 -03:00
std::array< uint8_t, 0x2000 > m_dataBuf{ 0 };
2018-10-28 21:53:21 +01:00
};
2017-08-08 13:53:47 +02:00
}
#endif