-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
add26fb
commit 81d6df5
Showing
194 changed files
with
59,248 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#ifndef CURLINC_CURLVER_H | ||
#define CURLINC_CURLVER_H | ||
/*************************************************************************** | ||
* _ _ ____ _ | ||
* Project ___| | | | _ \| | | ||
* / __| | | | |_) | | | ||
* | (__| |_| | _ <| |___ | ||
* \___|\___/|_| \_\_____| | ||
* | ||
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. | ||
* | ||
* This software is licensed as described in the file COPYING, which | ||
* you should have received as part of this distribution. The terms | ||
* are also available at https://curl.se/docs/copyright.html. | ||
* | ||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell | ||
* copies of the Software, and permit persons to whom the Software is | ||
* furnished to do so, under the terms of the COPYING file. | ||
* | ||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
* KIND, either express or implied. | ||
* | ||
* SPDX-License-Identifier: curl | ||
* | ||
***************************************************************************/ | ||
|
||
/* This header file contains nothing but libcurl version info, generated by | ||
a script at release-time. This was made its own header file in 7.11.2 */ | ||
|
||
/* This is the global package copyright */ | ||
#define LIBCURL_COPYRIGHT "Daniel Stenberg, <daniel@haxx.se>." | ||
|
||
/* This is the version number of the libcurl package from which this header | ||
file origins: */ | ||
#define LIBCURL_VERSION "8.2.1-DEV" | ||
|
||
/* The numeric version number is also available "in parts" by using these | ||
defines: */ | ||
#define LIBCURL_VERSION_MAJOR 8 | ||
#define LIBCURL_VERSION_MINOR 2 | ||
#define LIBCURL_VERSION_PATCH 1 | ||
|
||
/* This is the numeric version of the libcurl version number, meant for easier | ||
parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will | ||
always follow this syntax: | ||
0xXXYYZZ | ||
Where XX, YY and ZZ are the main version, release and patch numbers in | ||
hexadecimal (using 8 bits each). All three numbers are always represented | ||
using two digits. 1.2 would appear as "0x010200" while version 9.11.7 | ||
appears as "0x090b07". | ||
This 6-digit (24 bits) hexadecimal number does not show pre-release number, | ||
and it is always a greater number in a more recent release. It makes | ||
comparisons with greater than and less than work. | ||
Note: This define is the full hex number and _does not_ use the | ||
CURL_VERSION_BITS() macro since curl's own configure script greps for it | ||
and needs it to contain the full number. | ||
*/ | ||
#define LIBCURL_VERSION_NUM 0x080201 | ||
|
||
/* | ||
* This is the date and time when the full source package was created. The | ||
* timestamp is not stored in git, as the timestamp is properly set in the | ||
* tarballs by the maketgz script. | ||
* | ||
* The format of the date follows this template: | ||
* | ||
* "2007-11-23" | ||
*/ | ||
#define LIBCURL_TIMESTAMP "[unreleased]" | ||
|
||
#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) | ||
#define CURL_AT_LEAST_VERSION(x,y,z) \ | ||
(LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) | ||
|
||
#endif /* CURLINC_CURLVER_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
#ifndef CURLINC_EASY_H | ||
#define CURLINC_EASY_H | ||
/*************************************************************************** | ||
* _ _ ____ _ | ||
* Project ___| | | | _ \| | | ||
* / __| | | | |_) | | | ||
* | (__| |_| | _ <| |___ | ||
* \___|\___/|_| \_\_____| | ||
* | ||
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. | ||
* | ||
* This software is licensed as described in the file COPYING, which | ||
* you should have received as part of this distribution. The terms | ||
* are also available at https://curl.se/docs/copyright.html. | ||
* | ||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell | ||
* copies of the Software, and permit persons to whom the Software is | ||
* furnished to do so, under the terms of the COPYING file. | ||
* | ||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
* KIND, either express or implied. | ||
* | ||
* SPDX-License-Identifier: curl | ||
* | ||
***************************************************************************/ | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/* Flag bits in the curl_blob struct: */ | ||
#define CURL_BLOB_COPY 1 /* tell libcurl to copy the data */ | ||
#define CURL_BLOB_NOCOPY 0 /* tell libcurl to NOT copy the data */ | ||
|
||
struct curl_blob { | ||
void *data; | ||
size_t len; | ||
unsigned int flags; /* bit 0 is defined, the rest are reserved and should be | ||
left zeroes */ | ||
}; | ||
|
||
CURL_EXTERN CURL *curl_easy_init(void); | ||
CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); | ||
CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); | ||
CURL_EXTERN void curl_easy_cleanup(CURL *curl); | ||
|
||
/* | ||
* NAME curl_easy_getinfo() | ||
* | ||
* DESCRIPTION | ||
* | ||
* Request internal information from the curl session with this function. | ||
* The third argument MUST be pointing to the specific type of the used option | ||
* which is documented in each man page of the option. The data pointed to | ||
* will be filled in accordingly and can be relied upon only if the function | ||
* returns CURLE_OK. This function is intended to get used *AFTER* a performed | ||
* transfer, all results from this function are undefined until the transfer | ||
* is completed. | ||
*/ | ||
CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); | ||
|
||
|
||
/* | ||
* NAME curl_easy_duphandle() | ||
* | ||
* DESCRIPTION | ||
* | ||
* Creates a new curl session handle with the same options set for the handle | ||
* passed in. Duplicating a handle could only be a matter of cloning data and | ||
* options, internal state info and things like persistent connections cannot | ||
* be transferred. It is useful in multithreaded applications when you can run | ||
* curl_easy_duphandle() for each new thread to avoid a series of identical | ||
* curl_easy_setopt() invokes in every thread. | ||
*/ | ||
CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl); | ||
|
||
/* | ||
* NAME curl_easy_reset() | ||
* | ||
* DESCRIPTION | ||
* | ||
* Re-initializes a CURL handle to the default values. This puts back the | ||
* handle to the same state as it was in when it was just created. | ||
* | ||
* It does keep: live connections, the Session ID cache, the DNS cache and the | ||
* cookies. | ||
*/ | ||
CURL_EXTERN void curl_easy_reset(CURL *curl); | ||
|
||
/* | ||
* NAME curl_easy_recv() | ||
* | ||
* DESCRIPTION | ||
* | ||
* Receives data from the connected socket. Use after successful | ||
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option. | ||
*/ | ||
CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, | ||
size_t *n); | ||
|
||
/* | ||
* NAME curl_easy_send() | ||
* | ||
* DESCRIPTION | ||
* | ||
* Sends data over the connected socket. Use after successful | ||
* curl_easy_perform() with CURLOPT_CONNECT_ONLY option. | ||
*/ | ||
CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, | ||
size_t buflen, size_t *n); | ||
|
||
|
||
/* | ||
* NAME curl_easy_upkeep() | ||
* | ||
* DESCRIPTION | ||
* | ||
* Performs connection upkeep for the given session handle. | ||
*/ | ||
CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl); | ||
|
||
#ifdef __cplusplus | ||
} /* end of extern "C" */ | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#ifndef CURLINC_HEADER_H | ||
#define CURLINC_HEADER_H | ||
/*************************************************************************** | ||
* _ _ ____ _ | ||
* Project ___| | | | _ \| | | ||
* / __| | | | |_) | | | ||
* | (__| |_| | _ <| |___ | ||
* \___|\___/|_| \_\_____| | ||
* | ||
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. | ||
* | ||
* This software is licensed as described in the file COPYING, which | ||
* you should have received as part of this distribution. The terms | ||
* are also available at https://curl.se/docs/copyright.html. | ||
* | ||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell | ||
* copies of the Software, and permit persons to whom the Software is | ||
* furnished to do so, under the terms of the COPYING file. | ||
* | ||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
* KIND, either express or implied. | ||
* | ||
* SPDX-License-Identifier: curl | ||
* | ||
***************************************************************************/ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
struct curl_header { | ||
char *name; /* this might not use the same case */ | ||
char *value; | ||
size_t amount; /* number of headers using this name */ | ||
size_t index; /* ... of this instance, 0 or higher */ | ||
unsigned int origin; /* see bits below */ | ||
void *anchor; /* handle privately used by libcurl */ | ||
}; | ||
|
||
/* 'origin' bits */ | ||
#define CURLH_HEADER (1<<0) /* plain server header */ | ||
#define CURLH_TRAILER (1<<1) /* trailers */ | ||
#define CURLH_CONNECT (1<<2) /* CONNECT headers */ | ||
#define CURLH_1XX (1<<3) /* 1xx headers */ | ||
#define CURLH_PSEUDO (1<<4) /* pseudo headers */ | ||
|
||
typedef enum { | ||
CURLHE_OK, | ||
CURLHE_BADINDEX, /* header exists but not with this index */ | ||
CURLHE_MISSING, /* no such header exists */ | ||
CURLHE_NOHEADERS, /* no headers at all exist (yet) */ | ||
CURLHE_NOREQUEST, /* no request with this number was used */ | ||
CURLHE_OUT_OF_MEMORY, /* out of memory while processing */ | ||
CURLHE_BAD_ARGUMENT, /* a function argument was not okay */ | ||
CURLHE_NOT_BUILT_IN /* if API was disabled in the build */ | ||
} CURLHcode; | ||
|
||
CURL_EXTERN CURLHcode curl_easy_header(CURL *easy, | ||
const char *name, | ||
size_t index, | ||
unsigned int origin, | ||
int request, | ||
struct curl_header **hout); | ||
|
||
CURL_EXTERN struct curl_header *curl_easy_nextheader(CURL *easy, | ||
unsigned int origin, | ||
int request, | ||
struct curl_header *prev); | ||
|
||
#ifdef __cplusplus | ||
} /* end of extern "C" */ | ||
#endif | ||
|
||
#endif /* CURLINC_HEADER_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#ifndef CURLINC_MPRINTF_H | ||
#define CURLINC_MPRINTF_H | ||
/*************************************************************************** | ||
* _ _ ____ _ | ||
* Project ___| | | | _ \| | | ||
* / __| | | | |_) | | | ||
* | (__| |_| | _ <| |___ | ||
* \___|\___/|_| \_\_____| | ||
* | ||
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. | ||
* | ||
* This software is licensed as described in the file COPYING, which | ||
* you should have received as part of this distribution. The terms | ||
* are also available at https://curl.se/docs/copyright.html. | ||
* | ||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell | ||
* copies of the Software, and permit persons to whom the Software is | ||
* furnished to do so, under the terms of the COPYING file. | ||
* | ||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
* KIND, either express or implied. | ||
* | ||
* SPDX-License-Identifier: curl | ||
* | ||
***************************************************************************/ | ||
|
||
#include <stdarg.h> | ||
#include <stdio.h> /* needed for FILE */ | ||
#include "curl.h" /* for CURL_EXTERN */ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
CURL_EXTERN int curl_mprintf(const char *format, ...); | ||
CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); | ||
CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); | ||
CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, | ||
const char *format, ...); | ||
CURL_EXTERN int curl_mvprintf(const char *format, va_list args); | ||
CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); | ||
CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); | ||
CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, | ||
const char *format, va_list args); | ||
CURL_EXTERN char *curl_maprintf(const char *format, ...); | ||
CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); | ||
|
||
#ifdef __cplusplus | ||
} /* end of extern "C" */ | ||
#endif | ||
|
||
#endif /* CURLINC_MPRINTF_H */ |
Oops, something went wrong.