cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / ppapi / api / private / ppb_network_list_private.idl
blob8ec330fb8883639c53fe43855e6711f77dfc2825
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 */
6 /**
7 * This file defines the <code>PPB_NetworkList_Private</code> interface.
8 */
10 [generate_thunk]
12 label Chrome {
13 M19 = 0.2
16 /**
17 * Type of a network interface.
19 [assert_size(4)]
20 enum PP_NetworkListType_Private {
21 /**
22 * Type of the network interface is not known.
24 PP_NETWORKLIST_UNKNOWN = 0,
26 /**
27 * Wired Ethernet network.
29 PP_NETWORKLIST_ETHERNET = 1,
31 /**
32 * Wireless Wi-Fi network.
34 PP_NETWORKLIST_WIFI = 2,
36 /**
37 * Cellular network (e.g. LTE).
39 PP_NETWORKLIST_CELLULAR = 3
42 /**
43 * State of a network interface.
45 [assert_size(4)]
46 enum PP_NetworkListState_Private {
47 /**
48 * Network interface is down.
50 PP_NETWORKLIST_DOWN = 0,
52 /**
53 * Network interface is up.
55 PP_NETWORKLIST_UP = 1
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.
65 interface PPB_NetworkList_Private {
66 /**
67 * Determines if the specified <code>resource</code> is a
68 * <code>NetworkList</code> object.
70 * @param[in] resource A <code>PP_Resource</code> resource.
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.
76 PP_Bool IsNetworkList([in] PP_Resource resource);
78 /**
79 * @return Returns number of available network interfaces or 0 if
80 * the list has never been updated.
82 uint32_t GetCount([in] PP_Resource resource);
84 /**
85 * @return Returns name for the network interface with the specified
86 * <code>index</code>.
88 PP_Var GetName([in] PP_Resource resource,
89 [in] uint32_t index);
91 /**
92 * @return Returns type of the network interface with the specified
93 * <code>index</code>.
95 [on_failure=PP_NETWORKLIST_UNKNOWN]
96 PP_NetworkListType_Private GetType([in] PP_Resource resource,
97 [in] uint32_t index);
99 /**
100 * @return Returns current state of the network interface with the
101 * specified <code>index</code>.
103 [on_failure=PP_NETWORKLIST_DOWN]
104 PP_NetworkListState_Private GetState([in] PP_Resource resource,
105 [in] uint32_t index);
108 * Gets list of IP addresses for the network interface with the
109 * specified <code>index</code> and stores them in
110 * <code>addresses</code>. If the caller didn't allocate sufficient
111 * space to store all addresses, then only the first
112 * <code>count</code> addresses are filled in.
114 * @return Returns total number of IP addresses assigned to the
115 * network interface or a negative error code.
117 int32_t GetIpAddresses(
118 [in] PP_Resource resource,
119 [in] uint32_t index,
120 [inout, size_is(count)] PP_NetAddress_Private[] addresses,
121 [in] uint32_t count);
124 * @return Returns display name for the network interface with the
125 * specified <code>index</code>.
127 PP_Var GetDisplayName([in] PP_Resource resource,
128 [in] uint32_t index);
131 * @return Returns MTU for the network interface with the specified
132 * <code>index</code> or 0 if MTU is unknown.
134 uint32_t GetMTU([in] PP_Resource resource,
135 [in] uint32_t index);