7 #include "ppapi/c/pp_bool.h"
8 #include "ppapi/c/pp_errors.h"
19 template <>
const char* interface_name<PPB_HostResolver_Private_0_1>() {
20 return PPB_HOSTRESOLVER_PRIVATE_INTERFACE_0_1;
26 if (has_interface<PPB_HostResolver_Private_0_1>()) {
28 get_interface<PPB_HostResolver_Private_0_1>()->Create(
35 return has_interface<PPB_HostResolver_Private_0_1>();
40 const PP_HostResolver_Private_Hint& hint,
42 if (!has_interface<PPB_HostResolver_Private_0_1>())
43 return callback.
MayForce(PP_ERROR_NOINTERFACE);
44 return get_interface<PPB_HostResolver_Private_0_1>()->
Resolve(
53 if (!has_interface<PPB_HostResolver_Private_0_1>())
63 if (!has_interface<PPB_HostResolver_Private_0_1>())
69 PP_NetAddress_Private* address) {
70 if (!has_interface<PPB_HostResolver_Private_0_1>())
72 PP_Bool result = get_interface<PPB_HostResolver_Private_0_1>()->
GetNetAddress(
74 return PP_ToBool(result);
void PassRefFromConstructor(PP_Resource resource)
Special value passed to constructor to make NULL.
int32_t MayForce(int32_t result) const
const PP_CompletionCallback & pp_completion_callback() const
HostResolverPrivate(const InstanceHandle &instance)
bool GetNetAddress(uint32_t index, PP_NetAddress_Private *address)
int32_t Resolve(const std::string &host, uint16_t port, const PP_HostResolver_Private_Hint &hint, const CompletionCallback &callback)
PP_Resource pp_resource() const
A generic type used for passing data types between the module and the page.
PP_Instance pp_instance() const
static bool IsAvailable()