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

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 Wed Sep 4 11:42:02 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 *
100 * @param[in] resource A <code>PP_Resource</code> corresponding to a
101 * network list.
102 *
98 * @return Returns number of available network interfaces or 0 if 103 * @return Returns number of available network interfaces or 0 if
99 * the list has never been updated. 104 * the list has never been updated.
100 */ 105 */
101 uint32_t (*GetCount)(PP_Resource resource); 106 uint32_t (*GetCount)(PP_Resource resource);
102 /** 107 /**
108 * Gets name of a network interface.
109 *
110 * @param[in] resource A <code>PP_Resource</code> corresponding to a
111 * network list.
112 * @param[in] index Index of the network interface.
113 *
103 * @return Returns name for the network interface with the specified 114 * @return Returns name for the network interface with the specified
104 * <code>index</code>. 115 * <code>index</code>.
105 */ 116 */
106 struct PP_Var (*GetName)(PP_Resource resource, uint32_t index); 117 struct PP_Var (*GetName)(PP_Resource resource, uint32_t index);
107 /** 118 /**
119 * Gets type of a network interface.
120 *
121 * @param[in] resource A <code>PP_Resource</code> corresponding to a
122 * network list.
123 * @param[in] index Index of the network interface.
124 *
108 * @return Returns type of the network interface with the specified 125 * @return Returns type of the network interface with the specified
109 * <code>index</code>. 126 * <code>index</code>.
110 */ 127 */
111 PP_NetworkListType_Private (*GetType)(PP_Resource resource, uint32_t index); 128 PP_NetworkListType_Private (*GetType)(PP_Resource resource, uint32_t index);
112 /** 129 /**
130 * Gets state of a network interface.
131 *
132 * @param[in] resource A <code>PP_Resource</code> corresponding to a
133 * network list.
134 * @param[in] index Index of the network interface.
135 *
113 * @return Returns current state of the network interface with the 136 * @return Returns current state of the network interface with the
114 * specified <code>index</code>. 137 * specified <code>index</code>.
115 */ 138 */
116 PP_NetworkListState_Private (*GetState)(PP_Resource resource, uint32_t index); 139 PP_NetworkListState_Private (*GetState)(PP_Resource resource, uint32_t index);
117 /** 140 /**
118 * Gets list of IP addresses for the network interface with the 141 * 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 * 142 *
124 * @return Returns total number of IP addresses assigned to the 143 * @param[in] resource A <code>PP_Resource</code> corresponding to a
125 * network interface or a negative error code. 144 * network list.
145 * @param[in] index Index of the network interface.
146 * @param[in] output An output array which will receive
147 * <code>PPB_NetAddress</code> resources on success. Please note that the
148 * ref count of those resources has already been increased by 1 for the
149 * caller.
150 *
151 * @return An error code from <code>pp_errors.h</code>.
126 */ 152 */
127 int32_t (*GetIpAddresses)(PP_Resource resource, 153 int32_t (*GetIpAddresses)(PP_Resource resource,
128 uint32_t index, 154 uint32_t index,
129 struct PP_NetAddress_Private addresses[], 155 struct PP_ArrayOutput output);
130 uint32_t count);
131 /** 156 /**
157 * Gets display name of a network interface.
158 *
159 * @param[in] resource A <code>PP_Resource</code> corresponding to a
160 * network list.
161 * @param[in] index Index of the network interface.
162 *
132 * @return Returns display name for the network interface with the 163 * @return Returns display name for the network interface with the
133 * specified <code>index</code>. 164 * specified <code>index</code>.
134 */ 165 */
135 struct PP_Var (*GetDisplayName)(PP_Resource resource, uint32_t index); 166 struct PP_Var (*GetDisplayName)(PP_Resource resource, uint32_t index);
136 /** 167 /**
168 * Gets MTU (Maximum Transmission Unit) of a network interface.
169 *
170 * @param[in] resource A <code>PP_Resource</code> corresponding to a
171 * network list.
172 * @param[in] index Index of the network interface.
173 *
137 * @return Returns MTU for the network interface with the specified 174 * @return Returns MTU for the network interface with the specified
138 * <code>index</code> or 0 if MTU is unknown. 175 * <code>index</code> or 0 if MTU is unknown.
139 */ 176 */
140 uint32_t (*GetMTU)(PP_Resource resource, uint32_t index); 177 uint32_t (*GetMTU)(PP_Resource resource, uint32_t index);
141 }; 178 };
142 179
143 typedef struct PPB_NetworkList_Private_0_2 PPB_NetworkList_Private; 180 typedef struct PPB_NetworkList_Private_0_3 PPB_NetworkList_Private;
144 /** 181 /**
145 * @} 182 * @}
146 */ 183 */
147 184
148 #endif /* PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_ */ 185 #endif /* PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_ */
149 186
OLDNEW
« no previous file with comments | « ppapi/api/private/ppb_network_list_private.idl ('k') | ppapi/cpp/private/network_list_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698