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</code> interface. |
8 */ | 8 */ |
9 | 9 |
10 [generate_thunk] | 10 [generate_thunk] |
11 | 11 |
12 label Chrome { | 12 label Chrome { |
13 M31 = 0.3 | 13 M31 = 1.0 |
14 }; | 14 }; |
15 | 15 |
16 /** | 16 /** |
17 * Type of a network interface. | 17 * Type of a network interface. |
18 */ | 18 */ |
19 [assert_size(4)] | 19 [assert_size(4)] |
20 enum PP_NetworkListType_Private { | 20 enum PP_NetworkList_Type { |
21 /** | 21 /** |
22 * Type of the network interface is not known. | 22 * Type of the network interface is not known. |
23 */ | 23 */ |
24 PP_NETWORKLIST_UNKNOWN = 0, | 24 PP_NETWORKLIST_TYPE_UNKNOWN = 0, |
25 | 25 |
26 /** | 26 /** |
27 * Wired Ethernet network. | 27 * Wired Ethernet network. |
28 */ | 28 */ |
29 PP_NETWORKLIST_ETHERNET = 1, | 29 PP_NETWORKLIST_TYPE_ETHERNET = 1, |
30 | 30 |
31 /** | 31 /** |
32 * Wireless Wi-Fi network. | 32 * Wireless Wi-Fi network. |
33 */ | 33 */ |
34 PP_NETWORKLIST_WIFI = 2, | 34 PP_NETWORKLIST_TYPE_WIFI = 2, |
35 | 35 |
36 /** | 36 /** |
37 * Cellular network (e.g. LTE). | 37 * Cellular network (e.g. LTE). |
38 */ | 38 */ |
39 PP_NETWORKLIST_CELLULAR = 3 | 39 PP_NETWORKLIST_TYPE_CELLULAR = 3 |
40 }; | 40 }; |
41 | 41 |
42 /** | 42 /** |
43 * State of a network interface. | 43 * State of a network interface. |
44 */ | 44 */ |
45 [assert_size(4)] | 45 [assert_size(4)] |
46 enum PP_NetworkListState_Private { | 46 enum PP_NetworkList_State { |
47 /** | 47 /** |
48 * Network interface is down. | 48 * Network interface is down. |
49 */ | 49 */ |
50 PP_NETWORKLIST_DOWN = 0, | 50 PP_NETWORKLIST_STATE_DOWN = 0, |
51 | 51 |
52 /** | 52 /** |
53 * Network interface is up. | 53 * Network interface is up. |
54 */ | 54 */ |
55 PP_NETWORKLIST_UP = 1 | 55 PP_NETWORKLIST_STATE_UP = 1 |
56 }; | 56 }; |
57 | 57 |
58 /** | 58 /** |
59 * The <code>PPB_NetworkList_Private</code> is used to represent a | 59 * The <code>PPB_NetworkList</code> is used to represent a list of |
60 * list of network interfaces and their configuration. The content of | 60 * network interfaces and their configuration. The content of the list |
61 * the list is immutable. The current networks configuration can be | 61 * is immutable. The current networks configuration can be received |
62 * received using the <code>PPB_NetworkMonitor_Private</code> | 62 * using the <code>PPB_NetworkMonitor</code> interface. |
63 * interface. | |
64 */ | 63 */ |
65 interface PPB_NetworkList_Private { | 64 interface PPB_NetworkList { |
66 /** | 65 /** |
67 * Determines if the specified <code>resource</code> is a | 66 * Determines if the specified <code>resource</code> is a |
68 * <code>NetworkList</code> object. | 67 * <code>NetworkList</code> object. |
69 * | 68 * |
70 * @param[in] resource A <code>PP_Resource</code> resource. | 69 * @param[in] resource A <code>PP_Resource</code> resource. |
71 * | 70 * |
72 * @return Returns <code>PP_TRUE</code> if <code>resource</code> is | 71 * @return Returns <code>PP_TRUE</code> if <code>resource</code> is |
73 * a <code>PPB_NetworkList_Private</code>, <code>PP_FALSE</code> | 72 * a <code>PPB_NetworkList</code>, <code>PP_FALSE</code> |
74 * otherwise. | 73 * otherwise. |
75 */ | 74 */ |
76 PP_Bool IsNetworkList([in] PP_Resource resource); | 75 PP_Bool IsNetworkList([in] PP_Resource resource); |
77 | 76 |
78 /** | 77 /** |
79 * Gets number of interfaces in the list. | 78 * Gets number of interfaces in the list. |
80 * | 79 * |
81 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 80 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
82 * network list. | 81 * network list. |
83 * | 82 * |
(...skipping 18 matching lines...) Expand all Loading... | |
102 /** | 101 /** |
103 * Gets type of a network interface. | 102 * Gets type of a network interface. |
104 * | 103 * |
105 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 104 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
106 * network list. | 105 * network list. |
107 * @param[in] index Index of the network interface. | 106 * @param[in] index Index of the network interface. |
108 * | 107 * |
109 * @return Returns type of the network interface with the specified | 108 * @return Returns type of the network interface with the specified |
110 * <code>index</code>. | 109 * <code>index</code>. |
111 */ | 110 */ |
112 [on_failure=PP_NETWORKLIST_UNKNOWN] | 111 [on_failure=PP_NETWORKLIST_TYPE_UNKNOWN] |
113 PP_NetworkListType_Private GetType([in] PP_Resource resource, | 112 PP_NetworkList_Type GetType([in] PP_Resource resource, |
114 [in] uint32_t index); | 113 [in] uint32_t index); |
yzshen1
2013/09/19 07:56:12
wrong indent.
Sergey Ulanov
2013/09/20 01:17:56
Done.
| |
115 | 114 |
116 /** | 115 /** |
117 * Gets state of a network interface. | 116 * Gets state of a network interface. |
118 * | 117 * |
119 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 118 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
120 * network list. | 119 * network list. |
121 * @param[in] index Index of the network interface. | 120 * @param[in] index Index of the network interface. |
122 * | 121 * |
123 * @return Returns current state of the network interface with the | 122 * @return Returns current state of the network interface with the |
124 * specified <code>index</code>. | 123 * specified <code>index</code>. |
125 */ | 124 */ |
126 [on_failure=PP_NETWORKLIST_DOWN] | 125 [on_failure=PP_NETWORKLIST_STATE_DOWN] |
127 PP_NetworkListState_Private GetState([in] PP_Resource resource, | 126 PP_NetworkList_State GetState([in] PP_Resource resource, |
128 [in] uint32_t index); | 127 [in] uint32_t index); |
yzshen1
2013/09/19 07:56:12
wrong indent.
Sergey Ulanov
2013/09/20 01:17:56
Done.
| |
129 | 128 |
130 /** | 129 /** |
131 * Gets list of IP addresses for a network interface. | 130 * Gets list of IP addresses for a network interface. |
132 * | 131 * |
133 * @param[in] resource A <code>PP_Resource</code> corresponding to a | 132 * @param[in] resource A <code>PP_Resource</code> corresponding to a |
134 * network list. | 133 * network list. |
135 * @param[in] index Index of the network interface. | 134 * @param[in] index Index of the network interface. |
136 * @param[in] output An output array which will receive | 135 * @param[in] output An output array which will receive |
137 * <code>PPB_NetAddress</code> resources on success. Please note that the | 136 * <code>PPB_NetAddress</code> resources on success. Please note that the |
138 * ref count of those resources has already been increased by 1 for the | 137 * ref count of those resources has already been increased by 1 for the |
(...skipping 25 matching lines...) Expand all Loading... | |
164 * network list. | 163 * network list. |
165 * @param[in] index Index of the network interface. | 164 * @param[in] index Index of the network interface. |
166 * | 165 * |
167 * @return Returns MTU for the network interface with the specified | 166 * @return Returns MTU for the network interface with the specified |
168 * <code>index</code> or 0 if MTU is unknown. | 167 * <code>index</code> or 0 if MTU is unknown. |
169 */ | 168 */ |
170 uint32_t GetMTU([in] PP_Resource resource, | 169 uint32_t GetMTU([in] PP_Resource resource, |
171 [in] uint32_t index); | 170 [in] uint32_t index); |
172 | 171 |
173 }; | 172 }; |
OLD | NEW |