OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 */ | 4 */ |
5 | 5 |
6 /* From private/ppb_network_monitor_private.idl, | 6 /* From ppb_network_monitor.idl modified Thu Sep 19 16:42:34 2013. */ |
7 * modified Wed Sep 4 14:16:07 2013. | |
8 */ | |
9 | 7 |
10 #ifndef PPAPI_C_PRIVATE_PPB_NETWORK_MONITOR_PRIVATE_H_ | 8 #ifndef PPAPI_C_PPB_NETWORK_MONITOR_H_ |
11 #define PPAPI_C_PRIVATE_PPB_NETWORK_MONITOR_PRIVATE_H_ | 9 #define PPAPI_C_PPB_NETWORK_MONITOR_H_ |
12 | 10 |
13 #include "ppapi/c/pp_bool.h" | 11 #include "ppapi/c/pp_bool.h" |
14 #include "ppapi/c/pp_completion_callback.h" | 12 #include "ppapi/c/pp_completion_callback.h" |
15 #include "ppapi/c/pp_instance.h" | 13 #include "ppapi/c/pp_instance.h" |
16 #include "ppapi/c/pp_macros.h" | 14 #include "ppapi/c/pp_macros.h" |
17 #include "ppapi/c/pp_resource.h" | 15 #include "ppapi/c/pp_resource.h" |
18 #include "ppapi/c/pp_stdint.h" | 16 #include "ppapi/c/pp_stdint.h" |
19 | 17 |
20 #define PPB_NETWORKMONITOR_PRIVATE_INTERFACE_0_3 \ | 18 #define PPB_NETWORKMONITOR_INTERFACE_1_0 "PPB_NetworkMonitor;1.0" |
21 "PPB_NetworkMonitor_Private;0.3" | 19 #define PPB_NETWORKMONITOR_INTERFACE PPB_NETWORKMONITOR_INTERFACE_1_0 |
22 #define PPB_NETWORKMONITOR_PRIVATE_INTERFACE \ | |
23 PPB_NETWORKMONITOR_PRIVATE_INTERFACE_0_3 | |
24 | 20 |
25 /** | 21 /** |
26 * @file | 22 * @file |
27 * This file defines the <code>PPB_NetworkMonitor_Private</code> interface. | 23 * This file defines the <code>PPB_NetworkMonitor</code> interface. |
28 */ | 24 */ |
29 | 25 |
30 | 26 |
31 /** | 27 /** |
32 * @addtogroup Interfaces | 28 * @addtogroup Interfaces |
33 * @{ | 29 * @{ |
34 */ | 30 */ |
35 /** | 31 /** |
36 * The <code>PPB_NetworkMonitor_Private</code> provides access to | 32 * The <code>PPB_NetworkMonitor</code> allows to get network interfaces |
37 * notifications of network configuration changes. | 33 * configuration and monitor network configuration changes. |
| 34 * |
| 35 * Permissions: Apps permission <code>socket</code> with subrule |
| 36 * <code>network-state</code> is required for <code>UpdateNetworkList()</code>. |
| 37 * For more details about network communication permissions, please see: |
| 38 * http://developer.chrome.com/apps/app_network.html |
38 */ | 39 */ |
39 struct PPB_NetworkMonitor_Private_0_3 { | 40 struct PPB_NetworkMonitor_1_0 { |
40 /** | 41 /** |
41 * Creates a Network Monitor resource. | 42 * Creates a Network Monitor resource. |
42 * | 43 * |
43 * @param[in] instance A <code>PP_Instance</code> identifying one instance of | 44 * @param[in] instance A <code>PP_Instance</code> identifying one instance of |
44 * a module. | 45 * a module. |
45 * | 46 * |
46 * @return A <code>PP_Resource</code> corresponding to a network monitor or 0 | 47 * @return A <code>PP_Resource</code> corresponding to a network monitor or 0 |
47 * on failure. | 48 * on failure. |
48 */ | 49 */ |
49 PP_Resource (*Create)(PP_Instance instance); | 50 PP_Resource (*Create)(PP_Instance instance); |
(...skipping 16 matching lines...) Expand all Loading... |
66 */ | 67 */ |
67 int32_t (*UpdateNetworkList)(PP_Resource network_monitor, | 68 int32_t (*UpdateNetworkList)(PP_Resource network_monitor, |
68 PP_Resource* network_list, | 69 PP_Resource* network_list, |
69 struct PP_CompletionCallback callback); | 70 struct PP_CompletionCallback callback); |
70 /** | 71 /** |
71 * Determines if the specified <code>resource</code> is a | 72 * Determines if the specified <code>resource</code> is a |
72 * <code>NetworkMonitor</code> object. | 73 * <code>NetworkMonitor</code> object. |
73 * | 74 * |
74 * @param[in] resource A <code>PP_Resource</code> resource. | 75 * @param[in] resource A <code>PP_Resource</code> resource. |
75 * | 76 * |
76 * @return Returns <code>PP_TRUE</code> if <code>resource</code> is | 77 * @return Returns <code>PP_TRUE</code> if <code>resource</code> is a |
77 * a <code>PPB_NetworkMonitor_Private</code>, <code>PP_FALSE</code> | 78 * <code>PPB_NetworkMonitor</code>, <code>PP_FALSE</code> otherwise. |
78 * otherwise. | |
79 */ | 79 */ |
80 PP_Bool (*IsNetworkMonitor)(PP_Resource resource); | 80 PP_Bool (*IsNetworkMonitor)(PP_Resource resource); |
81 }; | 81 }; |
82 | 82 |
83 typedef struct PPB_NetworkMonitor_Private_0_3 PPB_NetworkMonitor_Private; | 83 typedef struct PPB_NetworkMonitor_1_0 PPB_NetworkMonitor; |
84 /** | 84 /** |
85 * @} | 85 * @} |
86 */ | 86 */ |
87 | 87 |
88 #endif /* PPAPI_C_PRIVATE_PPB_NETWORK_MONITOR_PRIVATE_H_ */ | 88 #endif /* PPAPI_C_PPB_NETWORK_MONITOR_H_ */ |
89 | 89 |
OLD | NEW |