// Fake  DNS node module interface
// For crequire('dns') compartibility only
const NOT_IMPLEMENTED_IN_SYNODE = 'Not implemented in SyNode'

function lookup() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function lookupService() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function getServers() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function setServers() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function resolve() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function resolve4() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function resolve6() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function resolveCname() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function resolveMx() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function resolveNs() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function resolveTxt() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function resolveSrv() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function resolvePtr() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function resolveNaptr() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function resolveSoa() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}

function reverse() {
  throw new Error(NOT_IMPLEMENTED_IN_SYNODE)
}


module.exports = {
  lookup,
  lookupService,
  getServers,
  setServers,
  resolve,
  resolve4,
  resolve6,
  resolveCname,
  resolveMx,
  resolveNs,
  resolveTxt,
  resolveSrv,
  resolvePtr,
  resolveNaptr,
  resolveSoa,
  reverse,

  // uv_getaddrinfo flags
  ADDRCONFIG: 'cares.AI_ADDRCONFIG',
  V4MAPPED: 'cares.AI_V4MAPPED',

  // ERROR CODES
  NODATA: 'ENODATA',
  FORMERR: 'EFORMERR',
  SERVFAIL: 'ESERVFAIL',
  NOTFOUND: 'ENOTFOUND',
  NOTIMP: 'ENOTIMP',
  REFUSED: 'EREFUSED',
  BADQUERY: 'EBADQUERY',
  BADNAME: 'EBADNAME',
  BADFAMILY: 'EBADFAMILY',
  BADRESP: 'EBADRESP',
  CONNREFUSED: 'ECONNREFUSED',
  TIMEOUT: 'ETIMEOUT',
  EOF: 'EOF',
  FILE: 'EFILE',
  NOMEM: 'ENOMEM',
  DESTRUCTION: 'EDESTRUCTION',
  BADSTR: 'EBADSTR',
  BADFLAGS: 'EBADFLAGS',
  NONAME: 'ENONAME',
  BADHINTS: 'EBADHINTS',
  NOTINITIALIZED: 'ENOTINITIALIZED',
  LOADIPHLPAPI: 'ELOADIPHLPAPI',
  ADDRGETNETWORKPARAMS: 'EADDRGETNETWORKPARAMS',
  CANCELLED: 'ECANCELLED'
};
