OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DIAL_MDNS_SERVICE_H_ | |
6 #define CHROME_BROWSER_EXTENSIONS_API_DIAL_MDNS_SERVICE_H_ | |
7 | |
8 #include "chrome/browser/local_discovery/service_discovery_host_client.h" | |
9 #include "chrome/common/local_discovery/service_discovery_client.h" | |
10 | |
11 namespace extensions { | |
12 | |
13 // Service for managing the mDNS device lister. | |
14 class MDNSService { | |
mark a. foltz
2013/08/19 18:25:26
This is a bit simpler. Did you see an advantage t
| |
15 public: | |
16 // TODO(justinlin): Should be singleton. | |
mark a. foltz
2013/08/19 18:25:26
Singleton per service_type? Agreed, but seems like
| |
17 explicit MDNSService(std::string service_type); | |
18 ~MDNSService(); | |
19 | |
20 bool Start(); | |
21 void Stop(); | |
22 void Discover(bool force_update); | |
23 | |
24 private: | |
25 void OnServiceUpdated( | |
26 local_discovery::ServiceWatcher::UpdateType update, | |
27 const std::string& service_name); | |
28 | |
29 const std::string service_type_; | |
30 local_discovery::ServiceDiscoveryClient* service_discovery_client_; | |
31 scoped_ptr<local_discovery::ServiceWatcher> service_watcher_; | |
32 bool started_; | |
33 }; | |
34 | |
35 } // namespace extensions | |
36 | |
37 #endif // CHROME_BROWSER_EXTENSIONS_API_DIAL_MDNS_SERVICE_H_ | |
OLD | NEW |