1 // Copyright 2020 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 #include "curl_wrapper.h" // NOLINT(build/include)
16
curl_easy_setopt_ptr(CURL * handle,CURLoption option,void * parameter)17 CURLcode curl_easy_setopt_ptr(CURL* handle, CURLoption option,
18 void* parameter) {
19 return curl_easy_setopt(handle, option, parameter);
20 }
21
curl_easy_setopt_long(CURL * handle,CURLoption option,long parameter)22 CURLcode curl_easy_setopt_long(CURL* handle, CURLoption option,
23 long parameter) {
24 return curl_easy_setopt(handle, option, parameter);
25 }
26
curl_easy_setopt_curl_off_t(CURL * handle,CURLoption option,curl_off_t parameter)27 CURLcode curl_easy_setopt_curl_off_t(CURL* handle, CURLoption option,
28 curl_off_t parameter) {
29 return curl_easy_setopt(handle, option, parameter);
30 }
31
curl_easy_getinfo_ptr(CURL * handle,CURLINFO option,void * parameter)32 CURLcode curl_easy_getinfo_ptr(CURL* handle, CURLINFO option, void* parameter) {
33 return curl_easy_getinfo(handle, option, parameter);
34 }
35
curl_getdate_sapi(char * datestring,time_t_sapi * now)36 time_t_sapi curl_getdate_sapi(char* datestring, time_t_sapi* now) {
37 return curl_getdate(datestring, now);
38 }
39
curl_multi_fdset_sapi(CURLM * multi_handle,fd_set_sapi * read_fd_set,fd_set_sapi * write_fd_set,fd_set_sapi * exc_fd_set,int * max_fd)40 CURLMcode curl_multi_fdset_sapi(CURLM* multi_handle, fd_set_sapi* read_fd_set,
41 fd_set_sapi* write_fd_set,
42 fd_set_sapi* exc_fd_set, int* max_fd) {
43 return curl_multi_fdset(multi_handle, read_fd_set, write_fd_set, exc_fd_set,
44 max_fd);
45 }
46
curl_multi_setopt_ptr(CURLM * handle,CURLMoption option,void * parameter)47 CURLMcode curl_multi_setopt_ptr(CURLM* handle, CURLMoption option,
48 void* parameter) {
49 return curl_multi_setopt(handle, option, parameter);
50 }
51
curl_multi_setopt_long(CURLM * handle,CURLMoption option,long parameter)52 CURLMcode curl_multi_setopt_long(CURLM* handle, CURLMoption option,
53 long parameter) {
54 return curl_multi_setopt(handle, option, parameter);
55 }
56
curl_multi_setopt_curl_off_t(CURLM * handle,CURLMoption option,curl_off_t parameter)57 CURLMcode curl_multi_setopt_curl_off_t(CURLM* handle, CURLMoption option,
58 curl_off_t parameter) {
59 return curl_multi_setopt(handle, option, parameter);
60 }
61
curl_multi_poll_sapi(CURLM * multi_handle,struct curl_waitfd * extra_fds,unsigned int extra_nfds,int timeout_ms,int * numfds)62 CURLMcode curl_multi_poll_sapi(CURLM* multi_handle,
63 struct curl_waitfd* extra_fds,
64 unsigned int extra_nfds, int timeout_ms,
65 int* numfds) {
66 return curl_multi_poll(multi_handle, extra_fds, extra_nfds, timeout_ms,
67 numfds);
68 }
69
curl_multi_wait_sapi(CURLM * multi_handle,struct curl_waitfd * extra_fds,unsigned int extra_nfds,int timeout_ms,int * numfds)70 CURLMcode curl_multi_wait_sapi(CURLM* multi_handle,
71 struct curl_waitfd* extra_fds,
72 unsigned int extra_nfds, int timeout_ms,
73 int* numfds) {
74 return curl_multi_wait(multi_handle, extra_fds, extra_nfds, timeout_ms,
75 numfds);
76 }
77
curl_share_setopt_ptr(CURLSH * handle,CURLSHoption option,void * parameter)78 CURLSHcode curl_share_setopt_ptr(CURLSH* handle, CURLSHoption option,
79 void* parameter) {
80 return curl_share_setopt(handle, option, parameter);
81 }
82
curl_share_setopt_long(CURLSH * handle,CURLSHoption option,long parameter)83 CURLSHcode curl_share_setopt_long(CURLSH* handle, CURLSHoption option,
84 long parameter) {
85 return curl_share_setopt(handle, option, parameter);
86 }
87