summaryrefslogtreecommitdiffstats
path: root/ppapi/c
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-05 01:06:46 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-05 01:06:46 +0000
commite6a1b4ee5411faaf44a95204299e9738bffc8a80 (patch)
tree068d777fdaadeb9f1574b459c4b64fdf4ee51816 /ppapi/c
parent47ebce481df17bd82c0966403fc26a424beea077 (diff)
downloadchromium_src-e6a1b4ee5411faaf44a95204299e9738bffc8a80.zip
chromium_src-e6a1b4ee5411faaf44a95204299e9738bffc8a80.tar.gz
chromium_src-e6a1b4ee5411faaf44a95204299e9738bffc8a80.tar.bz2
Use PP_ArrayOutput and PPB_NetAddress in PPB_NetworkList_Private..
PPB_NetworkList_Private was implemented before PP_ArrayOutput and PPB_NetAddress was added. Refactor GetIPAddress() to use these new types. Also removed in-process support because PPB_NetAddress doesn't support in-process mode. BUG=281781 TBR=piman@chromium.org (trivial changes in content_renderer.gypi) Review URL: https://chromiumcodereview.appspot.com/23806003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221324 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r--ppapi/c/private/ppb_network_list_private.h69
1 files changed, 53 insertions, 16 deletions
diff --git a/ppapi/c/private/ppb_network_list_private.h b/ppapi/c/private/ppb_network_list_private.h
index 2cba362..296d0df 100644
--- a/ppapi/c/private/ppb_network_list_private.h
+++ b/ppapi/c/private/ppb_network_list_private.h
@@ -4,21 +4,21 @@
*/
/* From private/ppb_network_list_private.idl,
- * modified Thu Mar 1 16:24:33 2012.
+ * modified Wed Sep 4 11:42:02 2013.
*/
#ifndef PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_
#define PPAPI_C_PRIVATE_PPB_NETWORK_LIST_PRIVATE_H_
+#include "ppapi/c/pp_array_output.h"
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_var.h"
-#include "ppapi/c/private/ppb_net_address_private.h"
-#define PPB_NETWORKLIST_PRIVATE_INTERFACE_0_2 "PPB_NetworkList_Private;0.2"
-#define PPB_NETWORKLIST_PRIVATE_INTERFACE PPB_NETWORKLIST_PRIVATE_INTERFACE_0_2
+#define PPB_NETWORKLIST_PRIVATE_INTERFACE_0_3 "PPB_NetworkList_Private;0.3"
+#define PPB_NETWORKLIST_PRIVATE_INTERFACE PPB_NETWORKLIST_PRIVATE_INTERFACE_0_3
/**
* @file
@@ -82,7 +82,7 @@ PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_NetworkListState_Private, 4);
* received using the <code>PPB_NetworkMonitor_Private</code>
* interface.
*/
-struct PPB_NetworkList_Private_0_2 {
+struct PPB_NetworkList_Private_0_3 {
/**
* Determines if the specified <code>resource</code> is a
* <code>NetworkList</code> object.
@@ -95,52 +95,89 @@ struct PPB_NetworkList_Private_0_2 {
*/
PP_Bool (*IsNetworkList)(PP_Resource resource);
/**
+ * Gets number of interfaces in the list.
+ *
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a
+ * network list.
+ *
* @return Returns number of available network interfaces or 0 if
* the list has never been updated.
*/
uint32_t (*GetCount)(PP_Resource resource);
/**
+ * Gets name of a network interface.
+ *
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a
+ * network list.
+ * @param[in] index Index of the network interface.
+ *
* @return Returns name for the network interface with the specified
* <code>index</code>.
*/
struct PP_Var (*GetName)(PP_Resource resource, uint32_t index);
/**
+ * Gets type of a network interface.
+ *
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a
+ * network list.
+ * @param[in] index Index of the network interface.
+ *
* @return Returns type of the network interface with the specified
* <code>index</code>.
*/
PP_NetworkListType_Private (*GetType)(PP_Resource resource, uint32_t index);
/**
+ * Gets state of a network interface.
+ *
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a
+ * network list.
+ * @param[in] index Index of the network interface.
+ *
* @return Returns current state of the network interface with the
* specified <code>index</code>.
*/
PP_NetworkListState_Private (*GetState)(PP_Resource resource, uint32_t index);
/**
- * Gets list of IP addresses for the network interface with the
- * specified <code>index</code> and stores them in
- * <code>addresses</code>. If the caller didn't allocate sufficient
- * space to store all addresses, then only the first
- * <code>count</code> addresses are filled in.
- *
- * @return Returns total number of IP addresses assigned to the
- * network interface or a negative error code.
+ * Gets list of IP addresses for a network interface.
+ *
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a
+ * network list.
+ * @param[in] index Index of the network interface.
+ * @param[in] output An output array which will receive
+ * <code>PPB_NetAddress</code> resources on success. Please note that the
+ * ref count of those resources has already been increased by 1 for the
+ * caller.
+ *
+ * @return An error code from <code>pp_errors.h</code>.
*/
int32_t (*GetIpAddresses)(PP_Resource resource,
uint32_t index,
- struct PP_NetAddress_Private addresses[],
- uint32_t count);
+ struct PP_ArrayOutput output);
/**
+ * Gets display name of a network interface.
+ *
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a
+ * network list.
+ * @param[in] index Index of the network interface.
+ *
* @return Returns display name for the network interface with the
* specified <code>index</code>.
*/
struct PP_Var (*GetDisplayName)(PP_Resource resource, uint32_t index);
/**
+ * Gets MTU (Maximum Transmission Unit) of a network interface.
+ *
+ * @param[in] resource A <code>PP_Resource</code> corresponding to a
+ * network list.
+ * @param[in] index Index of the network interface.
+ *
* @return Returns MTU for the network interface with the specified
* <code>index</code> or 0 if MTU is unknown.
*/
uint32_t (*GetMTU)(PP_Resource resource, uint32_t index);
};
-typedef struct PPB_NetworkList_Private_0_2 PPB_NetworkList_Private;
+typedef struct PPB_NetworkList_Private_0_3 PPB_NetworkList_Private;
/**
* @}
*/