def DNSServiceAddRecord(sdRef, flags=0, rrtype=_NO_DEFAULT, rdata=_NO_DEFAULT, ttl=0):
 _NO_DEFAULT.check(rrtype)
 _NO_DEFAULT.check(rdata)
 (rdlen, rdata) = _string_to_length_and_void_p(rdata)
 _global_lock.acquire()
 try:
  RecordRef = _DNSServiceAddRecord(sdRef, flags, rrtype, rdlen, rdata, ttl)
 finally:
  _global_lock.release()
 sdRef._add_record_ref(RecordRef)
 return RecordRef

def DNSServiceAddRecord ( sdRef , flags = 0 , rrtype = _NO_DEFAULT , rdata = _NO_DEFAULT , ttl = 0 ) : _NO_DEFAULT . check ( rrtype ) _NO_DEFAULT . check ( rdata ) ( rdlen , rdata ) = _string_to_length_and_void_p ( rdata ) _global_lock . acquire ( ) try : RecordRef = _DNSServiceAddRecord ( sdRef , flags , rrtype , rdlen , rdata , ttl ) finally : _global_lock . release ( ) sdRef . _add_record_ref ( RecordRef ) return RecordRef
add a record to a registered service .