From e1be8254534898fccafc5d6cd04f6235f283cfbd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 3 Mar 2019 11:17:52 +0100 Subject: alt-svc: the libcurl bits --- include/curl/curl.h | 15 +++++++++++++++ include/curl/typecheck-gcc.h | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 3e0eba725..86a24184a 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -881,6 +881,14 @@ typedef enum { #define CURLHEADER_UNIFIED 0 #define CURLHEADER_SEPARATE (1<<0) +/* CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option */ +#define CURLALTSVC_IMMEDIATELY (1<<0) +#define CURLALTSVC_ALTUSED (1<<1) +#define CURLALTSVC_READONLYFILE (1<<2) +#define CURLALTSVC_H1 (1<<3) +#define CURLALTSVC_H2 (1<<4) +#define CURLALTSVC_H3 (1<<5) + /* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ #define CURLPROTO_HTTP (1<<0) #define CURLPROTO_HTTPS (1<<1) @@ -1904,6 +1912,12 @@ typedef enum { /* set this to 1L to allow HTTP/0.9 responses or 0L to disallow */ CINIT(HTTP09_ALLOWED, LONG, 285), + /* alt-svc control bitmask */ + CINIT(ALTSVC_CTRL, LONG, 286), + + /* alt-svc cache file name to possibly read from/write to */ + CINIT(ALTSVC, STRINGPOINT, 287), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -2766,6 +2780,7 @@ typedef struct { #define CURL_VERSION_HTTPS_PROXY (1<<21) /* HTTPS-proxy support built-in */ #define CURL_VERSION_MULTI_SSL (1<<22) /* Multiple SSL backends available */ #define CURL_VERSION_BROTLI (1<<23) /* Brotli features are present. */ +#define CURL_VERSION_ALTSVC (1<<24) /* Alt-Svc handling built-in */ /* * NAME curl_version_info() diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h index 01df7b15f..8018ea37f 100644 --- a/include/curl/typecheck-gcc.h +++ b/include/curl/typecheck-gcc.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2018, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -256,6 +256,7 @@ _CURL_WARNING(_curl_easy_getinfo_err_curl_off_t, #define _curl_is_string_option(option) \ ((option) == CURLOPT_ABSTRACT_UNIX_SOCKET || \ (option) == CURLOPT_ACCEPT_ENCODING || \ + (option) == CURLOPT_ALTSVC || \ (option) == CURLOPT_CAINFO || \ (option) == CURLOPT_CAPATH || \ (option) == CURLOPT_COOKIE || \ -- cgit v1.2.3