| Exiv2

Loading...
Searching...
No Matches
List of all members
Exiv2::HttpIo Class Reference

Provides the http read/write access for the RemoteIo. More...

`#include <basicio.hpp>`

Inheritance diagram for Exiv2::HttpIo:
[legend]

## Public Member Functions
Creators
| HttpIo (const std::string &url, size_t blockSize=1024)
| Constructor that accepts the http URL on which IO will be performed. The constructor does not open the file, and therefore never fails.
Public Member Functions inherited from Exiv2::RemoteIo
| RemoteIo ()
| Destructor. Releases all managed memory.
| RemoteIo (const RemoteIo &)=delete
RemoteIo & | operator= (const RemoteIo &)=delete
int | open () override
| Connect to the remote server, get the size of the remote file and allocate the array of blocksMap.
int | close () override
| Reset the IO position to the start. It does not release the data.
size_t | write (const byte *data, size_t wcount) override
| Not support this method.
size_t | write (BasicIo &src) override
| Write data that is read from another BasicIo instance to the remote file.
int | putb (byte data) override
| Not support.
DataBuf | read (size_t rcount) override
| 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.
size_t | read (byte *buf, size_t rcount) override
| 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 (!= bMemory), it will connect to server and populate the data to memory blocks.
int | getb () override
| 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.
void | transfer (BasicIo &src) override
| Remove the contents of the file and then transfer data from the src BasicIo object into the empty file.
int | seek (int64_t offset, Position pos) override
| Move the current IO position.
byte * | mmap (bool=false) override
| Not support.
int | munmap () override
| Not support.
size_t | tell () const override
| Get the current IO position.
size_t | size () const override
| Get the current memory buffer size in bytes.
bool | isopen () const override
| Returns true if the memory area is allocated.
int | error () const override
| Always returns 0.
bool | eof () const override
| Returns true if the IO position has reached the end, otherwise false.
const std::string & | path () const noexcept override
| Returns the URL of the file.
void | populateFakeData () override
| Mark all the bNone blocks to bKnow. This avoids allocating memory for parts of the file that contain image-date (non-metadata/pixel data).
Public Member Functions inherited from Exiv2::BasicIo
virtual | ~BasicIo ()=default
| Destructor.
void | readOrThrow (byte *buf, size_t rcount, ErrorCode err=ErrorCode::kerCorruptedMetadata)
| Safe version of read() that checks for errors and throws an exception if the read was unsuccessful.
void | seekOrThrow (int64_t offset, Position pos, ErrorCode err)
| Safe version of seek() that checks for errors and throws an exception if the seek was unsuccessful.

## Additional Inherited Members
Public Types inherited from Exiv2::BasicIo
enum | Position { beg , cur , end }
| Seek starting positions.
using | UniquePtr = std::unique_ptr<BasicIo>
| BasicIo auto_ptr type.
byte * | bigBlock_ {}
| this is allocated and populated by mmap()
std::unique_ptr< Impl > | p_
| Pointer to implementation.

## Detailed Description

Provides the http read/write access for the RemoteIo.

## Constructor & Destructor Documentation

## ◆ HttpIo()

Exiv2::HttpIo::HttpIo | ( | const std::string & | url,
|  | size_t | blockSize = 1024 )
| explicit

Constructor that accepts the http URL on which IO will be performed. The constructor does not open the file, and therefore never fails.

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.

The documentation for this class was generated from the following file:

- basicio.hpp