build-mac/curl/easy.h
author Krista Bennett <krista@pep-project.org>
Mon, 16 Apr 2018 12:45:27 +0200
branchENGINE-420
changeset 2605 e58854fccf2c
parent 531 a7cc26cc39f2
permissions -rw-r--r--
Closing branch
Edouard@340
     1
#ifndef __CURL_EASY_H
Edouard@340
     2
#define __CURL_EASY_H
Edouard@340
     3
/***************************************************************************
Edouard@340
     4
 *                                  _   _ ____  _
Edouard@340
     5
 *  Project                     ___| | | |  _ \| |
Edouard@340
     6
 *                             / __| | | | |_) | |
Edouard@340
     7
 *                            | (__| |_| |  _ <| |___
Edouard@340
     8
 *                             \___|\___/|_| \_\_____|
Edouard@340
     9
 *
Edouard@340
    10
 * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
Edouard@340
    11
 *
Edouard@340
    12
 * This software is licensed as described in the file COPYING, which
Edouard@340
    13
 * you should have received as part of this distribution. The terms
dirk@531
    14
 * are also available at https://curl.haxx.se/docs/copyright.html.
Edouard@340
    15
 *
Edouard@340
    16
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
Edouard@340
    17
 * copies of the Software, and permit persons to whom the Software is
Edouard@340
    18
 * furnished to do so, under the terms of the COPYING file.
Edouard@340
    19
 *
Edouard@340
    20
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
Edouard@340
    21
 * KIND, either express or implied.
Edouard@340
    22
 *
Edouard@340
    23
 ***************************************************************************/
Edouard@340
    24
#ifdef  __cplusplus
Edouard@340
    25
extern "C" {
Edouard@340
    26
#endif
Edouard@340
    27
Edouard@340
    28
CURL_EXTERN CURL *curl_easy_init(void);
Edouard@340
    29
CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...);
Edouard@340
    30
CURL_EXTERN CURLcode curl_easy_perform(CURL *curl);
Edouard@340
    31
CURL_EXTERN void curl_easy_cleanup(CURL *curl);
Edouard@340
    32
Edouard@340
    33
/*
Edouard@340
    34
 * NAME curl_easy_getinfo()
Edouard@340
    35
 *
Edouard@340
    36
 * DESCRIPTION
Edouard@340
    37
 *
Edouard@340
    38
 * Request internal information from the curl session with this function.  The
Edouard@340
    39
 * third argument MUST be a pointer to a long, a pointer to a char * or a
Edouard@340
    40
 * pointer to a double (as the documentation describes elsewhere).  The data
Edouard@340
    41
 * pointed to will be filled in accordingly and can be relied upon only if the
Edouard@340
    42
 * function returns CURLE_OK.  This function is intended to get used *AFTER* a
Edouard@340
    43
 * performed transfer, all results from this function are undefined until the
Edouard@340
    44
 * transfer is completed.
Edouard@340
    45
 */
Edouard@340
    46
CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);
Edouard@340
    47
Edouard@340
    48
Edouard@340
    49
/*
Edouard@340
    50
 * NAME curl_easy_duphandle()
Edouard@340
    51
 *
Edouard@340
    52
 * DESCRIPTION
Edouard@340
    53
 *
Edouard@340
    54
 * Creates a new curl session handle with the same options set for the handle
Edouard@340
    55
 * passed in. Duplicating a handle could only be a matter of cloning data and
Edouard@340
    56
 * options, internal state info and things like persistent connections cannot
Edouard@340
    57
 * be transferred. It is useful in multithreaded applications when you can run
Edouard@340
    58
 * curl_easy_duphandle() for each new thread to avoid a series of identical
Edouard@340
    59
 * curl_easy_setopt() invokes in every thread.
Edouard@340
    60
 */
Edouard@340
    61
CURL_EXTERN CURL* curl_easy_duphandle(CURL *curl);
Edouard@340
    62
Edouard@340
    63
/*
Edouard@340
    64
 * NAME curl_easy_reset()
Edouard@340
    65
 *
Edouard@340
    66
 * DESCRIPTION
Edouard@340
    67
 *
Edouard@340
    68
 * Re-initializes a CURL handle to the default values. This puts back the
Edouard@340
    69
 * handle to the same state as it was in when it was just created.
Edouard@340
    70
 *
Edouard@340
    71
 * It does keep: live connections, the Session ID cache, the DNS cache and the
Edouard@340
    72
 * cookies.
Edouard@340
    73
 */
Edouard@340
    74
CURL_EXTERN void curl_easy_reset(CURL *curl);
Edouard@340
    75
Edouard@340
    76
/*
Edouard@340
    77
 * NAME curl_easy_recv()
Edouard@340
    78
 *
Edouard@340
    79
 * DESCRIPTION
Edouard@340
    80
 *
Edouard@340
    81
 * Receives data from the connected socket. Use after successful
Edouard@340
    82
 * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
Edouard@340
    83
 */
Edouard@340
    84
CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
Edouard@340
    85
                                    size_t *n);
Edouard@340
    86
Edouard@340
    87
/*
Edouard@340
    88
 * NAME curl_easy_send()
Edouard@340
    89
 *
Edouard@340
    90
 * DESCRIPTION
Edouard@340
    91
 *
Edouard@340
    92
 * Sends data over the connected socket. Use after successful
Edouard@340
    93
 * curl_easy_perform() with CURLOPT_CONNECT_ONLY option.
Edouard@340
    94
 */
Edouard@340
    95
CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
Edouard@340
    96
                                    size_t buflen, size_t *n);
Edouard@340
    97
Edouard@340
    98
#ifdef  __cplusplus
Edouard@340
    99
}
Edouard@340
   100
#endif
Edouard@340
   101
Edouard@340
   102
#endif