Exemplo n.º 1
0
Arquivo: query.hpp Projeto: cawka/ndns
 bool
 operator==(const Query& other) const
 {
   return (getHint() == other.getHint() && getZone() == other.getZone() &&
     getQueryType() == other.getQueryType() && getRrLabel() == other.getRrLabel() &&
     getRrType() == other.getRrType());
 }
Exemplo n.º 2
0
bool
Response::operator==(const Response& other) const
{
  bool tmp = (getZone() == other.getZone() &&
              getQueryType() == other.getQueryType() && getRrLabel() == other.getRrLabel() &&
              getRrType() == other.getRrType() && getVersion() == other.getVersion() &&
              getContentType() == other.getContentType());

  if (tmp == false)
    return tmp;

  if (m_contentType == NDNS_BLOB || m_contentType == NDNS_KEY) {
    return tmp && (getAppContent() == other.getAppContent());
  }
  else
    return tmp && getRrs() == other.getRrs();
}