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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_LISTER_IMPL_H_
6 #define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_LISTER_IMPL_H_
10 #include "chrome/browser/local_discovery/privet_device_lister.h"
11 #include "chrome/browser/local_discovery/service_discovery_device_lister.h"
13 namespace local_discovery {
15 class ServiceDiscoveryClient;
17 class PrivetDeviceListerImpl : public PrivetDeviceLister,
18 public ServiceDiscoveryDeviceLister::Delegate {
20 PrivetDeviceListerImpl(
21 ServiceDiscoveryClient* service_discovery_client,
22 PrivetDeviceLister::Delegate* delegate,
23 const std::string& subtype);
25 PrivetDeviceListerImpl(
26 ServiceDiscoveryClient* service_discovery_client,
27 PrivetDeviceLister::Delegate* delegate);
29 ~PrivetDeviceListerImpl() override;
31 void Start() override;
32 void DiscoverNewDevices(bool force_update) override;
35 void OnDeviceChanged(bool added,
36 const ServiceDescription& service_description) override;
37 void OnDeviceRemoved(const std::string& service_name) override;
38 void OnDeviceCacheFlushed() override;
41 PrivetDeviceLister::Delegate* delegate_;
42 ServiceDiscoveryDeviceLister device_lister_;
45 } // namespace local_discovery
47 #endif // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_LISTER_IMPL_H_