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_UTILITY_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_IMPL_H_ | 5 #ifndef CHROME_UTILITY_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_IMPL_H_ |
6 #define CHROME_UTILITY_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_IMPL_H_ | 6 #define CHROME_UTILITY_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void RemoveService(const std::string& service); | 101 void RemoveService(const std::string& service); |
102 bool CreateTransaction(bool active, bool alert_existing_services, | 102 bool CreateTransaction(bool active, bool alert_existing_services, |
103 bool force_refresh, | 103 bool force_refresh, |
104 scoped_ptr<net::MDnsTransaction>* transaction); | 104 scoped_ptr<net::MDnsTransaction>* transaction); |
105 | 105 |
106 void DeferUpdate(ServiceWatcher::UpdateType update_type, | 106 void DeferUpdate(ServiceWatcher::UpdateType update_type, |
107 const std::string& service_name); | 107 const std::string& service_name); |
108 void DeliverDeferredUpdate(ServiceWatcher::UpdateType update_type, | 108 void DeliverDeferredUpdate(ServiceWatcher::UpdateType update_type, |
109 const std::string& service_name); | 109 const std::string& service_name); |
110 | 110 |
| 111 void ScheduleQuery(int timeout_seconds); |
| 112 |
| 113 void SendQuery(int next_timeout_seconds, bool force_update); |
| 114 |
111 std::string service_type_; | 115 std::string service_type_; |
112 ServiceListenersMap services_; | 116 ServiceListenersMap services_; |
113 scoped_ptr<net::MDnsTransaction> transaction_network_; | 117 scoped_ptr<net::MDnsTransaction> transaction_network_; |
114 scoped_ptr<net::MDnsTransaction> transaction_cache_; | 118 scoped_ptr<net::MDnsTransaction> transaction_cache_; |
115 scoped_ptr<net::MDnsListener> listener_; | 119 scoped_ptr<net::MDnsListener> listener_; |
116 | 120 |
117 ServiceWatcher::UpdatedCallback callback_; | 121 ServiceWatcher::UpdatedCallback callback_; |
118 bool started_; | 122 bool started_; |
119 | 123 |
120 net::MDnsClient* mdns_client_; | 124 net::MDnsClient* mdns_client_; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 236 |
233 base::CancelableCallback<void()> timeout_callback_; | 237 base::CancelableCallback<void()> timeout_callback_; |
234 | 238 |
235 DISALLOW_COPY_AND_ASSIGN(LocalDomainResolverImpl); | 239 DISALLOW_COPY_AND_ASSIGN(LocalDomainResolverImpl); |
236 }; | 240 }; |
237 | 241 |
238 | 242 |
239 } // namespace local_discovery | 243 } // namespace local_discovery |
240 | 244 |
241 #endif // CHROME_UTILITY_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_IMPL_H_ | 245 #endif // CHROME_UTILITY_LOCAL_DISCOVERY_SERVICE_DISCOVERY_CLIENT_IMPL_H_ |
OLD | NEW |