-class AppleRecordRegistrar extends AppleService implements DNSSDRecordRegistrar
-{
- public AppleRecordRegistrar( RegisterRecordListener listener)
- throws DNSSDException
- {
- super(listener);
- this.ThrowOnErr( this.CreateConnection());
- if ( !AppleDNSSD.hasAutoCallbacks)
- new Thread(this).start();
- }
-
- public DNSRecord registerRecord( int flags, int ifIndex, String fullname, int rrtype,
- int rrclass, byte[] rdata, int ttl)
- throws DNSSDException
- {
- AppleDNSRecord newRecord = new AppleDNSRecord( this);
-
- this.ThrowOnErr( this.RegisterRecord( flags, ifIndex, fullname, rrtype, rrclass, rdata, ttl, newRecord));
- return newRecord;
- }
-
- // Sets fNativeContext. Returns non-zero on error.
- protected native int CreateConnection();
-
- // Sets fNativeContext. Returns non-zero on error.
- protected native int RegisterRecord( int flags, int ifIndex, String fullname, int rrtype,
- int rrclass, byte[] rdata, int ttl, AppleDNSRecord destObj);
-}
-