| OLD | NEW |
| (Empty) |
| 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 */ | |
| 5 | |
| 6 /** | |
| 7 * This file defines the <code>PPB_NetworkMonitor_Private</code> interface. | |
| 8 */ | |
| 9 | |
| 10 [generate_thunk] | |
| 11 | |
| 12 label Chrome { | |
| 13 M31 = 0.3 | |
| 14 }; | |
| 15 | |
| 16 /** | |
| 17 * The <code>PPB_NetworkMonitor_Private</code> provides access to | |
| 18 * notifications of network configuration changes. | |
| 19 */ | |
| 20 interface PPB_NetworkMonitor_Private { | |
| 21 /** | |
| 22 * Creates a Network Monitor resource. | |
| 23 * | |
| 24 * @param[in] instance A <code>PP_Instance</code> identifying one instance of | |
| 25 * a module. | |
| 26 * | |
| 27 * @return A <code>PP_Resource</code> corresponding to a network monitor or 0 | |
| 28 * on failure. | |
| 29 */ | |
| 30 PP_Resource Create([in] PP_Instance instance); | |
| 31 | |
| 32 | |
| 33 /** | |
| 34 * Gets current network configuration. When called for the first time, | |
| 35 * completes as soon as the current network configuration is received from | |
| 36 * the browser. Each consequent call will wait for network list changes, | |
| 37 * returning a new <code>PPB_NetworkList</code> resource every time. | |
| 38 * | |
| 39 * @param[in] network_monitor A <code>PP_Resource</code> corresponding to a | |
| 40 * network monitor. | |
| 41 * @param[out] network_list The <code>PPB_NetworkList<code> resource with the | |
| 42 * current state of network interfaces. | |
| 43 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon | |
| 44 * completion. | |
| 45 * | |
| 46 * @return An int32_t containing an error code from <code>pp_errors.h</code>. | |
| 47 * <code>PP_ERROR_NOACCESS</code> will be returned if the caller doesn't have | |
| 48 * required permissions. | |
| 49 */ | |
| 50 int32_t UpdateNetworkList([in] PP_Resource network_monitor, | |
| 51 [out] PP_Resource network_list, | |
| 52 [in] PP_CompletionCallback callback); | |
| 53 | |
| 54 /** | |
| 55 * Determines if the specified <code>resource</code> is a | |
| 56 * <code>NetworkMonitor</code> object. | |
| 57 * | |
| 58 * @param[in] resource A <code>PP_Resource</code> resource. | |
| 59 * | |
| 60 * @return Returns <code>PP_TRUE</code> if <code>resource</code> is | |
| 61 * a <code>PPB_NetworkMonitor_Private</code>, <code>PP_FALSE</code> | |
| 62 * otherwise. | |
| 63 */ | |
| 64 PP_Bool IsNetworkMonitor([in] PP_Resource resource); | |
| 65 }; | |
| OLD | NEW |