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 Thu Jun 20 23:06:50 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 struct PPB_NetworkProxy_1_0 { |
| 36 /** |
| 37 * Retrieves the proxy that will be used for the given URL. The result will |
| 38 * be a string in PAC format. For more details about PAC format, please see |
| 39 * http://en.wikipedia.org/wiki/Proxy_auto-config |
| 40 * |
| 41 * @param[in] instance A <code>PP_Instance</code> identifying one instance |
| 42 * of a module. |
| 43 * |
| 44 * @param[in] url A string <code>PP_Var</code> containing a URL. |
| 45 * |
| 46 * @param[out] proxy_string A <code>PP_Var</code> that GetProxyForURL will |
| 47 * set upon successful completion. If the call fails, <code>proxy_string |
| 48 * </code> will be unchanged. Otherwise, it will be set to a string <code> |
| 49 * PP_Var</code> containing the appropriate PAC string for <code>url</code>. |
| 50 * If set, <code>proxy_string</code> will have a reference count of 1 which |
| 51 * the plugin must manage. |
| 52 * |
| 53 * @param[in] callback A <code>PP_CompletionCallback</code> to be called upon |
| 54 * completion. |
| 55 * |
| 56 * @return An int32_t containing an error code from <code>pp_errors.h</code>. |
| 57 */ |
| 58 int32_t (*GetProxyForURL)(PP_Instance instance, |
| 59 struct PP_Var url, |
| 60 struct PP_Var* proxy_string, |
| 61 struct PP_CompletionCallback callback); |
| 62 }; |
| 63 |
| 64 typedef struct PPB_NetworkProxy_1_0 PPB_NetworkProxy; |
| 65 /** |
| 66 * @} |
| 67 */ |
| 68 |
| 69 #endif /* PPAPI_C_PPB_NETWORK_PROXY_H_ */ |
| 70 |
OLD | NEW |