summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/network_monitor.h
blob: c2dac4cdbee13016251968bf48ad265192b04a94 (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
// Copyright (c) 2012 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 PPAPI_CPP_NETWORK_MONITOR_H_
#define PPAPI_CPP_NETWORK_MONITOR_H_

#include <stdint.h>

#include "ppapi/cpp/instance_handle.h"
#include "ppapi/cpp/resource.h"

namespace pp {

class Instance;
class NetworkList;

template <typename T> class CompletionCallbackWithOutput;

class NetworkMonitor : public Resource {
 public:
  explicit NetworkMonitor(const InstanceHandle& instance);

  int32_t UpdateNetworkList(
      const CompletionCallbackWithOutput<NetworkList>& callback);

  // Returns true if the required interface is available.
  static bool IsAvailable();
};

}  // namespace pp

#endif  // PPAPI_CPP_NETWORK_MONITOR_H_