Refactor android test results logging.
[chromium-blink-merge.git] / ppapi / api / private / ppb_network_list_private.idl
blob540aa1d75150f24e6aea7aaa41a9b5c0083f5bc9
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 label Chrome {
11 M19 = 0.2
14 /**
15 * Type of a network interface.
17 [assert_size(4)]
18 enum PP_NetworkListType_Private {
19 /**
20 * Type of the network interface is not known.
22 PP_NETWORKLIST_UNKNOWN = 0,
24 /**
25 * Wired Ethernet network.
27 PP_NETWORKLIST_ETHERNET = 1,
29 /**
30 * Wireless Wi-Fi network.
32 PP_NETWORKLIST_WIFI = 2,
34 /**
35 * Cellular network (e.g. LTE).
37 PP_NETWORKLIST_CELLULAR = 3
40 /**
41 * State of a network interface.
43 [assert_size(4)]
44 enum PP_NetworkListState_Private {
45 /**
46 * Network interface is down.
48 PP_NETWORKLIST_DOWN = 0,
50 /**
51 * Network interface is up.
53 PP_NETWORKLIST_UP = 1
56 /**
57 * The <code>PPB_NetworkList_Private</code> is used to represent a
58 * list of network interfaces and their configuration. The content of
59 * the list is immutable. The current networks configuration can be
60 * received using the <code>PPB_NetworkMonitor_Private</code>
61 * interface.
63 interface PPB_NetworkList_Private {
64 /**
65 * Determines if the specified <code>resource</code> is a
66 * <code>NetworkList</code> object.
68 * @param[in] resource A <code>PP_Resource</code> resource.
70 * @return Returns <code>PP_TRUE</code> if <code>resource</code> is
71 * a <code>PPB_NetworkList_Private</code>, <code>PP_FALSE</code>
72 * otherwise.
74 PP_Bool IsNetworkList([in] PP_Resource resource);
76 /**
77 * @return Returns number of available network interfaces or 0 if
78 * the list has never been updated.
80 uint32_t GetCount([in] PP_Resource resource);
82 /**
83 * @return Returns name for the network interface with the specified
84 * <code>index</code>.
86 PP_Var GetName([in] PP_Resource resource,
87 [in] uint32_t index);
89 /**
90 * @return Returns type of the network interface with the specified
91 * <code>index</code>.
93 PP_NetworkListType_Private GetType([in] PP_Resource resource,
94 [in] uint32_t index);
96 /**
97 * @return Returns current state of the network interface with the
98 * specified <code>index</code>.
100 PP_NetworkListState_Private GetState([in] PP_Resource resource,
101 [in] uint32_t index);
104 * Gets list of IP addresses for the network interface with the
105 * specified <code>index</code> and stores them in
106 * <code>addresses</code>. If the caller didn't allocate sufficient
107 * space to store all addresses, then only the first
108 * <code>count</code> addresses are filled in.
110 * @return Returns total number of IP addresses assigned to the
111 * network interface or a negative error code.
113 int32_t GetIpAddresses(
114 [in] PP_Resource resource,
115 [in] uint32_t index,
116 [inout, size_is(count)] PP_NetAddress_Private[] addresses,
117 [in] uint32_t count);
120 * @return Returns display name for the network interface with the
121 * specified <code>index</code>.
123 PP_Var GetDisplayName([in] PP_Resource resource,
124 [in] uint32_t index);
127 * @return Returns MTU for the network interface with the specified
128 * <code>index</code> or 0 if MTU is unknown.
130 uint32_t GetMTU([in] PP_Resource resource,
131 [in] uint32_t index);