RDK Documentation (Open Sourced RDK Components)
FakeCurl.cpp
1 /*
2 * If not stated otherwise in this file or this component's license file the
3 * following copyright and licenses apply:
4 *
5 * Copyright 2022 RDK Management
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 *
19 * Fake implementations of APIs from Curl which is:
20 * Copyright (c) 1996 - 2022, Daniel Stenberg, daniel@haxx.se, and many contributors
21 * Licensed under the CURL License
22 */
23 
24 #include <curl/curl.h>
25 
26 CURL *curl_easy_init(void)
27 {
28  return nullptr;
29 }
30 
31 CURLcode curl_easy_setopt(CURL *handle, CURLoption option, ...)
32 {
33  return CURLE_OK;
34 }
35 
36 CURLcode curl_easy_perform(CURL *curl)
37 {
38  return CURLE_OK;
39 }
40 
41 void curl_easy_cleanup(CURL *curl)
42 {
43 }
44 
45 CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...)
46 {
47  return CURLE_OK;
48 }
49 
50 struct curl_slist *curl_slist_append(struct curl_slist *,
51  const char *)
52 {
53  return nullptr;
54 }
55 
56 void curl_slist_free_all(struct curl_slist *)
57 {
58 }
59 
60 CURLSHcode curl_share_cleanup(CURLSH *)
61 {
62  return CURLSHE_OK;
63 }