OLD | NEW |
| (Empty) |
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_PRIVATE_NETWORK_LIST_PRIVATE_H_ | |
6 #define PPAPI_CPP_PRIVATE_NETWORK_LIST_PRIVATE_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 #include "ppapi/c/private/ppb_network_list_private.h" | |
12 #include "ppapi/cpp/resource.h" | |
13 | |
14 namespace pp { | |
15 | |
16 class NetworkListPrivate : public Resource { | |
17 public: | |
18 explicit NetworkListPrivate(PP_Resource resource); | |
19 | |
20 /// Returns true if the required interface is available. | |
21 static bool IsAvailable(); | |
22 | |
23 /// @return Returns the number of available network interfaces or 0 | |
24 /// if the list has never been updated. | |
25 uint32_t GetCount(); | |
26 | |
27 /// @return Returns the name for the network interface with the | |
28 /// specified <code>index</code>. | |
29 std::string GetName(uint32_t index); | |
30 | |
31 /// @return Returns the type of the network interface with the | |
32 /// specified <code>index</code>. | |
33 PP_NetworkListType_Private GetType(uint32_t index); | |
34 | |
35 /// @return Returns the current state of the network interface with | |
36 /// the specified <code>index</code>. | |
37 PP_NetworkListState_Private GetState(uint32_t index); | |
38 | |
39 /// Gets the list of IP addresses for the network interface with the | |
40 /// specified <code>index</code> and stores them in | |
41 /// <code>addresses</code>. | |
42 void GetIpAddresses(uint32_t index, | |
43 std::vector<PP_NetAddress_Private>* addresses); | |
44 | |
45 /// @return Returns the display name for the network interface with | |
46 /// the specified <code>index</code>. | |
47 std::string GetDisplayName(uint32_t index); | |
48 | |
49 /// @return Returns the MTU for the network interface with the | |
50 /// specified <code>index</code>. | |
51 uint32_t GetMTU(uint32_t index); | |
52 }; | |
53 | |
54 } // namespace pp | |
55 | |
56 #endif // PPAPI_CPP_PRIVATE_NETWORK_LIST_PRIVATE_H_ | |
OLD | NEW |