Internal Pimpl abstract structure of class RemoteIo.
More...
|
| Impl (const std::string &path, size_t blockSize) |
| Constructor.
|
|
virtual | ~Impl () |
| Destructor. Releases all managed memory.
|
|
virtual long | getFileLength ()=0 |
| Get the length (in bytes) of the remote file. More...
|
|
virtual void | getDataByRange (long lowBlock, long highBlock, std::string &response)=0 |
| Get the data by range. More...
|
|
virtual void | writeRemote (const byte *data, size_t size, long from, long 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. More...
|
|
virtual size_t | populateBlocks (size_t lowBlock, size_t highBlock) |
| Get the data from the remote machine and write them to the memory blocks. More...
|
|
Internal Pimpl abstract structure of class RemoteIo.
◆ getDataByRange()
virtual void Exiv2::RemoteIo::Impl::getDataByRange |
( |
long |
lowBlock, |
|
|
long |
highBlock, |
|
|
std::string & |
response |
|
) |
| |
|
pure virtual |
Get the data by range.
- Parameters
-
lowBlock | The start block index. |
highBlock | The end block index. |
response | The data from the server. |
- Exceptions
-
Error | if the server returns the error code. |
- Note
- Set lowBlock = -1 and highBlock = -1 to get the whole file content.
Implemented in Exiv2::HttpIo::HttpImpl.
Referenced by Exiv2::RemoteIo::open().
◆ getFileLength()
virtual long Exiv2::RemoteIo::Impl::getFileLength |
( |
| ) |
|
|
pure virtual |
Get the length (in bytes) of the remote file.
- Returns
- Return -1 if the size is unknown. Otherwise it returns the length of remote file (in bytes).
- Exceptions
-
Error | if the server returns the error code. |
Implemented in Exiv2::HttpIo::HttpImpl.
Referenced by Exiv2::RemoteIo::open().
◆ populateBlocks()
size_t Exiv2::RemoteIo::Impl::populateBlocks |
( |
size_t |
lowBlock, |
|
|
size_t |
highBlock |
|
) |
| |
|
virtual |
◆ writeRemote()
virtual void Exiv2::RemoteIo::Impl::writeRemote |
( |
const byte * |
data, |
|
|
size_t |
size, |
|
|
long |
from, |
|
|
long |
to |
|
) |
| |
|
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.
- 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. |
- Note
- The write access is available on some protocols. HTTP and HTTPS require the script file on the remote machine to handle the data. SSH requires the permission to edit the file.
- Exceptions
-
Implemented in Exiv2::HttpIo::HttpImpl.
Referenced by Exiv2::RemoteIo::write().
The documentation for this class was generated from the following file: