Exiv2
Public Member Functions | Public Attributes | Protected Member Functions

Exiv2::HttpIo::HttpImpl Class Reference

Internal Pimpl structure of class HttpIo. More...

Inheritance diagram for Exiv2::HttpIo::HttpImpl:
Collaboration diagram for Exiv2::HttpIo::HttpImpl:

List of all members.

Public Member Functions

 HttpImpl (const std::string &path, size_t blockSize)
 Constructor.
long getFileLength ()
 Get the length (in bytes) of the remote file.
void getDataByRange (long lowBlock, long highBlock, std::string &response)
 Get the data by range.
void writeRemote (const byte *data, size_t size, long from, long to)
 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.

Public Attributes

Exiv2::Uri hostInfo_
 the host information extracted from the path

Protected Member Functions

 HttpImpl (const HttpImpl &rhs)
 Copy constructor.
HttpImpl & operator= (const HttpImpl &rhs)
 Assignment.

Detailed Description

Internal Pimpl structure of class HttpIo.


Member Function Documentation

void Exiv2::HttpIo::HttpImpl::getDataByRange ( long  lowBlock,
long  highBlock,
std::string &  response 
) [virtual]

Get the data by range.

Parameters:
lowBlockThe start block index.
highBlockThe end block index.
responseThe data from the server.
Exceptions:
Errorif the server returns the error code.
Note:
Set lowBlock = -1 and highBlock = -1 to get the whole file content.

Implements Exiv2::RemoteIo::Impl.

References Exiv2::string.

long Exiv2::HttpIo::HttpImpl::getFileLength ( ) [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:
Errorif the server returns the error code.

Implements Exiv2::RemoteIo::Impl.

References Exiv2::string.

void Exiv2::HttpIo::HttpImpl::writeRemote ( const byte *  data,
size_t  size,
long  from,
long  to 
) [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:
dataThe data are submitted to the remote machine.
sizeThe size of data.
fromThe start position in the remote file where the data replace.
toThe end position in the remote file where the data replace.
Note:
The data are submitted to the remote machine via POST. This requires the script file on the remote machine to receive the data and edit the remote file. The server-side script may be specified with the environment string EXIV2_HTTP_POST. The default value is "/exiv2.php". More info is available at http://dev.exiv2.org/wiki/exiv2
Exceptions:
Errorif it fails.

Implements Exiv2::RemoteIo::Impl.

References Exiv2::base64encode(), Exiv2::getEnv(), Exiv2::Uri::Host, Exiv2::Uri::Parse(), Exiv2::Uri::Path, Exiv2::Uri::Port, Exiv2::string, and Exiv2::urlencode().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines