Files
Network/Network/Dns/QueryImpl.h
T
2020-06-10 11:48:41 +02:00

46 lines
877 B
C++

#ifndef NETWORK_DNS_QUERYIMPL_H
#define NETWORK_DNS_QUERYIMPL_H
#include "Data.h"
#include "DataReader.h"
#include "NameImpl.h"
#include "Dns/QueryClass.h"
#include "Dns/QueryType.h"
namespace Network {
namespace Dns {
class QueryImpl
{
public:
QueryImpl();
bool GetUnicast() const;
QueryType::type GetType() const;
QueryClass::type GetClass() const;
NameImpl GetName() const;
void SetUnicast(bool unicast);
void SetType(QueryType::type type);
void SetClass(QueryClass::type class_);
void SetName(const NameImpl& name);
Data GetData() const;
unsigned ReadFromData(DataReader reader, unsigned pos);
friend std::ostream& operator<<(std::ostream & stream, const QueryImpl& query);
private:
bool m_unicast;
NameImpl m_name;
QueryType::type m_type;
QueryClass::type m_class;
};
} // namespace Dns
} // namespace Network
#endif // NETWORK_DNS_QUERYIMPL_H