예제 #1
0
파일: query.hpp 프로젝트: cawka/ndns
 bool
 operator==(const Query& other) const
 {
   return (getHint() == other.getHint() && getZone() == other.getZone() &&
     getQueryType() == other.getQueryType() && getRrLabel() == other.getRrLabel() &&
     getRrType() == other.getRrType());
 }
예제 #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();
}