cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / ppapi / c / private / ppb_network_list_private.h
blob2cba36262b0abf0761a4ef138d0617ef5639bcc3
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 /* From private/ppb_network_list_private.idl,
7 * modified Thu Mar 1 16:24:33 2012.
8 */
10 #ifndef PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_
11 #define PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_
13 #include "ppapi/c/pp_bool.h"
14 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h"
17 #include "ppapi/c/pp_var.h"
18 #include "ppapi/c/private/ppb_net_address_private.h"
20 #define PPB_NETWORKLIST_PRIVATE_INTERFACE_0_2 "PPB_NetworkList_Private;0.2"
21 #define PPB_NETWORKLIST_PRIVATE_INTERFACE PPB_NETWORKLIST_PRIVATE_INTERFACE_0_2
23 /**
24 * @file
25 * This file defines the <code>PPB_NetworkList_Private</code> interface.
29 /**
30 * @addtogroup Enums
31 * @{
33 /**
34 * Type of a network interface.
36 typedef enum {
37 /**
38 * Type of the network interface is not known.
40 PP_NETWORKLIST_UNKNOWN = 0,
41 /**
42 * Wired Ethernet network.
44 PP_NETWORKLIST_ETHERNET = 1,
45 /**
46 * Wireless Wi-Fi network.
48 PP_NETWORKLIST_WIFI = 2,
49 /**
50 * Cellular network (e.g. LTE).
52 PP_NETWORKLIST_CELLULAR = 3
53 } PP_NetworkListType_Private;
54 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_NetworkListType_Private, 4);
56 /**
57 * State of a network interface.
59 typedef enum {
60 /**
61 * Network interface is down.
63 PP_NETWORKLIST_DOWN = 0,
64 /**
65 * Network interface is up.
67 PP_NETWORKLIST_UP = 1
68 } PP_NetworkListState_Private;
69 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_NetworkListState_Private, 4);
70 /**
71 * @}
74 /**
75 * @addtogroup Interfaces
76 * @{
78 /**
79 * The <code>PPB_NetworkList_Private</code> is used to represent a
80 * list of network interfaces and their configuration. The content of
81 * the list is immutable. The current networks configuration can be
82 * received using the <code>PPB_NetworkMonitor_Private</code>
83 * interface.
85 struct PPB_NetworkList_Private_0_2 {
86 /**
87 * Determines if the specified <code>resource</code> is a
88 * <code>NetworkList</code> object.
90 * @param[in] resource A <code>PP_Resource</code> resource.
92 * @return Returns <code>PP_TRUE</code> if <code>resource</code> is
93 * a <code>PPB_NetworkList_Private</code>, <code>PP_FALSE</code>
94 * otherwise.
96 PP_Bool (*IsNetworkList)(PP_Resource resource);
97 /**
98 * @return Returns number of available network interfaces or 0 if
99 * the list has never been updated.
101 uint32_t (*GetCount)(PP_Resource resource);
103 * @return Returns name for the network interface with the specified
104 * <code>index</code>.
106 struct PP_Var (*GetName)(PP_Resource resource, uint32_t index);
108 * @return Returns type of the network interface with the specified
109 * <code>index</code>.
111 PP_NetworkListType_Private (*GetType)(PP_Resource resource, uint32_t index);
113 * @return Returns current state of the network interface with the
114 * specified <code>index</code>.
116 PP_NetworkListState_Private (*GetState)(PP_Resource resource, uint32_t index);
118 * Gets list of IP addresses for the network interface with the
119 * specified <code>index</code> and stores them in
120 * <code>addresses</code>. If the caller didn't allocate sufficient
121 * space to store all addresses, then only the first
122 * <code>count</code> addresses are filled in.
124 * @return Returns total number of IP addresses assigned to the
125 * network interface or a negative error code.
127 int32_t (*GetIpAddresses)(PP_Resource resource,
128 uint32_t index,
129 struct PP_NetAddress_Private addresses[],
130 uint32_t count);
132 * @return Returns display name for the network interface with the
133 * specified <code>index</code>.
135 struct PP_Var (*GetDisplayName)(PP_Resource resource, uint32_t index);
137 * @return Returns MTU for the network interface with the specified
138 * <code>index</code> or 0 if MTU is unknown.
140 uint32_t (*GetMTU)(PP_Resource resource, uint32_t index);
143 typedef struct PPB_NetworkList_Private_0_2 PPB_NetworkList_Private;
145 * @}
148 #endif /* PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_ */