react-native-zeroconf 0.17.2 → 1.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/NOTICE +2 -6
  2. package/README.md +1 -1
  3. package/android/CMakeLists.txt +64 -0
  4. package/android/build.gradle +1 -13
  5. package/android/generated/java/com/balthazargronon/RCTZeroconf/NativeZeroconfSpec.java +96 -0
  6. package/android/generated/jni/CMakeLists.txt +28 -0
  7. package/android/generated/jni/RNZeroconfSpec-generated.cpp +77 -0
  8. package/android/generated/jni/RNZeroconfSpec.h +31 -0
  9. package/android/generated/jni/react/renderer/components/RNZeroconfSpec/RNZeroconfSpecJSI.h +798 -0
  10. package/android/src/main/java/com/balthazargronon/RCTZeroconf/{ZeroconfModule.java → NsdHost.java} +97 -140
  11. package/android/src/main/java/com/balthazargronon/RCTZeroconf/NsdPayload.java +87 -0
  12. package/android/src/main/java/com/balthazargronon/RCTZeroconf/NsdPromise.java +40 -0
  13. package/android/src/main/java/com/balthazargronon/RCTZeroconf/Zeroconf.java +4 -6
  14. package/android/src/main/java/com/balthazargronon/RCTZeroconf/ZeroconfNativeSupport.java +60 -0
  15. package/android/src/main/java/com/balthazargronon/RCTZeroconf/ZeroconfOptions.java +15 -26
  16. package/android/src/main/java/com/balthazargronon/RCTZeroconf/ZeroconfReactPackage.java +5 -15
  17. package/android/src/main/java/com/balthazargronon/RCTZeroconf/nsd/NsdServiceImpl.java +90 -96
  18. package/android/src/main/jni/mdnsresponder/mDNSPosix/PosixDaemon.c +19 -1
  19. package/android/src/main/jni/mdnsresponder/mDNSPosix/mDNSPosix.c +104 -1
  20. package/android/src/main/jni/mdnsresponder/mDNSPosix/mDNSPosix.h +7 -0
  21. package/android/src/main/jni/mdnsresponder/mDNSShared/dnssd_clientshim.c +34 -9
  22. package/cpp/Backend.cpp +16 -0
  23. package/cpp/Backend.h +116 -0
  24. package/cpp/ZeroconfModule.cpp +280 -0
  25. package/cpp/ZeroconfModule.h +144 -0
  26. package/cpp/android/NsdBackend.cpp +462 -0
  27. package/cpp/android/NsdBackend.h +61 -0
  28. package/cpp/android/ZeroconfAndroidModule.cpp +49 -0
  29. package/cpp/android/ZeroconfAndroidModule.h +15 -0
  30. package/cpp/apple/DispatchExecutor.cpp +66 -0
  31. package/cpp/apple/DispatchExecutor.h +37 -0
  32. package/cpp/apple/LocalNetworkAccess.h +19 -0
  33. package/cpp/apple/LocalNetworkAccess.mm +87 -0
  34. package/cpp/dnssd/DnssdBackend.cpp +976 -0
  35. package/cpp/dnssd/DnssdBackend.h +114 -0
  36. package/cpp/dnssd/Executor.h +28 -0
  37. package/cpp/embedded/EmbeddedExecutor.cpp +124 -0
  38. package/cpp/embedded/EmbeddedExecutor.h +57 -0
  39. package/ios/ZeroconfOnLoad.mm +34 -0
  40. package/ios/generated/ReactCodegen/RNZeroconfSpec/RNZeroconfSpec-generated.mm +140 -0
  41. package/ios/generated/ReactCodegen/RNZeroconfSpec/RNZeroconfSpec.h +189 -0
  42. package/ios/generated/ReactCodegen/RNZeroconfSpecJSI.h +798 -0
  43. package/lib/module/NativeZeroconf.js +15 -0
  44. package/lib/module/NativeZeroconf.js.map +1 -0
  45. package/lib/module/bridge.js +124 -0
  46. package/lib/module/bridge.js.map +1 -0
  47. package/{dist → lib/module}/index.js +149 -149
  48. package/lib/module/index.js.map +1 -0
  49. package/lib/module/package.json +1 -0
  50. package/lib/module/types.js +24 -0
  51. package/lib/module/types.js.map +1 -0
  52. package/lib/typescript/package.json +1 -0
  53. package/lib/typescript/src/NativeZeroconf.d.ts +75 -0
  54. package/lib/typescript/src/NativeZeroconf.d.ts.map +1 -0
  55. package/lib/typescript/src/bridge.d.ts +22 -0
  56. package/lib/typescript/src/bridge.d.ts.map +1 -0
  57. package/lib/typescript/src/index.d.ts +111 -0
  58. package/lib/typescript/src/index.d.ts.map +1 -0
  59. package/lib/typescript/src/types.d.ts +175 -0
  60. package/lib/typescript/src/types.d.ts.map +1 -0
  61. package/package.json +65 -29
  62. package/react-native-zeroconf.podspec +2 -1
  63. package/react-native.config.js +17 -0
  64. package/src/NativeZeroconf.ts +120 -0
  65. package/src/bridge.ts +153 -0
  66. package/src/index.ts +607 -0
  67. package/{index.d.ts → src/types.ts} +5 -99
  68. package/windows/RNZeroconf/RNZeroconf.vcxproj +17 -2
  69. package/windows/RNZeroconf/RNZeroconf.vcxproj.filters +0 -6
  70. package/windows/RNZeroconf/ReactPackageProvider.cpp +23 -20
  71. package/windows/RNZeroconf/WindowsBackend.cpp +156 -0
  72. package/windows/RNZeroconf/WindowsBackend.h +13 -0
  73. package/windows/RNZeroconf/ZeroconfCore.cpp +2 -2
  74. package/windows/RNZeroconf/ZeroconfCore.h +2 -2
  75. package/windows/RNZeroconf/ZeroconfWindowsModule.cpp +22 -0
  76. package/windows/RNZeroconf/ZeroconfWindowsModule.h +14 -0
  77. package/android/src/main/java/com/balthazargronon/RCTZeroconf/ZeroConfImplFactory.java +0 -56
  78. package/android/src/main/java/com/balthazargronon/RCTZeroconf/dnssd/DnssdImpl.java +0 -654
  79. package/android/src/main/java/com/github/druk/dnssd/BaseListener.java +0 -33
  80. package/android/src/main/java/com/github/druk/dnssd/BrowseListener.java +0 -67
  81. package/android/src/main/java/com/github/druk/dnssd/DNSRecord.java +0 -47
  82. package/android/src/main/java/com/github/druk/dnssd/DNSSD.java +0 -650
  83. package/android/src/main/java/com/github/druk/dnssd/DNSSDEmbedded.java +0 -135
  84. package/android/src/main/java/com/github/druk/dnssd/DNSSDException.java +0 -66
  85. package/android/src/main/java/com/github/druk/dnssd/DNSSDRecordRegistrar.java +0 -55
  86. package/android/src/main/java/com/github/druk/dnssd/DNSSDRegistration.java +0 -54
  87. package/android/src/main/java/com/github/druk/dnssd/DNSSDService.java +0 -35
  88. package/android/src/main/java/com/github/druk/dnssd/DomainListener.java +0 -57
  89. package/android/src/main/java/com/github/druk/dnssd/InternalBrowseListener.java +0 -76
  90. package/android/src/main/java/com/github/druk/dnssd/InternalDNSSD.java +0 -870
  91. package/android/src/main/java/com/github/druk/dnssd/InternalDNSSDRecordRegistrar.java +0 -30
  92. package/android/src/main/java/com/github/druk/dnssd/InternalDNSSDRegistration.java +0 -34
  93. package/android/src/main/java/com/github/druk/dnssd/InternalDNSSDService.java +0 -29
  94. package/android/src/main/java/com/github/druk/dnssd/InternalDomainListener.java +0 -62
  95. package/android/src/main/java/com/github/druk/dnssd/InternalQueryListener.java +0 -61
  96. package/android/src/main/java/com/github/druk/dnssd/InternalRegisterListener.java +0 -51
  97. package/android/src/main/java/com/github/druk/dnssd/InternalResolveListener.java +0 -58
  98. package/android/src/main/java/com/github/druk/dnssd/NSClass.java +0 -16
  99. package/android/src/main/java/com/github/druk/dnssd/NSType.java +0 -58
  100. package/android/src/main/java/com/github/druk/dnssd/QueryListener.java +0 -54
  101. package/android/src/main/java/com/github/druk/dnssd/RegisterListener.java +0 -46
  102. package/android/src/main/java/com/github/druk/dnssd/RegisterRecordListener.java +0 -35
  103. package/android/src/main/java/com/github/druk/dnssd/ResolveListener.java +0 -55
  104. package/android/src/main/java/com/github/druk/dnssd/TXTRecord.java +0 -293
  105. package/android/src/main/jni/Android.mk +0 -73
  106. package/android/src/main/jni/Application.mk +0 -3
  107. package/android/src/main/jni/DNSSD.java.h +0 -290
  108. package/android/src/main/jni/JNISupport.c +0 -1140
  109. package/ios/RNZeroconf/RNNetServiceSerializer.h +0 -31
  110. package/ios/RNZeroconf/RNNetServiceSerializer.m +0 -84
  111. package/ios/RNZeroconf/RNZeroconf.h +0 -17
  112. package/ios/RNZeroconf/RNZeroconf.m +0 -1025
  113. package/ios/RNZeroconf.xcodeproj/project.pbxproj +0 -261
  114. package/ios/RNZeroconf.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  115. package/src/index.js +0 -563
  116. package/windows/RNZeroconf/RNZeroconf.cpp +0 -228
  117. package/windows/RNZeroconf/RNZeroconf.h +0 -70
