Provides the http, https read/write access and ftp read access for the RemoteIo. This class is based on libcurl.
More...
#include <basicio.hpp>
|
| CurlIo (const std::string &url, size_t blockSize=0) |
| Constructor that accepts the URL on which IO will be performed. More...
|
|
long | write (const byte *data, long wcount) |
| Write access is only available for some protocols. This method will call RemoteIo::write(const byte* data, long wcount) if the write access is available for the protocol. Otherwise, it throws the Error. More...
|
|
long | write (BasicIo &src) |
| Write access is only available for some protocols. This method will call RemoteIo::write(BasicIo& src) if the write access is available for the protocol. Otherwise, it throws the Error. More...
|
|
| CurlIo (CurlIo &rhs) |
| Copy constructor.
|
|
CurlIo & | operator= (const CurlIo &rhs) |
| Assignment operator.
|
|
virtual | ~CurlIo () |
| Default Destructor.
|
|
|
enum | Position { beg
, cur
, end
} |
| Seek starting positions.
|
|
typedef std::auto_ptr< BasicIo > | AutoPtr |
| BasicIo auto_ptr type.
|
|
virtual | ~RemoteIo () |
| Destructor. Releases all managed memory.
|
|
virtual int | open () |
| Connect to the remote server, get the size of the remote file and allocate the array of blocksMap. More...
|
|
virtual int | close () |
| Reset the IO position to the start. It does not release the data. More...
|
|
virtual int | putb (byte data) |
| Not support. More...
|
|
virtual DataBuf | read (long rcount) |
| Read data from the memory blocks. Reading starts at the current IO position and the position is advanced by the number of bytes read. If the memory blocks are not populated (False), it will connect to server and populate the data to memory blocks. More...
|
|
virtual long | read (byte *buf, long rcount) |
| Read data from the the memory blocks. Reading starts at the current IO position and the position is advanced by the number of bytes read. If the memory blocks are not populated (!= bMemory), it will connect to server and populate the data to memory blocks. More...
|
|
virtual int | getb () |
| Read one byte from the memory blocks. The IO position is advanced by one byte. If the memory block is not populated (!= bMemory), it will connect to server and populate the data to the memory block. More...
|
|
virtual void | transfer (BasicIo &src) |
| Remove the contents of the file and then transfer data from the src BasicIo object into the empty file. More...
|
|
virtual int | seek (long offset, Position pos) |
| Move the current IO position. More...
|
|
virtual byte * | mmap (bool=false) |
| Not support. More...
|
|
virtual int | munmap () |
| Not support. More...
|
|
virtual long | tell () const |
| Get the current IO position. More...
|
|
virtual size_t | size () const |
| Get the current memory buffer size in bytes. More...
|
|
virtual bool | isopen () const |
| Returns true if the memory area is allocated. More...
|
|
virtual int | error () const |
| Always returns 0. More...
|
|
virtual bool | eof () const |
| Returns true if the IO position has reached the end, otherwise false. More...
|
|
virtual std::string | path () const |
| Returns the URL of the file. More...
|
|
virtual void | populateFakeData () |
| Mark all the bNone blocks to bKnow. This avoids allocating memory for parts of the file that contain image-date (non-metadata/pixel data) More...
|
|
virtual | ~BasicIo () |
| Destructor.
|
|
byte * | bigBlock_ |
| this is allocated and populated by mmap()
|
|
| RemoteIo () |
| Default Constructor.
|
|
| BasicIo () |
| Default Constructor.
|
|
Impl * | p_ |
| Pointer to implementation.
|
|
Provides the http, https read/write access and ftp read access for the RemoteIo. This class is based on libcurl.
◆ CurlIo()
Exiv2::CurlIo::CurlIo |
( |
const std::string & |
url, |
|
|
size_t |
blockSize = 0 |
|
) |
| |
Constructor that accepts the URL on which IO will be performed.
- Parameters
-
url | The full path of url |
blockSize | the size of the memory block. The file content is divided into the memory blocks. These blocks are populated on demand from the server, so it avoids copying the complete file. |
- Exceptions
-
Error | if it is unable to init curl pointer. |
◆ write() [1/2]
long Exiv2::CurlIo::write |
( |
BasicIo & |
src | ) |
|
|
virtual |
Write access is only available for some protocols. This method will call RemoteIo::write(BasicIo& src) if the write access is available for the protocol. Otherwise, it throws the Error.
Reimplemented from Exiv2::RemoteIo.
◆ write() [2/2]
long Exiv2::CurlIo::write |
( |
const byte * |
data, |
|
|
long |
wcount |
|
) |
| |
|
virtual |
The documentation for this class was generated from the following file: