OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef NET_DNS_MDNS_CLIENT_H_ | 5 #ifndef NET_DNS_MDNS_CLIENT_H_ |
6 #define NET_DNS_MDNS_CLIENT_H_ | 6 #define NET_DNS_MDNS_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // disconnecting). | 106 // disconnecting). |
107 virtual void OnCachePurged() = 0; | 107 virtual void OnCachePurged() = 0; |
108 }; | 108 }; |
109 | 109 |
110 // Destroying the listener stops listening. | 110 // Destroying the listener stops listening. |
111 virtual ~MDnsListener() {} | 111 virtual ~MDnsListener() {} |
112 | 112 |
113 // Start the listener. Return true on success. | 113 // Start the listener. Return true on success. |
114 virtual bool Start() = 0; | 114 virtual bool Start() = 0; |
115 | 115 |
| 116 // Actively refresh any received records. |
| 117 virtual void SetActiveRefresh(bool active_refresh) = 0; |
| 118 |
116 // Get the host or service name for this query. | 119 // Get the host or service name for this query. |
117 // Return an empty string for no name. | 120 // Return an empty string for no name. |
118 virtual const std::string& GetName() const = 0; | 121 virtual const std::string& GetName() const = 0; |
119 | 122 |
120 // Get the type for this query (SRV, TXT, A, AAA, etc) | 123 // Get the type for this query (SRV, TXT, A, AAA, etc) |
121 virtual uint16 GetType() const = 0; | 124 virtual uint16 GetType() const = 0; |
122 }; | 125 }; |
123 | 126 |
124 // Creates bound datagram sockets ready to use by MDnsClient. | 127 // Creates bound datagram sockets ready to use by MDnsClient. |
125 class NET_EXPORT MDnsSocketFactory { | 128 class NET_EXPORT MDnsSocketFactory { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 // Create sockets, binds socket to MDns endpoint, and sets multicast interface | 178 // Create sockets, binds socket to MDns endpoint, and sets multicast interface |
176 // and joins multicast group on for |interface_index|. | 179 // and joins multicast group on for |interface_index|. |
177 // Returns NULL if failed. | 180 // Returns NULL if failed. |
178 NET_EXPORT scoped_ptr<DatagramServerSocket> CreateAndBindMDnsSocket( | 181 NET_EXPORT scoped_ptr<DatagramServerSocket> CreateAndBindMDnsSocket( |
179 AddressFamily address_family, | 182 AddressFamily address_family, |
180 uint32 interface_index); | 183 uint32 interface_index); |
181 | 184 |
182 } // namespace net | 185 } // namespace net |
183 | 186 |
184 #endif // NET_DNS_MDNS_CLIENT_H_ | 187 #endif // NET_DNS_MDNS_CLIENT_H_ |
OLD | NEW |