Skip to content

Commit

Permalink
Final commit, project abandoned
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanoBelli committed Mar 30, 2020
1 parent fdd72b7 commit 426dfd4
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 20 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ addons:
packages:
- cmake
- doxygen
- libgcrypt-dev
- pkg-config
- libjsoncpp1
- libjsoncpp-dev

before_script:
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then brew update && brew install pkg-config jsoncpp doxygen curl && brew upgrade cmake libgcrypt; fi
- if [[ $TRAVIS_OS_NAME == "osx" ]]; then brew update && brew install pkg-config jsoncpp doxygen curl; fi

script:
- pkg-config --variable pc_path pkg-config
- cmake . -DCMAKE_BUILD_TYPE="Release" -DCMAKE_CXX_FLAGS="-Wall -Wextra -O2 -finline-functions" -DXXTELEBOT_PKG_CONFIG="not_needed_here"
- make -j3

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.2)

project(xxtelebot
LANGUAGES CXX
VERSION 1.4.1.0)
VERSION 1.4.1.1)

# M.m
set(TGBOTAPI_VER_MAJOR 4)
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "xxtelebot"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.4.1.0
PROJECT_NUMBER = 1.4.1.1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
8 changes: 1 addition & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
cmake_minimum_required(VERSION 3.2)

find_package(PkgConfig REQUIRED)
find_package(CURL REQUIRED VERSION 7.56.0)
find_package(CURL 7.56.0 REQUIRED)
find_package(Threads REQUIRED)
#find_library(GCRYPT_LIBRARY NAMES gcrypt libgcrypt)

#if(NOT GCRYPT_LIBRARY)
# message(FATAL_ERROR "Could not find gcrypt library")
#endif()

pkg_check_modules(JSONCPP QUIET jsoncpp)

Expand Down Expand Up @@ -42,7 +37,6 @@ target_link_libraries(xxtelebot
PRIVATE
${CURL_LIBRARIES}
${JSONCPP_LIBRARIES}
# ${GCRYPT_LIBRARY}
Threads::Threads
)

Expand Down
8 changes: 0 additions & 8 deletions src/https.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <errno.h>
//#include <gcrypt.h>
#include <tgbot/utils/https.h>
#include <sstream>
#include <stdexcept>
Expand All @@ -9,8 +8,6 @@
#define SEPARATE(k, sstr) \
if (k) sstr << ','

//GCRY_THREAD_OPTION_PTHREAD_IMPL; /*deprecated*/

using namespace tgbot::utils::http;

static size_t write_data(const char *ptr, unused size_t nbs, size_t count,
Expand All @@ -19,16 +16,11 @@ static size_t write_data(const char *ptr, unused size_t nbs, size_t count,
return count;
}

//static void __GnuTLS_ProvideLockingMethod() {
// gcry_control(GCRYCTL_SET_THREAD_CBS);
//}

void tgbot::utils::http::__internal_Curl_GlobalInit() {
if(curl_global_sslset(CURLSSLBACKEND_GNUTLS, NULL, NULL) != CURLSSLSET_OK)
throw std::runtime_error("curl_global_sslset() error: libcurl does not support GnuTLS");

curl_global_init(CURL_GLOBAL_SSL);
// __GnuTLS_ProvideLockingMethod();
}

CURL *tgbot::utils::http::curlEasyInit() {
Expand Down

0 comments on commit 426dfd4

Please sign in to comment.