RDK Documentation (Open Sourced RDK Components)
AampCurlStore.cpp File Reference

Advanced Adaptive Media Player (AAMP) Curl store. More...

#include "AampCurlStore.h"
#include "AampDefine.h"
Include dependency graph for AampCurlStore.cpp:

Go to the source code of this file.

Macros

#define CURL_EASY_SETOPT(curl, CURLoption, option)
 

Functions

static void curl_lock_callback (CURL *curl, curl_lock_data data, curl_lock_access access, void *user_ptr)
 
static void curl_unlock_callback (CURL *curl, curl_lock_data data, void *user_ptr)
 
static size_t write_callback (char *ptr, size_t size, size_t nmemb, void *userdata)
 write callback to be used by CURL More...
 
static size_t header_callback (const char *ptr, size_t size, size_t nmemb, void *user_data)
 callback invoked on http header by curl More...
 
static int progress_callback (void *clientp, double dltotal, double dlnow, double ultotal, double ulnow)
 
CURLcode ssl_callback (CURL *curl, void *ssl_ctx, void *user_ptr)
 
static int eas_curl_debug_callback (CURL *handle, curl_infotype type, char *data, size_t size, void *userp)
 

Variables

static pthread_mutex_t gCurlShMutex = PTHREAD_MUTEX_INITIALIZER
 

yes

Advanced Adaptive Media Player (AAMP) Curl store.

Definition in file AampCurlStore.cpp.

Macro Definition Documentation

◆ CURL_EASY_SETOPT

#define CURL_EASY_SETOPT (   curl,
  CURLoption,
  option 
)
Value:
if (curl_easy_setopt(curl, CURLoption, option) != 0) {\
logprintf("Failed at curl_easy_setopt ");\
}

Definition at line 28 of file AampCurlStore.cpp.

Function Documentation

◆ curl_lock_callback()

static void curl_lock_callback ( CURL *  curl,
curl_lock_data  data,
curl_lock_access  access,
void *  user_ptr 
)
static
Parameters
curlptr to CURL instance
datacurl data lock
acesscurl access lock
user_ptrCurlCallbackContext pointer
Return values
void

Definition at line 43 of file AampCurlStore.cpp.

◆ curl_unlock_callback()

static void curl_unlock_callback ( CURL *  curl,
curl_lock_data  data,
void *  user_ptr 
)
static
Parameters
curlptr to CURL instance
datacurl data lock
acesscurl access lock
user_ptrCurlCallbackContext pointer
Return values
void

Definition at line 83 of file AampCurlStore.cpp.

◆ write_callback()

static size_t write_callback ( char *  ptr,
size_t  size,
size_t  nmemb,
void *  userdata 
)
static

write callback to be used by CURL

Parameters
ptrpointer to buffer containing the data
sizesize of the buffer
nmembnumber of bytes
userdataCurlCallbackContext pointer
Return values
sizeconsumed or 0 if interrupted

Definition at line 122 of file AampCurlStore.cpp.

◆ header_callback()

static size_t header_callback ( const char *  ptr,
size_t  size,
size_t  nmemb,
void *  user_data 
)
static

callback invoked on http header by curl

Parameters
ptrpointer to buffer containing the data
sizesize of the buffer
nmembnumber of bytes
user_dataCurlCallbackContext pointer
Return values

Definition at line 141 of file AampCurlStore.cpp.

◆ progress_callback()

static int progress_callback ( void *  clientp,
double  dltotal,
double  dlnow,
double  ultotal,
double  ulnow 
)
static
Parameters
clientpapp-specific as optionally set with CURLOPT_PROGRESSDATA
dltotaltotal bytes expected to download
dlnowdownloaded bytes so far
ultotaltotal bytes expected to upload
ulnowuploaded bytes so far
Return values

Definition at line 161 of file AampCurlStore.cpp.

◆ ssl_callback()

CURLcode ssl_callback ( CURL *  curl,
void *  ssl_ctx,
void *  user_ptr 
)
Parameters
curlptr to CURL instance
ssl_ctxSSL context used by CURL
user_ptrdata pointer set as param to CURLOPT_SSL_CTX_DATA
Return values
CURLcodeCURLE_OK if no errors, otherwise corresponding CURL code

Definition at line 186 of file AampCurlStore.cpp.

◆ eas_curl_debug_callback()

static int eas_curl_debug_callback ( CURL *  handle,
curl_infotype  type,
char *  data,
size_t  size,
void *  userp 
)
static
Parameters
handleptr to CURL instance
typetype of data passed in the callback
datadata pointer, NOT null terminated
sizesize of the data
userpuser pointer set with CURLOPT_DEBUGDATA
Return values
return0

Definition at line 209 of file AampCurlStore.cpp.