Vectorize website settings icons in omnibox
[chromium-blink-merge.git] / ppapi / api / private / ppb_host_resolver_private.idl
blobf7b0e4a5c29766255a7f9c35f5a407adeb9ff824
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.
4 */
6 /**
7 * This file defines the <code>PPB_HostResolver_Private</code> interface.
8 */
10 label Chrome {
11 M19 = 0.1
14 /**
15 * The <code>PP_HostResolver_Flags</code> is an enumeration of the
16 * different types of flags, that can be OR-ed and passed to host
17 * resolver.
19 [assert_size(4)]
20 enum PP_HostResolver_Private_Flags {
21 /**
22 * AI_CANONNAME
24 PP_HOST_RESOLVER_PRIVATE_FLAGS_CANONNAME = 1 << 0,
25 /**
26 * Hint to the resolver that only loopback addresses are configured.
28 PP_HOST_RESOLVER_PRIVATE_FLAGS_LOOPBACK_ONLY = 1 << 1
31 [assert_size(8)]
32 struct PP_HostResolver_Private_Hint {
33 PP_NetAddressFamily_Private family;
34 int32_t flags;
37 interface PPB_HostResolver_Private {
38 /**
39 * Allocates a Host Resolver resource.
41 PP_Resource Create([in] PP_Instance instance);
43 /**
44 * Determines if a given resource is a Host Resolver.
46 PP_Bool IsHostResolver([in] PP_Resource resource);
48 /**
49 * Creates a new request to Host Resolver. |callback| is invoked
50 * when request is processed and a list of network addresses is
51 * obtained. These addresses can be be used in Connect, Bind or
52 * Listen calls to connect to a given |host| and |port|.
54 int32_t Resolve([in] PP_Resource host_resolver,
55 [in] str_t host,
56 [in] uint16_t port,
57 [in] PP_HostResolver_Private_Hint hint,
58 [in] PP_CompletionCallback callback);
60 /**
61 * Returns canonical name of host.
63 PP_Var GetCanonicalName([in] PP_Resource host_resolver);
65 /**
66 * Returns number of network addresses obtained after Resolve call.
68 uint32_t GetSize([in] PP_Resource host_resolver);
70 /**
71 * Stores in the |addr| |index|-th network address. |addr| can't be
72 * NULL. Returns PP_TRUE if success or PP_FALSE if the given
73 * resource is not a Host Resolver or |index| exceeds number of
74 * available addresses.
76 PP_Bool GetNetAddress([in] PP_Resource host_resolver,
77 [in] uint32_t index,
78 [out] PP_NetAddress_Private addr);