Loading...
Searching...
No Matches
Exiv2::HttpIo Class Reference

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

`#include <basicio.hpp>`

Inheritance diagram for Exiv2::HttpIo:
[legend]

## Classes

class | HttpImpl
| Internal Pimpl structure of class HttpIo. More...

## 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 failes.
| HttpIo (HttpIo &rhs)
| Copy constructor.
HttpIo & | operator= (const HttpIo &rhs)
| Assignment operator.
virtual | ~HttpIo ()
| Default Destructor.

## Additional Inherited Members

Public Types inherited from Exiv2::BasicIo
enum | Position { beg , cur , end }
| Seek starting positions.
typedef std::auto_ptr< BasicIo > | AutoPtr
| BasicIo auto_ptr type.
Public Member Functions inherited from Exiv2::RemoteIo
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.
virtual int | close ()
| Reset the IO position to the start. It does not release the data.
virtual long | write (const byte *data, long wcount)
| Not support this method.
virtual long | write (BasicIo &src)
| Write data that is read from another BasicIo instance to the remote file.
virtual int | putb (byte data)
| Not support.
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.
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.
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.
virtual void | transfer (BasicIo &src)
| Remove the contents of the file and then transfer data from the src BasicIo object into the empty file.
virtual int | seek (long offset, Position pos)
| Move the current IO position.
virtual byte * | mmap (bool=false)
| Not support.
virtual int | munmap ()
| Not support.
virtual long | tell () const
| Get the current IO position.
virtual size_t | size () const
| Get the current memory buffer size in bytes.
virtual bool | isopen () const
| Returns true if the memory area is allocated.
virtual int | error () const
| Always returns 0.
virtual bool | eof () const
| Returns true if the IO position has reached the end, otherwise false.
virtual std::string | path () const
| Returns the URL of the file.
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)
Public Member Functions inherited from Exiv2::BasicIo
virtual | ~BasicIo ()
| Destructor.
Public Attributes inherited from Exiv2::BasicIo
byte * | bigBlock_
| this is allocated and populated by mmap()
Protected Member Functions inherited from Exiv2::RemoteIo
| RemoteIo ()
| Default Constructor.
Protected Member Functions inherited from Exiv2::BasicIo
| BasicIo ()
| Default Constructor.
Protected Attributes inherited from Exiv2::RemoteIo
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`
| ) |  |

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

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.

References Exiv2::RemoteIo::p_.

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

- basicio.hpp
- basicio.cpp