1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/crashreporter/google-breakpad/src/third_party/curl/easy.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,103 @@ 1.4 +#ifndef __CURL_EASY_H 1.5 +#define __CURL_EASY_H 1.6 +/*************************************************************************** 1.7 + * _ _ ____ _ 1.8 + * Project ___| | | | _ \| | 1.9 + * / __| | | | |_) | | 1.10 + * | (__| |_| | _ <| |___ 1.11 + * \___|\___/|_| \_\_____| 1.12 + * 1.13 + * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al. 1.14 + * 1.15 + * This software is licensed as described in the file COPYING, which 1.16 + * you should have received as part of this distribution. The terms 1.17 + * are also available at http://curl.haxx.se/docs/copyright.html. 1.18 + * 1.19 + * You may opt to use, copy, modify, merge, publish, distribute and/or sell 1.20 + * copies of the Software, and permit persons to whom the Software is 1.21 + * furnished to do so, under the terms of the COPYING file. 1.22 + * 1.23 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 1.24 + * KIND, either express or implied. 1.25 + * 1.26 + * $Id: easy.h,v 1.14 2008-05-12 21:43:28 bagder Exp $ 1.27 + ***************************************************************************/ 1.28 +#ifdef __cplusplus 1.29 +extern "C" { 1.30 +#endif 1.31 + 1.32 +CURL_EXTERN CURL *curl_easy_init(void); 1.33 +CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); 1.34 +CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); 1.35 +CURL_EXTERN void curl_easy_cleanup(CURL *curl); 1.36 + 1.37 +/* 1.38 + * NAME curl_easy_getinfo() 1.39 + * 1.40 + * DESCRIPTION 1.41 + * 1.42 + * Request internal information from the curl session with this function. The 1.43 + * third argument MUST be a pointer to a long, a pointer to a char * or a 1.44 + * pointer to a double (as the documentation describes elsewhere). The data 1.45 + * pointed to will be filled in accordingly and can be relied upon only if the 1.46 + * function returns CURLE_OK. This function is intended to get used *AFTER* a 1.47 + * performed transfer, all results from this function are undefined until the 1.48 + * transfer is completed. 1.49 + */ 1.50 +CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); 1.51 + 1.52 + 1.53 +/* 1.54 + * NAME curl_easy_duphandle() 1.55 + * 1.56 + * DESCRIPTION 1.57 + * 1.58 + * Creates a new curl session handle with the same options set for the handle 1.59 + * passed in. Duplicating a handle could only be a matter of cloning data and 1.60 + * options, internal state info and things like persistant connections cannot 1.61 + * be transfered. It is useful in multithreaded applications when you can run 1.62 + * curl_easy_duphandle() for each new thread to avoid a series of identical 1.63 + * curl_easy_setopt() invokes in every thread. 1.64 + */ 1.65 +CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl); 1.66 + 1.67 +/* 1.68 + * NAME curl_easy_reset() 1.69 + * 1.70 + * DESCRIPTION 1.71 + * 1.72 + * Re-initializes a CURL handle to the default values. This puts back the 1.73 + * handle to the same state as it was in when it was just created. 1.74 + * 1.75 + * It does keep: live connections, the Session ID cache, the DNS cache and the 1.76 + * cookies. 1.77 + */ 1.78 +CURL_EXTERN void curl_easy_reset(CURL *curl); 1.79 + 1.80 +/* 1.81 + * NAME curl_easy_recv() 1.82 + * 1.83 + * DESCRIPTION 1.84 + * 1.85 + * Receives data from the connected socket. Use after successful 1.86 + * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 1.87 + */ 1.88 +CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, 1.89 + size_t *n); 1.90 + 1.91 +/* 1.92 + * NAME curl_easy_send() 1.93 + * 1.94 + * DESCRIPTION 1.95 + * 1.96 + * Sends data over the connected socket. Use after successful 1.97 + * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 1.98 + */ 1.99 +CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, 1.100 + size_t buflen, size_t *n); 1.101 + 1.102 +#ifdef __cplusplus 1.103 +} 1.104 +#endif 1.105 + 1.106 +#endif