Index: chrome/common/extensions/api/mdns.idl |
diff --git a/chrome/common/extensions/api/mdns.idl b/chrome/common/extensions/api/mdns.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d1af7acda801301db20d94f11d7f447b7cb8fa12 |
--- /dev/null |
+++ b/chrome/common/extensions/api/mdns.idl |
@@ -0,0 +1,33 @@ |
+// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// Use the <code>chrome.mdns</code> API to discover local services over mDNS. |
+namespace mdns { |
+ |
+ // Represents a MDNS/DNS-SD service. |
mark a. foltz
2013/08/30 01:35:52
mDNS/DNS-SD
justinlin
2013/09/03 21:21:56
Done.
|
+ dictionary MDnsService { |
+ // The service name of an mDNS advertised service, |
+ // <instance_name>.<service_type>. |
+ DOMString serviceName; |
+ |
+ // The host:port pair of an mDNS advertised service. |
+ DOMString serviceHostPort; |
+ |
+ // The IP address of an mDNS advertised service. |
+ DOMString ipAddress; |
+ |
+ // Metadata for an mDNS advertised service. |
+ DOMString[] serviceData; |
mark a. foltz
2013/08/30 01:35:52
Need to check that DOMString[] is the right thing
justinlin
2013/09/03 21:21:56
OK, the alternative is an ArrayBuffer, I think, bu
|
+ }; |
+ |
+ interface Events { |
+ // Event fired to inform clients of the current complete set of responsive |
mark a. foltz
2013/08/30 01:35:52
s/responsive/known available/
justinlin
2013/09/03 21:21:56
Done.
|
+ // services. Clients should only need to store the list from the most recent |
+ // event. The MDNS watcher is started when the first listener is added. The |
mark a. foltz
2013/08/30 01:35:52
I would remove the sentence about the watcher sinc
justinlin
2013/09/03 21:21:56
Done.
|
+ // service types that the extension is interested in discovering should be |
+ // declared as an array in the extensions manifest file with the |
+ // 'mdns_service_types' key. |
+ static void onServiceList(MDnsService[] services); |
+ }; |
+}; |