| 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 CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_H_ |
| 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_H_ | 6 #define CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "net/base/address_family.h" | 14 #include "net/base/address_family.h" |
| 15 #include "net/base/host_port_pair.h" | 15 #include "net/base/host_port_pair.h" |
| 16 #include "net/base/ip_address.h" | 16 #include "net/base/ip_address.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 class MDnsClient; | 19 class MDnsClient; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace local_discovery { | 22 namespace local_discovery { |
| 23 | 23 |
| 24 struct ServiceDescription { | 24 struct ServiceDescription { |
| 25 public: | 25 public: |
| 26 ServiceDescription(); | 26 ServiceDescription(); |
| 27 ServiceDescription(const ServiceDescription& other); |
| 27 ~ServiceDescription(); | 28 ~ServiceDescription(); |
| 28 | 29 |
| 29 // Convenience function to get useful parts of the service name. A service | 30 // Convenience function to get useful parts of the service name. A service |
| 30 // name follows the format <instance_name>.<service_type>. | 31 // name follows the format <instance_name>.<service_type>. |
| 31 std::string instance_name() const; | 32 std::string instance_name() const; |
| 32 std::string service_type() const; | 33 std::string service_type() const; |
| 33 | 34 |
| 34 // The name of the service. | 35 // The name of the service. |
| 35 std::string service_name; | 36 std::string service_name; |
| 36 // The address (in host/port format) for the service (from SRV record). | 37 // The address (in host/port format) for the service (from SRV record). |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // Create a resolver for local domain, both ipv4 or ipv6. | 129 // Create a resolver for local domain, both ipv4 or ipv6. |
| 129 virtual scoped_ptr<LocalDomainResolver> CreateLocalDomainResolver( | 130 virtual scoped_ptr<LocalDomainResolver> CreateLocalDomainResolver( |
| 130 const std::string& domain, | 131 const std::string& domain, |
| 131 net::AddressFamily address_family, | 132 net::AddressFamily address_family, |
| 132 const LocalDomainResolver::IPAddressCallback& callback) = 0; | 133 const LocalDomainResolver::IPAddressCallback& callback) = 0; |
| 133 }; | 134 }; |
| 134 | 135 |
| 135 } // namespace local_discovery | 136 } // namespace local_discovery |
| 136 | 137 |
| 137 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_H_ | 138 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_H_ |
| OLD | NEW |