1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 22:17:45 +00:00
sapphire/src/lobby/LobbyPacketContainer.h

43 lines
787 B
C
Raw Normal View History

#ifndef LOBBY_PACKET_CONTAINER_H_
#define LOBBY_PACKET_CONTAINER_H_
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::Lobby::Network::Packets
2018-10-28 21:53:21 +01:00
{
2017-08-08 13:53:47 +02:00
using FFXIVPacketBasePtr = std::shared_ptr< Common::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:
Common::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;
2018-10-28 21:53:21 +01:00
uint8_t m_dataBuf[0x2000];
2018-10-28 21:53:21 +01:00
};
2017-08-08 13:53:47 +02:00
}
#endif