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

Side by Side Diff: ppapi/c/private/ppb_network_list_private.h

Issue 23806003: Use PP_ArrayOutput and PPB_NetAddress in PPB_NetworkList_Private.. (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
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 /* From private/ppb_network_list_private.idl, 6 /* From private/ppb_network_list_private.idl,
7 * modified Thu Mar 1 16:24:33 2012. 7 * modified Tue Sep 3 16:21:43 2013.
8 */ 8 */
9 9
10 #ifndef PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_ 10 #ifndef PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_
11 #define PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_ 11 #define PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_
12 12
13 #include "ppapi/c/pp_array_output.h"
13 #include "ppapi/c/pp_bool.h" 14 #include "ppapi/c/pp_bool.h"
14 #include "ppapi/c/pp_macros.h" 15 #include "ppapi/c/pp_macros.h"
15 #include "ppapi/c/pp_resource.h" 16 #include "ppapi/c/pp_resource.h"
16 #include "ppapi/c/pp_stdint.h" 17 #include "ppapi/c/pp_stdint.h"
17 #include "ppapi/c/pp_var.h" 18 #include "ppapi/c/pp_var.h"
18 #include "ppapi/c/private/ppb_net_address_private.h"
19 19
20 #define PPB_NETWORKLIST_PRIVATE_INTERFACE_0_2 "PPB_NetworkList_Private;0.2" 20 #define PPB_NETWORKLIST_PRIVATE_INTERFACE_0_3 "PPB_NetworkList_Private;0.3"
21 #define PPB_NETWORKLIST_PRIVATE_INTERFACE PPB_NETWORKLIST_PRIVATE_INTERFACE_0_2 21 #define PPB_NETWORKLIST_PRIVATE_INTERFACE PPB_NETWORKLIST_PRIVATE_INTERFACE_0_3
22 22
23 /** 23 /**
24 * @file 24 * @file
25 * This file defines the <code>PPB_NetworkList_Private</code> interface. 25 * This file defines the <code>PPB_NetworkList_Private</code> interface.
26 */ 26 */
27 27
28 28
29 /** 29 /**
30 * @addtogroup Enums 30 * @addtogroup Enums
31 * @{ 31 * @{
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 * @addtogroup Interfaces 75 * @addtogroup Interfaces
76 * @{ 76 * @{
77 */ 77 */
78 /** 78 /**
79 * The <code>PPB_NetworkList_Private</code> is used to represent a 79 * The <code>PPB_NetworkList_Private</code> is used to represent a
80 * list of network interfaces and their configuration. The content of 80 * list of network interfaces and their configuration. The content of
81 * the list is immutable. The current networks configuration can be 81 * the list is immutable. The current networks configuration can be
82 * received using the <code>PPB_NetworkMonitor_Private</code> 82 * received using the <code>PPB_NetworkMonitor_Private</code>
83 * interface. 83 * interface.
84 */ 84 */
85 struct PPB_NetworkList_Private_0_2 { 85 struct PPB_NetworkList_Private_0_3 {
86 /** 86 /**
87 * Determines if the specified <code>resource</code> is a 87 * Determines if the specified <code>resource</code> is a
88 * <code>NetworkList</code> object. 88 * <code>NetworkList</code> object.
89 * 89 *
90 * @param[in] resource A <code>PP_Resource</code> resource. 90 * @param[in] resource A <code>PP_Resource</code> resource.
91 * 91 *
92 * @return Returns <code>PP_TRUE</code> if <code>resource</code> is 92 * @return Returns <code>PP_TRUE</code> if <code>resource</code> is
93 * a <code>PPB_NetworkList_Private</code>, <code>PP_FALSE</code> 93 * a <code>PPB_NetworkList_Private</code>, <code>PP_FALSE</code>
94 * otherwise. 94 * otherwise.
95 */ 95 */
96 PP_Bool (*IsNetworkList)(PP_Resource resource); 96 PP_Bool (*IsNetworkList)(PP_Resource resource);
97 /** 97 /**
98 * Gets number of interfaces in the list.
99 *
98 * @return Returns number of available network interfaces or 0 if 100 * @return Returns number of available network interfaces or 0 if
99 * the list has never been updated. 101 * the list has never been updated.
100 */ 102 */
101 uint32_t (*GetCount)(PP_Resource resource); 103 uint32_t (*GetCount)(PP_Resource resource);
102 /** 104 /**
105 * Gets name of a network interface.
106 *
107 * @param[in] resource A <code>PP_Resource</code> corresponding to a
108 * network list.
109 * @param[in] index Index of the network interface.
110 *
103 * @return Returns name for the network interface with the specified 111 * @return Returns name for the network interface with the specified
104 * <code>index</code>. 112 * <code>index</code>.
105 */ 113 */
106 struct PP_Var (*GetName)(PP_Resource resource, uint32_t index); 114 struct PP_Var (*GetName)(PP_Resource resource, uint32_t index);
107 /** 115 /**
116 * Gets type of a network interface.
117 *
118 * @param[in] resource A <code>PP_Resource</code> corresponding to a
119 * network list.
120 * @param[in] index Index of the network interface.
121 *
108 * @return Returns type of the network interface with the specified 122 * @return Returns type of the network interface with the specified
109 * <code>index</code>. 123 * <code>index</code>.
110 */ 124 */
111 PP_NetworkListType_Private (*GetType)(PP_Resource resource, uint32_t index); 125 PP_NetworkListType_Private (*GetType)(PP_Resource resource, uint32_t index);
112 /** 126 /**
127 * Gets state of a network interface.
128 *
129 * @param[in] resource A <code>PP_Resource</code> corresponding to a
130 * network list.
131 * @param[in] index Index of the network interface.
132 *
113 * @return Returns current state of the network interface with the 133 * @return Returns current state of the network interface with the
114 * specified <code>index</code>. 134 * specified <code>index</code>.
115 */ 135 */
116 PP_NetworkListState_Private (*GetState)(PP_Resource resource, uint32_t index); 136 PP_NetworkListState_Private (*GetState)(PP_Resource resource, uint32_t index);
117 /** 137 /**
118 * Gets list of IP addresses for the network interface with the 138 * Gets list of IP addresses for a network interface.
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.
123 * 139 *
124 * @return Returns total number of IP addresses assigned to the 140 * @param[in] resource A <code>PP_Resource</code> corresponding to a
125 * network interface or a negative error code. 141 * network list.
142 * @param[in] index Index of the network interface.
143 * @param[in] output An output array which will receive
144 * <code>PPB_NetAddress</code> resources on success. Please note that the
145 * ref count of those resources has already been increased by 1 for the
146 * caller.
147 *
148 * @return An error code from <code>pp_errors.h</code>.
126 */ 149 */
127 int32_t (*GetIpAddresses)(PP_Resource resource, 150 int32_t (*GetIpAddresses)(PP_Resource resource,
128 uint32_t index, 151 uint32_t index,
129 struct PP_NetAddress_Private addresses[], 152 struct PP_ArrayOutput output);
130 uint32_t count);
131 /** 153 /**
154 * Gets display name of a network interface.
155 *
156 * @param[in] resource A <code>PP_Resource</code> corresponding to a
157 * network list.
158 * @param[in] index Index of the network interface.
159 *
132 * @return Returns display name for the network interface with the 160 * @return Returns display name for the network interface with the
133 * specified <code>index</code>. 161 * specified <code>index</code>.
134 */ 162 */
135 struct PP_Var (*GetDisplayName)(PP_Resource resource, uint32_t index); 163 struct PP_Var (*GetDisplayName)(PP_Resource resource, uint32_t index);
136 /** 164 /**
165 * Gets MTU (Maximum Transmission Unit) of a network interface.
166 *
167 * @param[in] resource A <code>PP_Resource</code> corresponding to a
168 * network list.
169 * @param[in] index Index of the network interface.
170 *
137 * @return Returns MTU for the network interface with the specified 171 * @return Returns MTU for the network interface with the specified
138 * <code>index</code> or 0 if MTU is unknown. 172 * <code>index</code> or 0 if MTU is unknown.
139 */ 173 */
140 uint32_t (*GetMTU)(PP_Resource resource, uint32_t index); 174 uint32_t (*GetMTU)(PP_Resource resource, uint32_t index);
141 }; 175 };
142 176
143 typedef struct PPB_NetworkList_Private_0_2 PPB_NetworkList_Private; 177 typedef struct PPB_NetworkList_Private_0_3 PPB_NetworkList_Private;
144 /** 178 /**
145 * @} 179 * @}
146 */ 180 */
147 181
148 #endif /* PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_ */ 182 #endif /* PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_ */
149 183
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698