| 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 <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // Called when a service has been added or removed for a certain service name. | 56 // Called when a service has been added or removed for a certain service name. |
| 57 typedef base::Callback<void(UpdateType, const std::string&)> UpdatedCallback; | 57 typedef base::Callback<void(UpdateType, const std::string&)> UpdatedCallback; |
| 58 | 58 |
| 59 // Listening will automatically stop when the destructor is called. | 59 // Listening will automatically stop when the destructor is called. |
| 60 virtual ~ServiceWatcher() {} | 60 virtual ~ServiceWatcher() {} |
| 61 | 61 |
| 62 // Start the service type watcher. | 62 // Start the service type watcher. |
| 63 virtual void Start() = 0; | 63 virtual void Start() = 0; |
| 64 | 64 |
| 65 // Probe for services of this type. | 65 // Probe for services of this type. |
| 66 virtual void DiscoverNewServices(bool force_update) = 0; | 66 virtual void DiscoverNewServices() = 0; |
| 67 | 67 |
| 68 virtual void SetActivelyRefreshServices(bool actively_refresh_services) = 0; | 68 virtual void SetActivelyRefreshServices(bool actively_refresh_services) = 0; |
| 69 | 69 |
| 70 virtual std::string GetServiceType() const = 0; | 70 virtual std::string GetServiceType() const = 0; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 // Represents a service on the network and allows users to access the service's | 73 // Represents a service on the network and allows users to access the service's |
| 74 // address and metadata. See |ServiceDiscoveryClient::CreateServiceResolver|. | 74 // address and metadata. See |ServiceDiscoveryClient::CreateServiceResolver|. |
| 75 class ServiceResolver { | 75 class ServiceResolver { |
| 76 public: | 76 public: |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // Create a resolver for local domain, both ipv4 or ipv6. | 125 // Create a resolver for local domain, both ipv4 or ipv6. |
| 126 virtual std::unique_ptr<LocalDomainResolver> CreateLocalDomainResolver( | 126 virtual std::unique_ptr<LocalDomainResolver> CreateLocalDomainResolver( |
| 127 const std::string& domain, | 127 const std::string& domain, |
| 128 net::AddressFamily address_family, | 128 net::AddressFamily address_family, |
| 129 const LocalDomainResolver::IPAddressCallback& callback) = 0; | 129 const LocalDomainResolver::IPAddressCallback& callback) = 0; |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 } // namespace local_discovery | 132 } // namespace local_discovery |
| 133 | 133 |
| 134 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_H_ | 134 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_H_ |
| OLD | NEW |