GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
url-transfer.cc File Reference
#include <fstream>
#include <iomanip>
#include <iostream>
#include "dir-ops.h"
#include "file-ops.h"
#include "file-stat.h"
#include "lo-sysdep.h"
#include "oct-env.h"
#include "unwind-prot.h"
#include "url-transfer.h"
#include "version.h"
#include <curl/curl.h>
#include <curl/curlver.h>
#include <curl/easy.h>
Include dependency graph for url-transfer.cc:

Go to the source code of this file.

Classes

class  curl_transfer
 

Macros

#define REP_CLASS   curl_transfer
 
#define SETOPT(option, parameter)
 
#define SETOPTR(option, parameter)
 

Functions

static int read_data (void *buffer, std::size_t size, std::size_t nmemb, void *streamp)
 
static std::size_t throw_away (void *, std::size_t size, std::size_t nmemb, void *)
 
static int write_data (void *buffer, std::size_t size, std::size_t nmemb, void *streamp)
 

Macro Definition Documentation

◆ REP_CLASS

#define REP_CLASS   curl_transfer

Definition at line 916 of file url-transfer.cc.

◆ SETOPT

#define SETOPT (   option,
  parameter 
)
Value:
do \
{ \
CURLcode res = curl_easy_setopt (m_curl, option, parameter); \
if (res != CURLE_OK) \
{ \
m_ok = false; \
m_errmsg = curl_easy_strerror (res); \
return; \
} \
} \
while (0)

Definition at line 261 of file url-transfer.cc.

◆ SETOPTR

#define SETOPTR (   option,
  parameter 
)
Value:
do \
{ \
CURLcode res = curl_easy_setopt (m_curl, option, parameter); \
if (res != CURLE_OK) \
{ \
m_ok = false; \
m_errmsg = curl_easy_strerror (res); \
return retval; \
} \
} \
while (0)

Definition at line 275 of file url-transfer.cc.

Function Documentation

◆ read_data()

static int read_data ( void *  buffer,
std::size_t  size,
std::size_t  nmemb,
void *  streamp 
)
static

Definition at line 242 of file url-transfer.cc.

References stream::eof(), and stream::read().

Referenced by curl_transfer::init().

◆ throw_away()

static std::size_t throw_away ( void *  ,
std::size_t  size,
std::size_t  nmemb,
void *   
)
static

Definition at line 253 of file url-transfer.cc.

Referenced by curl_transfer::get_fileinfo().

◆ write_data()

static int write_data ( void *  buffer,
std::size_t  size,
std::size_t  nmemb,
void *  streamp 
)
static