Pepper_56_C++_interfaces
Pepper_56_C++_interfaces
 All Classes Namespaces Files Functions Typedefs Enumerations Macros Groups
network_list.h
1 // Copyright (c) 2012 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 PPAPI_CPP_NETWORK_LIST_H_
6 #define PPAPI_CPP_NETWORK_LIST_H_
7 
8 #include <stdint.h>
9 
10 #include <string>
11 #include <vector>
12 
13 #include "ppapi/c/ppb_network_list.h"
14 #include "ppapi/cpp/pass_ref.h"
15 #include "ppapi/cpp/resource.h"
16 
17 namespace pp {
18 
19 class NetAddress;
20 
21 class NetworkList : public Resource {
22  public:
23  NetworkList();
24  NetworkList(PassRef, PP_Resource resource);
25 
27  static bool IsAvailable();
28 
31  uint32_t GetCount() const;
32 
35  std::string GetName(uint32_t index) const;
36 
39  PP_NetworkList_Type GetType(uint32_t index) const;
40 
43  PP_NetworkList_State GetState(uint32_t index) const;
44 
48  int32_t GetIpAddresses(uint32_t index,
49  std::vector<NetAddress>* addresses) const;
50 
53  std::string GetDisplayName(uint32_t index) const;
54 
57  uint32_t GetMTU(uint32_t index) const;
58 };
59 
60 } // namespace pp
61 
62 #endif // PPAPI_CPP_NETWORK_LIST_H_
Definition: network_list.h:21
PP_NetworkList_Type GetType(uint32_t index) const
int32_t GetIpAddresses(uint32_t index, std::vector< NetAddress > *addresses) const
uint32_t GetMTU(uint32_t index) const
std::string GetDisplayName(uint32_t index) const
uint32_t GetCount() const
static bool IsAvailable()
Returns true if the required interface is available.
PassRef
Definition: pass_ref.h:17
std::string GetName(uint32_t index) const
PP_NetworkList_State GetState(uint32_t index) const
A reference counted module resource.
Definition: resource.h:20