AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Namespaces | Macros | Functions | Variables
LibcurlUtils.cpp File Reference
#include <cerrno>
#include <cstdlib>
#include <curl/curl.h>
#include "AVSCommon/Utils/Configuration/ConfigurationNode.h"
#include "AVSCommon/Utils/LibcurlUtils/LibcurlUtils.h"
#include "AVSCommon/Utils/Logger/Logger.h"
Include dependency graph for LibcurlUtils.cpp:

Namespaces

 alexaClientSDK
 Whether or not curl logs should be emitted.
 
 alexaClientSDK::avsCommon
 
 alexaClientSDK::avsCommon::utils
 
 alexaClientSDK::avsCommon::utils::libcurlUtils
 

Macros

#define LX(event)   alexaClientSDK::avsCommon::utils::logger::LogEntry(TAG, event)
 
#define SETOPT(handle, option, value)   setopt(handle, option, value, #option, #value)
 

Functions

static const std::string alexaClientSDK::avsCommon::utils::libcurlUtils::TAG ("LibcurlUtils")
 String to identify log entries originating from this file. More...
 
template<typename ValueType >
static bool alexaClientSDK::avsCommon::utils::libcurlUtils::setopt (CURL *handle, CURLoption option, ValueType value, const char *optionName, const char *valueAsString)
 
bool alexaClientSDK::avsCommon::utils::libcurlUtils::prepareForTLS (CURL *handle)
 
bool alexaClientSDK::avsCommon::utils::libcurlUtils::prepareForProxy (CURL *handle)
 

Variables

static const std::string alexaClientSDK::avsCommon::utils::libcurlUtils::LIBCURLUTILS_CONFIG_KEY = "libcurlUtils"
 Key for looking up the LibCurlUtil ConfigurationNode. More...
 
static const std::string alexaClientSDK::avsCommon::utils::libcurlUtils::CAPATH_CONFIG_KEY = "CURLOPT_CAPATH"
 Key for looking up a configuration value for CURLOPT_CAPATH. More...
 
static const std::string alexaClientSDK::avsCommon::utils::libcurlUtils::CAINFO_CONFIG_KEY = "CURLOPT_CAINFO"
 Key for looking up a configuration value for CURLOPT_CAINFO. More...
 
static const std::string alexaClientSDK::avsCommon::utils::libcurlUtils::PROXY_CONFIG_KEY = "CURLOPT_PROXY"
 Key for looking up a configuration value for CURLOPT_PROXY. More...
 
static const std::string alexaClientSDK::avsCommon::utils::libcurlUtils::VERIFY_HOSTS_AND_PEERS_CONFIG_KEY = "verifyHostsAndPeers"
 Key for looking up a configuration value for verifying hosts and peers. More...
 

Macro Definition Documentation

◆ LX

#define LX (   event)    alexaClientSDK::avsCommon::utils::logger::LogEntry(TAG, event)

Create a LogEntry using this file's TAG and the specified event string.

Parameters
Theevent string for this LogEntry.

◆ SETOPT

#define SETOPT (   handle,
  option,
  value 
)    setopt(handle, option, value, #option, #value)

Set an option on a libcurl handle to value with stringification of option name and value for logging.

Parameters
handleThe CURL handle to set the option on.
optionThe option to set.
valueThe new value for the specified option.

AlexaClientSDK 1.26.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0