![]() |
Exiv2
|
Internal Pimpl abstract structure of class RemoteIo. More...
Public Member Functions | |
| Impl (const std::string &url, size_t blockSize) | |
| Constructor. | |
| virtual | ~Impl () |
| Destructor. Releases all managed memory. | |
| Impl (const Impl &)=delete | |
| Impl & | operator= (const Impl &)=delete |
| virtual int64_t | getFileLength ()=0 |
| Get the length (in bytes) of the remote file. | |
| virtual void | getDataByRange (size_t lowBlock, size_t highBlock, std::string &response)=0 |
| Get the data by range. | |
| virtual void | writeRemote (const byte *data, size_t size, size_t from, size_t to)=0 |
| Submit the data to the remote machine. The data replace a part of the remote file. The replaced part of remote file is indicated by from and to parameters. | |
| virtual size_t | populateBlocks (size_t lowBlock, size_t highBlock) |
| Get the data from the remote machine and write them to the memory blocks. | |
Public Attributes | |
| std::string | path_ |
| (Standard) path | |
| size_t | blockSize_ |
| Size of the block memory. | |
| BlockMap * | blocksMap_ {nullptr} |
| An array contains all blocksMap. | |
| size_t | size_ {0} |
| The file size. | |
| size_t | idx_ {0} |
| Index into the memory area. | |
| bool | isMalloced_ {false} |
| Was the blocksMap_ allocated? | |
| bool | eof_ {false} |
| EOF indicator. | |
| Protocol | protocol_ |
| the protocol of url | |
| size_t | totalRead_ {0} |
| bytes requested from host | |
| Exiv2::RemoteIo::Impl::Impl | ( | const std::string & | url, |
| size_t | blockSize ) |
Constructor.
References blockSize_, Exiv2::fileProtocol(), path_, and protocol_.
|
virtual |
Destructor. Releases all managed memory.
References blocksMap_.
|
pure virtual |
Get the data by range.
| lowBlock | The start block index. |
| highBlock | The end block index. |
| response | The data from the server. |
| Error | if the server returns the error code. |
Referenced by Exiv2::RemoteIo::open(), and populateBlocks().
|
pure virtual |
Get the length (in bytes) of the remote file.
| Error | if the server returns the error code. |
Referenced by Exiv2::RemoteIo::open().
|
virtual |
Get the data from the remote machine and write them to the memory blocks.
| lowBlock | The start block index. |
| highBlock | The end block index. |
| Error | if it fails. |
References blockSize_, blocksMap_, Exiv2::Error::Error(), getDataByRange(), and size_.
Referenced by Exiv2::RemoteIo::getb(), Exiv2::RemoteIo::read(), and writeRemote().
|
pure virtual |
Submit the data to the remote machine. The data replace a part of the remote file. The replaced part of remote file is indicated by from and to parameters.
| data | The data are submitted to the remote machine. |
| size | The size of data. |
| from | The start position in the remote file where the data replace. |
| to | The end position in the remote file where the data replace. |
| Error | if it fails. |
References populateBlocks(), and Exiv2::RemoteIo::size().
Referenced by Exiv2::RemoteIo::write().
| size_t Exiv2::RemoteIo::Impl::blockSize_ |
Size of the block memory.
Referenced by Exiv2::RemoteIo::getb(), Impl(), Exiv2::RemoteIo::mmap(), Exiv2::RemoteIo::open(), populateBlocks(), Exiv2::RemoteIo::populateFakeData(), Exiv2::RemoteIo::read(), and Exiv2::RemoteIo::write().
| BlockMap* Exiv2::RemoteIo::Impl::blocksMap_ {nullptr} |
An array contains all blocksMap.
Referenced by Exiv2::RemoteIo::getb(), Exiv2::RemoteIo::mmap(), Exiv2::RemoteIo::open(), populateBlocks(), Exiv2::RemoteIo::populateFakeData(), Exiv2::RemoteIo::read(), Exiv2::RemoteIo::write(), and ~Impl().
| bool Exiv2::RemoteIo::Impl::eof_ {false} |
EOF indicator.
Referenced by Exiv2::RemoteIo::close(), Exiv2::RemoteIo::eof(), Exiv2::RemoteIo::getb(), Exiv2::RemoteIo::read(), and Exiv2::RemoteIo::seek().
| size_t Exiv2::RemoteIo::Impl::idx_ {0} |
Index into the memory area.
Referenced by Exiv2::RemoteIo::close(), Exiv2::RemoteIo::getb(), Exiv2::RemoteIo::read(), Exiv2::RemoteIo::seek(), and Exiv2::RemoteIo::tell().
| bool Exiv2::RemoteIo::Impl::isMalloced_ {false} |
Was the blocksMap_ allocated?
Referenced by Exiv2::RemoteIo::close(), Exiv2::RemoteIo::isopen(), and Exiv2::RemoteIo::open().
| std::string Exiv2::RemoteIo::Impl::path_ |
(Standard) path
Referenced by Impl(), and Exiv2::RemoteIo::path().
| size_t Exiv2::RemoteIo::Impl::size_ {0} |
| size_t Exiv2::RemoteIo::Impl::totalRead_ {0} |
bytes requested from host
Referenced by Exiv2::RemoteIo::close(), and Exiv2::RemoteIo::read().