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
3 // found in the LICENSE file.
5 #ifndef PPAPI_CPP_PRIVATE_HOST_RESOLVER_PRIVATE_H_
6 #define PPAPI_CPP_PRIVATE_HOST_RESOLVER_PRIVATE_H_
10 #include "ppapi/c/pp_stdint.h"
11 #include "ppapi/c/private/ppb_host_resolver_private.h"
12 #include "ppapi/cpp/resource.h"
13 #include "ppapi/cpp/var.h"
15 struct PP_NetAddress_Private
;
19 class CompletionCallback
;
22 class HostResolverPrivate
: public Resource
{
24 explicit HostResolverPrivate(const InstanceHandle
& instance
);
26 // Returns true if the required interface is available.
27 static bool IsAvailable();
29 int32_t Resolve(const std::string
& host
,
31 const PP_HostResolver_Private_Hint
& hint
,
32 const CompletionCallback
& callback
);
33 Var
GetCanonicalName();
35 bool GetNetAddress(uint32_t index
, PP_NetAddress_Private
* address
);
40 #endif // PPAPI_CPP_PRIVATE_HOST_RESOLVER_PRIVATE_H_