OLD | NEW |
(Empty) | |
| 1 /* Copyright (c) 2013 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 /* From ppb_network_proxy.idl modified Fri Jun 21 09:37:20 2013. */ |
| 7 |
| 8 #ifndef PPAPI_C_PPB_NETWORK_PROXY_H_ |
| 9 #define PPAPI_C_PPB_NETWORK_PROXY_H_ |
| 10 |
| 11 #include "ppapi/c/pp_bool.h" |
| 12 #include "ppapi/c/pp_completion_callback.h" |
| 13 #include "ppapi/c/pp_instance.h" |
| 14 #include "ppapi/c/pp_macros.h" |
| 15 #include "ppapi/c/pp_stdint.h" |
| 16 #include "ppapi/c/pp_var.h" |
| 17 |
| 18 #define PPB_NETWORKPROXY_INTERFACE_1_0 "PPB_NetworkProxy;1.0" |
| 19 #define PPB_NETWORKPROXY_INTERFACE PPB_NETWORKPROXY_INTERFACE_1_0 |
| 20 |
| 21 /** |
| 22 * @file |
| 23 * This file defines the <code>PPB_NetworkProxy</code> interface. |
| 24 */ |
| 25 |
| 26 |
| 27 /** |
| 28 * @addtogroup Interfaces |
| 29 * @{ |
| 30 */ |
| 31 /** |
| 32 * This interface provides a way to determine the appropriate proxy settings |
| 33 * for a given URL. |
| 34 * |
| 35 * Permissions: Apps permission <code>socket</code> with subrule |
| 36 * <code>resolve-proxy</code> is required for using this API. |
| 37 * For more details about network communication permissions, please see: |
| 38 * http://developer.chrome.com/apps/app_network.html |
| 39 */ |
| 40 struct PPB_NetworkProxy_1_0 { |
| 41 /** |
| 42 * Retrieves the proxy that will be used for the given URL. The result will |
| 43 * be a string in PAC format. For more details about PAC format, please see |
| 44 * http://en.wikipedia.org/wiki/Proxy_auto-config |
| 45 * |
| 46 * @param[in] instance A <code>PP_Instance</code> identifying one instance |
| 47 * of a module. |
| 48 * |
| 49 * @param[in] url A string <code>PP_Var</code> containing a URL. |
| 50 * |
| 51 * @param[out] proxy_string A <code>PP_Var</code> that GetProxyForURL will |
| 52 * set upon successful completion. If the call fails, <code>proxy_string |
| 53 * </code> will be unchanged. Otherwise, it will be set to a string <code> |
| 54 * PP_Var</code> containing the appropriate PAC string for <code>url</code>. |
| 55 * If set, <code>proxy_string</code> will have a reference count of 1 which |
| 56 * the plugin must manage. |
| 57 * |
| 58 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| 59 * completion. |
| 60 * |
| 61 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 62 */ |
| 63 int32_t (*GetProxyForURL)(PP_Instance instance, |
| 64 struct PP_Var url, |
| 65 struct PP_Var* proxy_string, |
| 66 struct PP_CompletionCallback callback); |
| 67 }; |
| 68 |
| 69 typedef struct PPB_NetworkProxy_1_0 PPB_NetworkProxy; |
| 70 /** |
| 71 * @} |
| 72 */ |
| 73 |
| 74 #endif /* PPAPI_C_PPB_NETWORK_PROXY_H_ */ |
| 75 |
OLD | NEW |