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 * Type of the network interface is not known. | |
21 */ | |
22 PP_NETWORKLIST_UNKNOWN = 0, | |
23 | |
24 /** | |
25 * Wired Ethernet network. | 20 * Wired Ethernet network. |
26 */ | 21 */ |
27 PP_NETWORKLIST_ETHERNET = 1, | 22 PP_NETWORKLIST_ETHERNET = 0, |
28 | 23 |
29 /** | 24 /** |
30 * Wireless Wi-Fi network. | 25 * Wireless Wi-Fi network. |
31 */ | 26 */ |
32 PP_NETWORKLIST_WIFI = 2, | 27 PP_NETWORKLIST_WIFI = 1, |
33 | 28 |
34 /** | 29 /** |
35 * Cellular network (e.g. LTE). | 30 * Cellular network (e.g. LTE). |
36 */ | 31 */ |
37 PP_NETWORKLIST_CELLULAR = 3 | 32 PP_NETWORKLIST_CELLULAR = 2 |
38 }; | 33 }; |
39 | 34 |
40 /** | 35 /** |
41 * State of a network interface. | 36 * State of a network interface. |
42 */ | 37 */ |
43 [assert_size(4)] | 38 [assert_size(4)] |
44 enum PP_NetworkListState_Private { | 39 enum PP_NetworkListState_Private { |
45 /** | 40 /** |
46 * Network interface is down. | 41 * Network interface is down. |
47 */ | 42 */ |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 * @return Returns name for the network interface with the specified | 78 * @return Returns name for the network interface with the specified |
84 * <code>index</code>. | 79 * <code>index</code>. |
85 */ | 80 */ |
86 PP_Var GetName([in] PP_Resource resource, | 81 PP_Var GetName([in] PP_Resource resource, |
87 [in] uint32_t index); | 82 [in] uint32_t index); |
88 | 83 |
89 /** | 84 /** |
90 * @return Returns type of the network interface with the specified | 85 * @return Returns type of the network interface with the specified |
91 * <code>index</code>. | 86 * <code>index</code>. |
92 */ | 87 */ |
93 PP_NetworkListType_Private GetType([in] PP_Resource resource, | 88 PP_NetworkListType_Private GetType([in] PP_Resource resource, |
94 [in] uint32_t index); | 89 [in] uint32_t index); |
95 | 90 |
96 /** | 91 /** |
97 * @return Returns current state of the network interface with the | 92 * @return Returns current state of the network interface with the |
98 * specified <code>index</code>. | 93 * specified <code>index</code>. |
99 */ | 94 */ |
100 PP_NetworkListState_Private GetState([in] PP_Resource resource, | 95 PP_NetworkListState_Private GetState([in] PP_Resource resource, |
101 [in] uint32_t index); | 96 [in] uint32_t index); |
102 | 97 |
103 /** | 98 /** |
104 * Gets list of IP addresses for the network interface with the | 99 * Gets list of IP addresses for the network interface with the |
105 * specified <code>index</code> and stores them in | 100 * specified <code>index</code> and stores them in |
106 * <code>addresses</code>. If the caller didn't allocate sufficient | 101 * <code>addresses</code>. If the caller didn't allocate sufficient |
107 * space to store all addresses, then only the first | 102 * space to store all addresses, then only the first |
108 * <code>count</code> addresses are filled in. | 103 * <code>count</code> addresses are filled in. |
109 * | 104 * |
110 * @return Returns total number of IP addresses assigned to the | 105 * @return Returns total number of IP addresses assigned to the |
111 * network interface or a negative error code. | 106 * network interface or a negative error code. |
112 */ | 107 */ |
113 int32_t GetIpAddresses( | 108 int32_t GetIpAddresses( |
114 [in] PP_Resource resource, | 109 [in] PP_Resource resource, |
115 [in] uint32_t index, | 110 [in] uint32_t index, |
116 [inout, size_is(count)] PP_NetAddress_Private[] addresses, | 111 [out, size_is(count)] PP_NetAddress_Private[] addresses, |
117 [in] uint32_t count); | 112 [in] int32_t count); |
118 | 113 |
119 /** | 114 /** |
120 * @return Returns display name for the network interface with the | 115 * @return Returns display name for the network interface with the |
121 * specified <code>index</code>. | 116 * specified <code>index</code>. |
122 */ | 117 */ |
123 PP_Var GetDisplayName([in] PP_Resource resource, | 118 PP_Var GetDisplayName([in] PP_Resource resource, |
124 [in] uint32_t index); | 119 [in] uint32_t index); |
125 | 120 |
126 /** | 121 /** |
127 * @return Returns MTU for the network interface with the specified | 122 * @return Returns MTU for the network interface with the specified |
128 * <code>index</code> or 0 if MTU is unknown. | 123 * <code>index</code>. |
129 */ | 124 */ |
130 uint32_t GetMTU([in] PP_Resource resource, | 125 uint32_t GetMTU([in] PP_Resource resource, |
131 [in] uint32_t index); | 126 [in] uint32_t index); |
132 | 127 |
133 }; | 128 }; |
OLD | NEW |