#include <FileTransferer.h>

Inheritance diagram for giga::core::FileTransferer:
giga::core::FileDownloader giga::core::FileUploader giga::core::Sha1Calculator

Classes

struct  Progress
 

Public Types

enum  State {
  pending, started, paused, canceled,
  error
}
 

Public Member Functions

 FileTransferer (pplx::cancellation_token_source cts)
 
 FileTransferer (FileTransferer &&other)
 
 FileTransferer (const FileTransferer &)=delete
 
FileTransfereroperator= (const FileTransferer &)=delete
 
FileTransfereroperator= (FileTransferer &&)=delete
 
void start ()
 Start a transfer.
 
void pause ()
 Pause the current transfer (see resume())
 
void resume ()
 Resume the current transfer (see pause())
 
void cancel ()
 Cancel a started upload. The task managing the transfer will most probably throw an exception.
 
void setError (const std::string &error)
 
State state () const
 
void limitRate (uint64_t rate)
 Limit the rate of the transfer. More...
 
virtual FileTransferer::Progress progress () const =0
 
virtual const
boost::filesystem::path & 
filename () const =0
 

Protected Member Functions

virtual void doStart ()=0
 

Protected Attributes

State _state
 
std::unique_ptr
< details::CurlProgress
_progress
 
std::mutex _mut
 
pplx::cancellation_token_source _cts
 
utility::string_t _error
 

Detailed Description

The FileTransferer can be a FileDownload or a FileUpload.

Member Function Documentation

void giga::core::FileTransferer::limitRate ( uint64_t  rate)

Limit the rate of the transfer.

Parameters
ratein Byte/s

The documentation for this class was generated from the following files:
  • /home/thomas/code/GiGaSdk/src/giga/core/FileTransferer.h
  • /home/thomas/code/GiGaSdk/src/giga/core/FileTransferer.cpp