Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * This file defines the <code>PPB_NetworkList_Private</code> interface. | 7 * This file defines the <code>PPB_NetworkList_Private</code> interface. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 label Chrome { | 10 label Chrome { |
| 11 M19 = 0.2 | 11 M19 = 0.2 |
| 12 }; | 12 }; |
| 13 | 13 |
| 14 /** | 14 /** |
| 15 * Type of a network interface. | 15 * Type of a network interface. |
| 16 */ | 16 */ |
| 17 [assert_size(4)] | 17 [assert_size(4)] |
| 18 enum PP_NetworkListType_Private { | 18 enum PP_NetworkListType_Private { |
| 19 /** | 19 /** |
| 20 * Wired Ethernet network. | 20 * Wired Ethernet network. |
|
dmichael (off chromium)
2012/03/01 18:29:54
comment seems wrong
Sergey Ulanov
2012/03/02 03:01:37
Done.
| |
| 21 */ | 21 */ |
| 22 PP_NETWORKLIST_ETHERNET = 0, | 22 PP_NETWORKLIST_UNKNOWN = 0, |
| 23 | |
| 24 /** | |
| 25 * Wired Ethernet network. | |
| 26 */ | |
| 27 PP_NETWORKLIST_ETHERNET = 1, | |
| 23 | 28 |
| 24 /** | 29 /** |
| 25 * Wireless Wi-Fi network. | 30 * Wireless Wi-Fi network. |
| 26 */ | 31 */ |
| 27 PP_NETWORKLIST_WIFI = 1, | 32 PP_NETWORKLIST_WIFI = 2, |
| 28 | 33 |
| 29 /** | 34 /** |
| 30 * Cellular network (e.g. LTE). | 35 * Cellular network (e.g. LTE). |
| 31 */ | 36 */ |
| 32 PP_NETWORKLIST_CELLULAR = 2 | 37 PP_NETWORKLIST_CELLULAR = 3 |
| 33 }; | 38 }; |
| 34 | 39 |
| 35 /** | 40 /** |
| 36 * State of a network interface. | 41 * State of a network interface. |
| 37 */ | 42 */ |
| 38 [assert_size(4)] | 43 [assert_size(4)] |
| 39 enum PP_NetworkListState_Private { | 44 enum PP_NetworkListState_Private { |
| 40 /** | 45 /** |
| 41 * Network interface is down. | 46 * Network interface is down. |
| 42 */ | 47 */ |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 78 * @return Returns name for the network interface with the specified | 83 * @return Returns name for the network interface with the specified |
| 79 * <code>index</code>. | 84 * <code>index</code>. |
| 80 */ | 85 */ |
| 81 PP_Var GetName([in] PP_Resource resource, | 86 PP_Var GetName([in] PP_Resource resource, |
| 82 [in] uint32_t index); | 87 [in] uint32_t index); |
| 83 | 88 |
| 84 /** | 89 /** |
| 85 * @return Returns type of the network interface with the specified | 90 * @return Returns type of the network interface with the specified |
| 86 * <code>index</code>. | 91 * <code>index</code>. |
| 87 */ | 92 */ |
| 88 PP_NetworkListType_Private GetType([in] PP_Resource resource, | 93 PP_NetworkListType_Private GetType([in] PP_Resource resource, |
| 89 [in] uint32_t index); | 94 [in] uint32_t index); |
| 90 | 95 |
| 91 /** | 96 /** |
| 92 * @return Returns current state of the network interface with the | 97 * @return Returns current state of the network interface with the |
| 93 * specified <code>index</code>. | 98 * specified <code>index</code>. |
| 94 */ | 99 */ |
| 95 PP_NetworkListState_Private GetState([in] PP_Resource resource, | 100 PP_NetworkListState_Private GetState([in] PP_Resource resource, |
| 96 [in] uint32_t index); | 101 [in] uint32_t index); |
| 97 | 102 |
| 98 /** | 103 /** |
| 99 * Gets list of IP addresses for the network interface with the | 104 * Gets list of IP addresses for the network interface with the |
| 100 * specified <code>index</code> and stores them in | 105 * specified <code>index</code> and stores them in |
| 101 * <code>addresses</code>. If the caller didn't allocate sufficient | 106 * <code>addresses</code>. If the caller didn't allocate sufficient |
| 102 * space to store all addresses, then only the first | 107 * space to store all addresses, then only the first |
| 103 * <code>count</code> addresses are filled in. | 108 * <code>count</code> addresses are filled in. |
| 104 * | 109 * |
| 105 * @return Returns total number of IP addresses assigned to the | 110 * @return Returns total number of IP addresses assigned to the |
| 106 * network interface or a negative error code. | 111 * network interface or a negative error code. |
| 107 */ | 112 */ |
| 108 int32_t GetIpAddresses( | 113 int32_t GetIpAddresses( |
| 109 [in] PP_Resource resource, | 114 [in] PP_Resource resource, |
| 110 [in] uint32_t index, | 115 [in] uint32_t index, |
| 111 [out, size_is(count)] PP_NetAddress_Private[] addresses, | 116 [inout, size_is(count)] PP_NetAddress_Private[] addresses, |
|
Sergey Ulanov
2012/03/01 00:54:55
changed this to inout because the caller is suppos
| |
| 112 [in] int32_t count); | 117 [in] uint32_t count); |
| 113 | 118 |
| 114 /** | 119 /** |
| 115 * @return Returns display name for the network interface with the | 120 * @return Returns display name for the network interface with the |
| 116 * specified <code>index</code>. | 121 * specified <code>index</code>. |
| 117 */ | 122 */ |
| 118 PP_Var GetDisplayName([in] PP_Resource resource, | 123 PP_Var GetDisplayName([in] PP_Resource resource, |
| 119 [in] uint32_t index); | 124 [in] uint32_t index); |
| 120 | 125 |
| 121 /** | 126 /** |
| 122 * @return Returns MTU for the network interface with the specified | 127 * @return Returns MTU for the network interface with the specified |
| 123 * <code>index</code>. | 128 * <code>index</code> or 0 if MTU is unknown. |
| 124 */ | 129 */ |
| 125 uint32_t GetMTU([in] PP_Resource resource, | 130 uint32_t GetMTU([in] PP_Resource resource, |
| 126 [in] uint32_t index); | 131 [in] uint32_t index); |
| 127 | 132 |
| 128 }; | 133 }; |
| OLD | NEW |