OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // File-level comment to appease parser. Eventually this will not be necessary. | 5 // File-level comment to appease parser. Eventually this will not be necessary. |
6 | 6 |
7 [nodoc] namespace experimental.dns { | 7 [nodoc] namespace experimental.dns { |
8 | 8 |
9 dictionary ResolveCallbackResolveInfo { | 9 dictionary ResolveCallbackResolveInfo { |
10 // The result code. Zero indicates success. | 10 // The result code. Zero indicates success. |
11 long resultCode; | 11 long resultCode; |
12 | 12 |
13 // A string representing the IP address literal. Supplied only if resultCode | 13 // A string representing the IP address literal. Supplied only if resultCode |
14 // indicates success. Note that we presently return only IPv4 addresses. | 14 // indicates success. Note that we presently return only IPv4 addresses. |
15 DOMString? address; | 15 DOMString? address; |
16 }; | 16 }; |
17 | 17 |
18 callback ResolveCallback = void (ResolveCallbackResolveInfo resolveInfo); | 18 callback ResolveCallback = void (ResolveCallbackResolveInfo resolveInfo); |
19 | 19 |
20 interface Functions { | 20 interface Functions { |
21 // Resolves the given hostname or IP address literal. | 21 // Resolves the given hostname or IP address literal. |
22 // |hostname| : The hostname to resolve. | 22 // |hostname| : The hostname to resolve. |
23 // |callback| : Called when the resolution operation completes. | 23 // |callback| : Called when the resolution operation completes. |
24 static void resolve(DOMString hostname, | 24 static void resolve(DOMString hostname, |
25 ResolveCallback callback); | 25 ResolveCallback callback); |
26 }; | 26 }; |
27 | 27 |
28 }; | 28 }; |
OLD | NEW |