2016-06-30 11:06:53 -07:00
|
|
|
#ifndef DIGGLER_NET_MSGTYPES_SERVERINFO_HPP
|
|
|
|
#define DIGGLER_NET_MSGTYPES_SERVERINFO_HPP
|
|
|
|
|
2016-05-01 09:55:57 -07:00
|
|
|
#include "MsgType.hpp"
|
2015-11-05 11:59:49 -08:00
|
|
|
|
2018-01-11 11:04:15 -08:00
|
|
|
#include <meiose/variant.hpp>
|
2016-06-30 11:06:53 -07:00
|
|
|
|
2015-11-05 11:59:49 -08:00
|
|
|
namespace Diggler {
|
|
|
|
namespace Net {
|
|
|
|
namespace MsgTypes {
|
|
|
|
|
|
|
|
enum class ServerInfoSubtype : uint8 {
|
2016-06-30 15:13:51 -07:00
|
|
|
Request = 0,
|
|
|
|
Response = 1
|
2015-11-05 11:59:49 -08:00
|
|
|
};
|
|
|
|
|
2016-05-01 09:55:57 -07:00
|
|
|
struct ServerInfoRequest : public MsgType {
|
2016-06-30 15:13:51 -07:00
|
|
|
std::vector<std::string> infos;
|
2018-01-11 11:04:15 -08:00
|
|
|
meiose::variant params;
|
2015-11-05 11:59:49 -08:00
|
|
|
|
2016-06-30 15:13:51 -07:00
|
|
|
void writeToMsg(OutMessage&) const override;
|
|
|
|
void readFromMsg(InMessage&) override;
|
2015-11-05 11:59:49 -08:00
|
|
|
};
|
|
|
|
|
2016-05-01 09:55:57 -07:00
|
|
|
struct ServerInfoResponse : public MsgType {
|
2018-01-11 11:04:15 -08:00
|
|
|
meiose::variant infos;
|
2016-05-01 09:55:57 -07:00
|
|
|
|
2016-06-30 15:13:51 -07:00
|
|
|
void writeToMsg(OutMessage&) const override;
|
|
|
|
void readFromMsg(InMessage&) override;
|
2015-11-05 11:59:49 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-06-30 11:06:53 -07:00
|
|
|
#endif /* DIGGLER_NET_MSGTYPES_SERVERINFO_HPP */
|