7 #include "ppapi/c/pp_errors.h"
18 template <>
const char* interface_name<PPB_NetworkList_1_0>() {
19 return PPB_NETWORKLIST_INTERFACE_1_0;
33 return has_interface<PPB_NetworkList_1_0>();
37 if (!has_interface<PPB_NetworkList_1_0>())
43 if (!has_interface<PPB_NetworkList_1_0>())
46 get_interface<PPB_NetworkList_1_0>()->
GetName(
52 if (!has_interface<PPB_NetworkList_1_0>())
53 return PP_NETWORKLIST_TYPE_ETHERNET;
54 return get_interface<PPB_NetworkList_1_0>()->
GetType(
59 if (!has_interface<PPB_NetworkList_1_0>())
60 return PP_NETWORKLIST_STATE_DOWN;
61 return get_interface<PPB_NetworkList_1_0>()->
GetState(
67 std::vector<NetAddress>* addresses)
const {
68 if (!has_interface<PPB_NetworkList_1_0>())
69 return PP_ERROR_NOINTERFACE;
71 return PP_ERROR_BADARGUMENT;
79 if (!has_interface<PPB_NetworkList_1_0>())
88 if (!has_interface<PPB_NetworkList_1_0>())
90 return get_interface<PPB_NetworkList_1_0>()->
GetMTU(
PP_NetworkList_Type GetType(uint32_t index) const
const PP_ArrayOutput & pp_array_output()
int32_t GetIpAddresses(uint32_t index, std::vector< NetAddress > *addresses) const
std::string AsString() const
uint32_t GetMTU(uint32_t index) const
std::string GetDisplayName(uint32_t index) const
uint32_t GetCount() const
static bool IsAvailable()
Returns true if the required interface is available.
std::string GetName(uint32_t index) const
PP_Resource pp_resource() const
A generic type used for passing data types between the module and the page.
PP_NetworkList_State GetState(uint32_t index) const
A reference counted module resource.