blob: 1f75efd1f5a61f0c2dd634d461f52385e436d1af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_DEVICE_LIST_H_
#define CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_DEVICE_LIST_H_
#include <string>
#include <vector>
#include "base/values.h"
#include "chrome/browser/local_discovery/cloud_device_list_delegate.h"
#include "chrome/browser/local_discovery/gcd_api_flow.h"
namespace local_discovery {
class CloudDeviceList : public GCDApiFlowRequest {
public:
typedef std::vector<CloudDeviceListDelegate::Device> DeviceList;
typedef DeviceList::const_iterator iterator;
explicit CloudDeviceList(CloudDeviceListDelegate* delegate);
~CloudDeviceList() override;
void OnGCDAPIFlowError(GCDApiFlow::Status status) override;
void OnGCDAPIFlowComplete(const base::DictionaryValue& value) override;
GURL GetURL() override;
private:
bool FillDeviceDetails(const base::DictionaryValue& value,
CloudDeviceListDelegate::Device* device);
CloudDeviceListDelegate* delegate_;
};
} // namespace local_discovery
#endif // CHROME_BROWSER_LOCAL_DISCOVERY_CLOUD_DEVICE_LIST_H_
|