def DNSServiceRegisterRecord(sdRef, flags, interfaceIndex=kDNSServiceInterfaceIndexAny, fullname=_NO_DEFAULT, rrtype=_NO_DEFAULT, rrclass=kDNSServiceClass_IN, rdata=_NO_DEFAULT, ttl=0, callBack=None):
 _NO_DEFAULT.check(fullname)
 _NO_DEFAULT.check(rrtype)
 _NO_DEFAULT.check(rdata)
 (rdlen, rdata) = _string_to_length_and_void_p(rdata)
 @_DNSServiceRegisterRecordReply
 def _callback(sdRef, RecordRef, flags, errorCode, context):
  if (callBack is not None):
   callBack(sdRef, RecordRef, flags, errorCode)
 _global_lock.acquire()
 try:
  RecordRef = _DNSServiceRegisterRecord(sdRef, flags, interfaceIndex, fullname, rrtype, rrclass, rdlen, rdata, ttl, _callback, None)
 finally:
  _global_lock.release()
 sdRef._add_callback(_callback)
 sdRef._add_record_ref(RecordRef)
 return RecordRef

def DNSServiceRegisterRecord ( sdRef , flags , interfaceIndex = kDNSServiceInterfaceIndexAny , fullname = _NO_DEFAULT , rrtype = _NO_DEFAULT , rrclass = kDNSServiceClass_IN , rdata = _NO_DEFAULT , ttl = 0 , callBack = None ) : _NO_DEFAULT . check ( fullname ) _NO_DEFAULT . check ( rrtype ) _NO_DEFAULT . check ( rdata ) ( rdlen , rdata ) = _string_to_length_and_void_p ( rdata ) @ _DNSServiceRegisterRecordReply def _callback ( sdRef , RecordRef , flags , errorCode , context ) : if ( callBack is not None ) : callBack ( sdRef , RecordRef , flags , errorCode ) _global_lock . acquire ( ) try : RecordRef = _DNSServiceRegisterRecord ( sdRef , flags , interfaceIndex , fullname , rrtype , rrclass , rdlen , rdata , ttl , _callback , None ) finally : _global_lock . release ( ) sdRef . _add_callback ( _callback ) sdRef . _add_record_ref ( RecordRef ) return RecordRef
register an individual resource record on a connected dnsserviceref .