@@ -1,135 +0,0 @@
1
- /*
2
- * Copyright (C) 2016 Andriy Druk
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- package com.github.druk.dnssd;
18
-
19
- import android.content.Context;
20
- import android.os.Handler;
21
- import android.os.Looper;
22
- import android.util.Log;
23
-
24
- /**
25
- * DNSSD implementation running the embedded mDNSResponder {@link InternalDNSSD}
26
- */
27
- public class DNSSDEmbedded extends DNSSD {
28
-
29
- public static final int DEFAULT_STOP_TIMER_DELAY = 5000; //5 sec
30
-
31
- private static final String TAG = "DNSSDEmbedded";
32
- private final long mStopTimerDelay;
33
- private final Handler handler = new Handler(Looper.getMainLooper());
34
- private Thread mThread;
35
- private volatile boolean isStarted = false;
36
- private int serviceCount = 0;
37
-
38
- public DNSSDEmbedded(Context context) {
39
- this(context, DEFAULT_STOP_TIMER_DELAY);
40
- }
41
-
42
- public DNSSDEmbedded(Context context, long stopTimerDelay) {
43
- super(context, "jdns_sd_embedded");
44
- mStopTimerDelay = stopTimerDelay;
45
- }
46
-
47
- static native int nativeInit();
48
-
49
- static native int nativeLoop();
50
-
51
- static native void nativeExit();
52
-
53
- /**
54
- * Init DNS-SD thread and start event loop. Should be called before using any of DNSSD operations.
55
- * If DNS-SD thread has already initialised will try to reuse it.
56
- *
57
- * Note: This method will block thread until DNS-SD initialization finish.
58
- */
59
- public void init() {
60
- handler.removeCallbacks(DNSSDEmbedded::nativeExit);
61
-
62
- if (mThread != null && mThread.isAlive()) {
63
- Log.i(TAG, "already started");
64
- waitUntilStarted();
65
- return;
66
- }
67
-
68
- isStarted = false;
69
-
70
- InternalDNSSD.getInstance();
71
- mThread = new Thread() {
72
- public void run() {
73
- Log.i(TAG, "init");
74
- int err = nativeInit();
75
- synchronized (DNSSDEmbedded.class) {
76
- isStarted = true;
77
- DNSSDEmbedded.class.notifyAll();
78
- }
79
- if (err != 0) {
80
- Log.e(TAG, "error: " + err);
81
- return;
82
- }
83
- Log.i(TAG, "start");
84
- int ret = nativeLoop();
85
- isStarted = false;
86
- Log.i(TAG, "finish with code: " + ret);
87
- }
88
- };
89
- mThread.setPriority(Thread.MAX_PRIORITY);
90
- mThread.setName("DNS-SDEmbedded");
91
- mThread.start();
92
-
93
- waitUntilStarted();
94
- }
95
-
96
- /**
97
- * Exit from embedded DNS-SD loop. This method will stop DNS-SD after the delay (it makes possible to reuse already initialised DNS-SD thread).
98
- *
99
- * Note: method isn't blocking, can be used from any thread.
100
- */
101
- public void exit() {
102
- synchronized (DNSSDEmbedded.class) {
103
- Log.i(TAG, "post exit");
104
- handler.postDelayed(DNSSDEmbedded::nativeExit, mStopTimerDelay);
105
- }
106
- }
107
-
108
- private void waitUntilStarted() {
109
- synchronized (DNSSDEmbedded.class) {
110
- while (!isStarted) {
111
- try {
112
- DNSSDEmbedded.class.wait();
113
- } catch (InterruptedException e) {
114
- Log.e(TAG, "waitUntilStarted exception: ", e);
115
- }
116
- }
117
- }
118
- }
119
-
120
- @Override
121
- public void onServiceStarting() {
122
- super.onServiceStarting();
123
- this.init();
124
- serviceCount++;
125
- }
126
-
127
- @Override
128
- public void onServiceStopped() {
129
- super.onServiceStopped();
130
- serviceCount--;
131
- if (serviceCount == 0) {
132
- this.exit();
133
- }
134
- }
135
- }
@@ -1,66 +0,0 @@
1
- /* -*- Mode: Java; tab-width: 4 -*-
2
- *
3
- * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- package com.github.druk.dnssd;
19
-
20
- //CHECKSTYLE:OFF
21
-
22
- /**
23
- Used to report various DNS-SD-related error conditions.
24
- */
25
-
26
- abstract public class DNSSDException extends Exception
27
- {
28
- public static final int NO_ERROR = 0;
29
- public static final int UNKNOWN = -65537;
30
- public static final int NO_SUCH_NAME = -65538;
31
- public static final int NO_MEMORY = -65539;
32
- public static final int BAD_PARAM = -65540;
33
- public static final int BAD_REFERENCE = -65541;
34
- public static final int BAD_STATE = -65542;
35
- public static final int BAD_FLAGS = -65543;
36
- public static final int UNSUPPORTED = -65544;
37
- public static final int NOT_INITIALIZED = -65545;
38
- public static final int NO_CACHE = -65546;
39
- public static final int ALREADY_REGISTERED = -65547;
40
- public static final int NAME_CONFLICT = -65548;
41
- public static final int INVALID = -65549;
42
- public static final int FIREWALL = -65550;
43
- public static final int INCOMPATIBLE = -65551;
44
- public static final int BAD_INTERFACE_INDEX = -65552;
45
- public static final int REFUSED = -65553;
46
- public static final int NOSUCHRECORD = -65554;
47
- public static final int NOAUTH = -65555;
48
- public static final int NOSUCHKEY = -65556;
49
- public static final int NATTRAVERSAL = -65557;
50
- public static final int DOUBLENAT = -65558;
51
- public static final int BADTIME = -65559;
52
- public static final int BADSIG = -65560;
53
- public static final int BADKEY = -65561;
54
- public static final int TRANSIENT = -65562;
55
- public static final int SERVICENOTRUNNING = -65563;
56
- public static final int NATPORTMAPPINGUNSUPPORTED = -65564;
57
- public static final int NATPORTMAPPINGDISABLED = -65565;
58
-
59
- // Note: When adding new error values here, remember also
60
- // to update the corresponding kMessages array in AppleDNSSDException (DNSSD.java)
61
-
62
- /** Returns the sub-code that identifies the particular error. */
63
- abstract public int getErrorCode();
64
- }
65
-
66
- //CHECKSTYLE:ON
@@ -1,55 +0,0 @@
1
- /*
2
- * Copyright (C) 2016 Andriy Druk
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- package com.github.druk.dnssd;
18
-
19
- /** An object for registering records, created by {@link InternalDNSSD#createRecordRegistrar}. */
20
-
21
- public interface DNSSDRecordRegistrar extends DNSSDService {
22
- /** Register an independent {@link DNSRecord}.<P>
23
- @param flags
24
- Possible values are SHARED or UNIQUE (see flag type definitions for details).
25
- <P>
26
- @param ifIndex
27
- If non-zero, specifies the interface on which to register the record
28
- (the index for a given interface is determined via the if_nametoindex()
29
- family of calls.) Passing 0 causes the record to be registered on all interfaces.
30
- <P>
31
- @param fullname
32
- The full domain name of the resource record.
33
- <P>
34
- @param rrtype
35
- The numerical type of the resource record to be queried for (e.g. PTR, SRV, etc)
36
- as defined in nameser.h.
37
- <P>
38
- @param rrclass
39
- The class of the resource record, as defined in nameser.h
40
- (usually 1 for the Internet class).
41
- <P>
42
- @param rData
43
- The new rdata as it is to appear in the DNS record.
44
- <P>
45
- @param ttl
46
- The time to live of the resource record, in seconds. Pass 0 to use a default value.
47
- <P>
48
- @return A {@link DNSSDService} that can be used to abort the record registration.
49
-
50
- @throws SecurityException If a security manager is present and denies <tt>RuntimePermission("getDNSSDInstance")</tt>.
51
- @see RuntimePermission
52
- */
53
- DNSRecord registerRecord(int flags, int ifIndex, String fullname, int rrtype, int rrclass, byte[] rData, int ttl) throws DNSSDException;
54
- }
55
-
@@ -1,54 +0,0 @@
1
- /*
2
- * Copyright (C) 2016 Andriy Druk
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- package com.github.druk.dnssd;
18
-
19
- /** A tracking object for a registration created by {@link InternalDNSSD#register}. */
20
-
21
- public interface DNSSDRegistration extends DNSSDService {
22
- /** Get a reference to the primary TXT record of a registered service.<P>
23
- The record can be updated by sending it an update() message.<P>
24
-
25
- <P>
26
- @return A {@link DNSRecord}.
27
- If {@link DNSSDRegistration#stop} is called, the DNSRecord is also
28
- invalidated and may not be used further.
29
- */
30
- DNSRecord getTXTRecord() throws DNSSDException;
31
-
32
- /** Add a record to a registered service.<P>
33
- The name of the record will be the same as the registered service's name.<P>
34
- The record can be updated or deregistered by sending it an update() or remove() message.<P>
35
-
36
- @param flags
37
- Currently unused, reserved for future use.
38
- <P>
39
- @param rrType
40
- The type of the record (e.g. TXT, SRV, etc), as defined in nameser.h.
41
- <P>
42
- @param rData
43
- The raw rdata to be contained in the added resource record.
44
- <P>
45
- @param ttl
46
- The time to live of the resource record, in seconds.
47
- <P>
48
- @return A {@link DNSRecord} that may be passed to updateRecord() or removeRecord().
49
- If {@link DNSSDRegistration#stop} is called, the DNSRecord is also
50
- invalidated and may not be used further.
51
- */
52
- DNSRecord addRecord(int flags, int rrType, byte[] rData, int ttl) throws DNSSDException;
53
- }
54
-
@@ -1,35 +0,0 @@
1
- /*
2
- * Copyright (C) 2016 Andriy Druk
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- package com.github.druk.dnssd;
18
-
19
- /** A tracking object for a service created by {@link InternalDNSSD}. */
20
-
21
- public interface DNSSDService
22
- {
23
- /**
24
- Halt the active operation and free resources associated with the DNSSDService.<P>
25
-
26
- Any services or records registered with this DNSSDService will be deregistered. Any
27
- Browse, Resolve, or Query operations associated with this reference will be terminated.<P>
28
-
29
- Note: if the service was initialized with DNSSD.register(), and an extra resource record was
30
- added to the service via {@link DNSSDRegistration#addRecord}, the DNSRecord so created
31
- is invalidated when this method is called - the DNSRecord may not be used afterward.
32
- */
33
- void stop();
34
- }
35
-
@@ -1,57 +0,0 @@
1
- /*
2
- * Copyright (C) 2016 Andriy Druk
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- package com.github.druk.dnssd;
18
-
19
-
20
- /**
21
- * A listener that receives results from {@link InternalDNSSD#enumerateDomains}.
22
- */
23
-
24
- public interface DomainListener extends BaseListener {
25
- /** Called to report discovered domains.<P>
26
-
27
- @param domainEnum
28
- The active domain enumerator.
29
- @param flags
30
- Possible values are: DNSSD.MORE_COMING, DNSSD.DEFAULT
31
- <P>
32
- @param ifIndex
33
- Specifies the interface on which the domain exists. (The index for a given
34
- interface is determined via the if_nametoindex() family of calls.)
35
- <P>
36
- @param domain
37
- The name of the domain.
38
- */
39
- void domainFound(DNSSDService domainEnum, int flags, int ifIndex, String domain);
40
-
41
- /** Called to report that a domain has disappeared.<P>
42
-
43
- @param domainEnum
44
- The active domain enumerator.
45
- @param flags
46
- Possible values are: DNSSD.MORE_COMING, DNSSD.DEFAULT
47
- <P>
48
- @param ifIndex
49
- Specifies the interface on which the domain exists. (The index for a given
50
- interface is determined via the if_nametoindex() family of calls.)
51
- <P>
52
- @param domain
53
- The name of the domain.
54
- */
55
- void domainLost(DNSSDService domainEnum, int flags, int ifIndex, String domain);
56
- }
57
-
@@ -1,76 +0,0 @@
1
- /* -*- Mode: Java; tab-width: 4 -*-
2
- *
3
- * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- //CHECKSTYLE:OFF
19
-
20
-
21
- package com.github.druk.dnssd;
22
-
23
-
24
- /** A listener that receives results from {@link InternalDNSSD#browse}. */
25
-
26
- interface InternalBrowseListener extends BaseListener
27
- {
28
- /** Called to report discovered services.<P>
29
-
30
- @param browser
31
- The active browse service.
32
- <P>
33
- @param flags
34
- Possible values are DNSSD.MORE_COMING.
35
- <P>
36
- @param ifIndex
37
- The interface on which the service is advertised. This index should be passed
38
- to {@link InternalDNSSD#resolve} when resolving the service.
39
- <P>
40
- @param serviceName
41
- The service name discovered.
42
- <P>
43
- @param regType
44
- The registration type, as passed in to DNSSD.browse().
45
- <P>
46
- @param domain
47
- The domain in which the service was discovered.
48
- */
49
- void serviceFound(DNSSDService browser, int flags, int ifIndex,
50
- byte[] serviceName, byte[] regType, byte[] domain);
51
-
52
- /** Called to report services which have been deregistered.<P>
53
-
54
- @param browser
55
- The active browse service.
56
- <P>
57
- @param flags
58
- Possible values are DNSSD.MORE_COMING.
59
- <P>
60
- @param ifIndex
61
- The interface on which the service is advertised.
62
- <P>
63
- @param serviceName
64
- The service name which has deregistered.
65
- <P>
66
- @param regType
67
- The registration type, as passed in to DNSSD.browse().
68
- <P>
69
- @param domain
70
- The domain in which the service was discovered.
71
- */
72
- void serviceLost(DNSSDService browser, int flags, int ifIndex,
73
- byte[] serviceName, byte[] regType, byte[] domain);
74
- }
75
-
76
- //CHECKSTYLE:ON