| Index: ppapi/api/private/ppb_host_resolver_private.idl
|
| diff --git a/ppapi/api/private/ppb_host_resolver_private.idl b/ppapi/api/private/ppb_host_resolver_private.idl
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..82d6303a04a725b8c3351b753458c833ad37087b
|
| --- /dev/null
|
| +++ b/ppapi/api/private/ppb_host_resolver_private.idl
|
| @@ -0,0 +1,76 @@
|
| +/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| + * Use of this source code is governed by a BSD-style license that can be
|
| + * found in the LICENSE file.
|
| + */
|
| +
|
| +/**
|
| + * This file defines the <code>PPB_HostResolver_Private</code> interface.
|
| + */
|
| +
|
| +label Chrome {
|
| + M19 = 0.1
|
| +};
|
| +
|
| +/**
|
| + * The <code>PP_HostResolver_Flags</code> is an enumeration of the
|
| + * different types of flags, that can be OR-ed and passed to host
|
| + * resolver.
|
| + */
|
| +[assert_size(4)]
|
| +enum PP_HostResolver_Private_Flags {
|
| + /**
|
| + * AI_CANONNAME
|
| + */
|
| + PP_HOST_RESOLVER_FLAGS_CANONNAME = 1 << 0,
|
| + /**
|
| + * Hint to the resolver that only loopback addresses are configured.
|
| + */
|
| + PP_HOST_RESOLVER_FLAGS_LOOPBACK_ONLY = 1 << 1
|
| +};
|
| +
|
| +[assert_size(8)]
|
| +struct PP_HostResolver_Private_Hint {
|
| + PP_NetAddressFamily_Private family;
|
| + PP_HostResolver_Private_Flags flags;
|
| +};
|
| +
|
| +interface PPB_HostResolver_Private {
|
| + /**
|
| + * Allocates a Host Resolver resource.
|
| + */
|
| + PP_Resource Create([in] PP_Instance instance);
|
| +
|
| + /**
|
| + * Determines if a given resource is a Host Resolver.
|
| + */
|
| + PP_Bool IsHostResolver([in] PP_Resource resource);
|
| +
|
| + /**
|
| + * Creates a new request to Host Resolver. |callback| is invoked
|
| + * when request is processed and a list of network addresses is
|
| + * obtained. These addresses can be be used in Connect, Bind or
|
| + * Listen calls to connect to a given |host| and |port|.
|
| + */
|
| + int32_t Resolve([in] PP_Resource host_resolver,
|
| + [in] str_t host,
|
| + [in] uint16_t port,
|
| + [in] PP_HostResolver_Private_Hint hint,
|
| + [in] PP_CompletionCallback callback);
|
| +
|
| + /**
|
| + * Returns number of network addresses obtained after Resolve call.
|
| + */
|
| + uint32_t GetSize([in] PP_Resource host_resolver);
|
| +
|
| + /**
|
| + * Stores in the |canonname| and |addr| |index|-th canonical name of
|
| + * host and network address. |canonname| or |addr| can be NULL and
|
| + * in this case corresponding value not stored. Returns PP_TRUE if
|
| + * success or PP_FALSE if given resource is not a Host Resolver or
|
| + * |index| exceeds number of available addresses.
|
| + */
|
| + PP_Bool GetItem([in] PP_Resource host_resolver,
|
| + [in] uint32_t index,
|
| + [out] PP_Var canonname,
|
| + [out] PP_NetAddress_Private addr);
|
| +};
|
|
|