bibledit / cloud

Source code for Bibledit core library and Cloud binary
GNU General Public License v3.0
13 stars 3 forks source link

Update deprecated calls to libcurl #946

Closed teusbenschop closed 1 month ago

teusbenschop commented 3 months ago

Here are some warnings about deprecated calls:

filter/url.cpp: In function ‘std::string filter_url_http_upload(std::string, std::map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >, std::string, std::string&)’:
filter/url.cpp:1158:19: warning: ‘CURLFORM_COPYNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations]
 1158 |                   CURLFORM_COPYNAME, element.first.c_str (),
      |                   ^~~~~~~~~~~~~~~~~
In file included from filter/url.cpp:33:
/usr/include/x86_64-linux-gnu/curl/curl.h:2509:3: note: declared here
 2509 |   CURLFORM_COPYNAME        CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
      |   ^~~~~~~~~~~~~~~~~
filter/url.cpp:1159:19: warning: ‘CURLFORM_COPYCONTENTS’ is deprecated: since 7.56.0. Use curl_mime_data() [-Wdeprecated-declarations]
 1159 |                   CURLFORM_COPYCONTENTS, element.second.c_str(),
      |                   ^~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2512:3: note: declared here
 2512 |   CURLFORM_COPYCONTENTS    CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
      |   ^~~~~~~~~~~~~~~~~~~~~
filter/url.cpp:1157:18: warning: ‘CURLFORMcode curl_formadd(curl_httppost**, curl_httppost**, ...)’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations]
 1157 |     curl_formadd (&formpost, &lastptr,
      |     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
 1158 |                   CURLFORM_COPYNAME, element.first.c_str (),
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1159 |                   CURLFORM_COPYCONTENTS, element.second.c_str(),
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1160 |                   CURLFORM_END);
      |                   ~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2584:1: note: declared here
 2584 | curl_formadd(struct curl_httppost **httppost,
      | ^~~~~~~~~~~~
filter/url.cpp:1165:16: warning: ‘CURLFORM_COPYNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations]
 1165 |                CURLFORM_COPYNAME, "uploadedZipFile",
      |                ^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2509:3: note: declared here
 2509 |   CURLFORM_COPYNAME        CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
      |   ^~~~~~~~~~~~~~~~~
filter/url.cpp:1166:16: warning: ‘CURLFORM_FILE’ is deprecated: since 7.56.0. Use curl_mime_filedata() [-Wdeprecated-declarations]
 1166 |                CURLFORM_FILE, filename.c_str(),
      |                ^~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2518:3: note: declared here
 2518 |   CURLFORM_FILE            CURL_DEPRECATED(7.56.0, "Use curl_mime_filedata()"),
      |   ^~~~~~~~~~~~~
filter/url.cpp:1164:15: warning: ‘CURLFORMcode curl_formadd(curl_httppost**, curl_httppost**, ...)’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations]
 1164 |   curl_formadd(&formpost, &lastptr,
      |   ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
 1165 |                CURLFORM_COPYNAME, "uploadedZipFile",
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1166 |                CURLFORM_FILE, filename.c_str(),
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1167 |                CURLFORM_END);
      |                ~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2584:1: note: declared here
 2584 | curl_formadd(struct curl_httppost **httppost,
      | ^~~~~~~~~~~~
filter/url.cpp:1175:29: warning: ‘CURLOPT_HTTPPOST’ is deprecated: since 7.56.0. Use CURLOPT_MIMEPOST [-Wdeprecated-declarations]
 1175 |     curl_easy_setopt (curl, CURLOPT_HTTPPOST, formpost);
      |                             ^~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:1195:3: note: declared here
 1195 |   CURLOPTDEPRECATED(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24,
      |   ^~~~~~~~~~~~~~~~~
filter/url.cpp:1200:19: warning: ‘void curl_formfree(curl_httppost*)’ is deprecated: since 7.56.0. Use curl_mime_free() [-Wdeprecated-declarations]
 1200 |     curl_formfree (formpost);
      |     ~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/x86_64-linux-gnu/curl/curl.h:2620:1: note: declared here
 2620 | curl_formfree(struct curl_httppost *form);
      | ^~~~~~~~~~~~~
teusbenschop commented 1 month ago

The deprecated libcurl calls were related to submitting a Bible to the Bible Drop Box.

However it appears that the API of the Bible Drop Box has changed.

Hence it was decided that Bibledit would no longer automatically submit Bibles to the Bible Drop Box.

It is now possible to do that manually only.

As a result of this, all deprecated libcurl calls have gone.