Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 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. | |
|
dmichael (off chromium)
2012/03/01 18:29:54
// -> ///
Sergey Ulanov
2012/03/02 03:01:37
Done.
| |
| 21 static bool IsAvailable(); | |
| 22 | |
| 23 /// @return Returns number of available network interfaces or 0 if | |
|
dmichael (off chromium)
2012/03/01 18:29:54
Returns "the" number
Sergey Ulanov
2012/03/02 03:01:37
Done.
| |
| 24 /// the list has never been updated. | |
| 25 uint32_t GetCount(); | |
| 26 | |
| 27 /// @return Returns name for the network interface with the specified | |
|
dmichael (off chromium)
2012/03/01 18:29:54
"the" name (and similar for the other functions be
Sergey Ulanov
2012/03/02 03:01:37
Done.
| |
| 28 /// <code>index</code>. | |
| 29 std::string GetName(uint32_t index); | |
| 30 | |
| 31 /// @return Returns type of the network interface with the specified | |
| 32 /// <code>index</code>. | |
| 33 PP_NetworkListType_Private GetType(uint32_t index); | |
| 34 | |
| 35 /// @return Returns current state of the network interface with the | |
| 36 /// specified <code>index</code>. | |
| 37 PP_NetworkListState_Private GetState(uint32_t index); | |
| 38 | |
| 39 /// Gets 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 display name for the network interface with the | |
| 46 /// specified <code>index</code>. | |
| 47 std::string GetDisplayName(uint32_t index); | |
| 48 | |
| 49 /// @return Returns MTU for the network interface with the specified | |
| 50 /// <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 |