GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Macros | Functions
url-transfer.cc File Reference
#include <fstream>
#include <iomanip>
#include <iostream>
#include "dir-ops.h"
#include "file-ops.h"
#include "file-stat.h"
#include "unwind-prot.h"
#include "url-transfer.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, size_t size, size_t nmemb, void *streamp)
static size_t throw_away (void *, size_t size, size_t nmemb, void *)
static int write_data (void *buffer, size_t size, size_t nmemb, void *streamp)

Macro Definition Documentation

#define REP_CLASS   curl_transfer

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

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

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

Referenced by curl_transfer::ascii(), curl_transfer::binary(), curl_transfer::curl_transfer(), curl_transfer::dir(), curl_transfer::ftp_file_or_dir_action(), curl_transfer::get(), curl_transfer::get_fileinfo(), curl_transfer::http_get(), curl_transfer::http_post(), curl_transfer::init(), curl_transfer::put(), and curl_transfer::rename().

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

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

Referenced by curl_transfer::list(), curl_transfer::pwd(), curl_transfer::set_istream(), and curl_transfer::set_ostream().

Function Documentation

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

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

Referenced by curl_transfer::init().

static size_t throw_away ( void ,
size_t  size,
size_t  nmemb,
void  
)
static

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

Referenced by curl_transfer::get_fileinfo().

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