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.
4
5#ifndef CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_LISTER_H_
6#define CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_LISTER_H_
7
8#include <string>
9
10#include "base/callback.h"
11#include "base/time/time.h"
12#include "chrome/browser/local_discovery/device_description.h"
13#include "net/base/host_port_pair.h"
14#include "net/base/net_util.h"
15
16namespace local_discovery {
17
18class PrivetDeviceLister {
19 public:
20  PrivetDeviceLister();
21  virtual ~PrivetDeviceLister();
22
23  class Delegate {
24   public:
25    virtual void DeviceChanged(bool added,
26                               const std::string& name,
27                               const DeviceDescription& description) = 0;
28    virtual void DeviceRemoved(const std::string& name) = 0;
29    virtual void DeviceCacheFlushed() = 0;
30  };
31
32  // Start the PrivetServiceLister.
33  virtual void Start() = 0;
34
35  virtual void DiscoverNewDevices(bool force_update) = 0;
36};
37
38}  // namespace local_discovery
39
40#endif  // CHROME_BROWSER_LOCAL_DISCOVERY_PRIVET_DEVICE_LISTER_H_
41