Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: ppapi/api/private/ppb_network_list_private.idl

Issue 23450012: Make NetworkList and NetworkMonitor APIs public (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
6 /**
7 * This file defines the <code>PPB_NetworkList_Private</code> interface.
8 */
9
10 [generate_thunk]
11
12 label Chrome {
13 M31 = 0.3
14 };
15
16 /**
17 * Type of a network interface.
18 */
19 [assert_size(4)]
20 enum PP_NetworkListType_Private {
21 /**
22 * Type of the network interface is not known.
23 */
24 PP_NETWORKLIST_UNKNOWN = 0,
25
26 /**
27 * Wired Ethernet network.
28 */
29 PP_NETWORKLIST_ETHERNET = 1,
30
31 /**
32 * Wireless Wi-Fi network.
33 */
34 PP_NETWORKLIST_WIFI = 2,
35
36 /**
37 * Cellular network (e.g. LTE).
38 */
39 PP_NETWORKLIST_CELLULAR = 3
40 };
41
42 /**
43 * State of a network interface.
44 */
45 [assert_size(4)]
46 enum PP_NetworkListState_Private {
47 /**
48 * Network interface is down.
49 */
50 PP_NETWORKLIST_DOWN = 0,
51
52 /**
53 * Network interface is up.
54 */
55 PP_NETWORKLIST_UP = 1
56 };
57
58 /**
59 * The <code>PPB_NetworkList_Private</code> is used to represent a
60 * list of network interfaces and their configuration. The content of
61 * the list is immutable. The current networks configuration can be
62 * received using the <code>PPB_NetworkMonitor_Private</code>
63 * interface.
64 */
65 interface PPB_NetworkList_Private {
66 /**
67 * Determines if the specified <code>resource</code> is a
68 * <code>NetworkList</code> object.
69 *
70 * @param[in] resource A <code>PP_Resource</code> resource.
71 *
72 * @return Returns <code>PP_TRUE</code> if <code>resource</code> is
73 * a <code>PPB_NetworkList_Private</code>, <code>PP_FALSE</code>
74 * otherwise.
75 */
76 PP_Bool IsNetworkList([in] PP_Resource resource);
77
78 /**
79 * Gets number of interfaces in the list.
80 *
81 * @param[in] resource A <code>PP_Resource</code> corresponding to a
82 * network list.
83 *
84 * @return Returns number of available network interfaces or 0 if
85 * the list has never been updated.
86 */
87 uint32_t GetCount([in] PP_Resource resource);
88
89 /**
90 * Gets name of a network interface.
91 *
92 * @param[in] resource A <code>PP_Resource</code> corresponding to a
93 * network list.
94 * @param[in] index Index of the network interface.
95 *
96 * @return Returns name for the network interface with the specified
97 * <code>index</code>.
98 */
99 PP_Var GetName([in] PP_Resource resource,
100 [in] uint32_t index);
101
102 /**
103 * Gets type of a network interface.
104 *
105 * @param[in] resource A <code>PP_Resource</code> corresponding to a
106 * network list.
107 * @param[in] index Index of the network interface.
108 *
109 * @return Returns type of the network interface with the specified
110 * <code>index</code>.
111 */
112 [on_failure=PP_NETWORKLIST_UNKNOWN]
113 PP_NetworkListType_Private GetType([in] PP_Resource resource,
114 [in] uint32_t index);
115
116 /**
117 * Gets state of a network interface.
118 *
119 * @param[in] resource A <code>PP_Resource</code> corresponding to a
120 * network list.
121 * @param[in] index Index of the network interface.
122 *
123 * @return Returns current state of the network interface with the
124 * specified <code>index</code>.
125 */
126 [on_failure=PP_NETWORKLIST_DOWN]
127 PP_NetworkListState_Private GetState([in] PP_Resource resource,
128 [in] uint32_t index);
129
130 /**
131 * Gets list of IP addresses for a network interface.
132 *
133 * @param[in] resource A <code>PP_Resource</code> corresponding to a
134 * network list.
135 * @param[in] index Index of the network interface.
136 * @param[in] output An output array which will receive
137 * <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
139 * caller.
140 *
141 * @return An error code from <code>pp_errors.h</code>.
142 */
143 int32_t GetIpAddresses([in] PP_Resource resource,
144 [in] uint32_t index,
145 [in] PP_ArrayOutput output);
146
147 /**
148 * Gets display name of a network interface.
149 *
150 * @param[in] resource A <code>PP_Resource</code> corresponding to a
151 * network list.
152 * @param[in] index Index of the network interface.
153 *
154 * @return Returns display name for the network interface with the
155 * specified <code>index</code>.
156 */
157 PP_Var GetDisplayName([in] PP_Resource resource,
158 [in] uint32_t index);
159
160 /**
161 * Gets MTU (Maximum Transmission Unit) of a network interface.
162 *
163 * @param[in] resource A <code>PP_Resource</code> corresponding to a
164 * network list.
165 * @param[in] index Index of the network interface.
166 *
167 * @return Returns MTU for the network interface with the specified
168 * <code>index</code> or 0 if MTU is unknown.
169 */
170 uint32_t GetMTU([in] PP_Resource resource,
171 [in] uint32_t index);
172
173 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698