InMemoryPartReader.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/web/mime/multipart/InMemoryPartReader.hpp"

InMemoryPartReader

In memory part reader.

namespace oatpp { namespace web { namespace mime { namespace multipart { 
  class InMemoryPartReader : public PartReader {}
}}}}

Methods

Return Type Name Summary
[none] InMemoryPartReader Constructor.
void onNewPart Called when new part headers are parsed and part object is created.
void onPartData Called on each new chunk of data is parsed for the multipart-part.

InMemoryPartReader::InMemoryPartReader

Constructor.

  • @param maxDataSize

InMemoryPartReader(data::v_io_size maxDataSize = 64 * 1024)

InMemoryPartReader::onNewPart

Called when new part headers are parsed and part object is created.

  • @param part

void onNewPart(const std::shared_ptr<Part>& part) override

InMemoryPartReader::onPartData

Called on each new chunk of data is parsed for the multipart-part.
When all data is read, called again with data == nullptr size == 0 to indicate end of the part.

  • @param part
  • @param data - pointer to buffer containing chunk data.
  • @param size - size of the buffer.

void onPartData(const std::shared_ptr<Part>& part, p_char8 data, oatpp::data::v_io_size size) override

AsyncInMemoryPartReader

Async in memory part reader.

namespace oatpp { namespace web { namespace mime { namespace multipart { 
  class AsyncInMemoryPartReader : public AsyncPartReader {}
}}}}

Methods

Return Type Name Summary
[none] AsyncInMemoryPartReader Constructor.
async::CoroutineStarter onNewPartAsync Called when new part headers are parsed and part object is created.
async::CoroutineStarter onPartDataAsync Called on each new chunk of data is parsed for the multipart-part.

AsyncInMemoryPartReader::AsyncInMemoryPartReader

Constructor.

  • @param maxDataSize

AsyncInMemoryPartReader(data::v_io_size maxDataSize = 64 * 1024)

AsyncInMemoryPartReader::onNewPartAsync

Called when new part headers are parsed and part object is created.

async::CoroutineStarter onNewPartAsync(const std::shared_ptr<Part>& part) override

AsyncInMemoryPartReader::onPartDataAsync

Called on each new chunk of data is parsed for the multipart-part.
When all data is read, called again with data == nullptr size == 0 to indicate end of the part.

async::CoroutineStarter onPartDataAsync(const std::shared_ptr<Part>& part, p_char8 data, oatpp::data::v_io_size size) override

createInMemoryPartReader

Namespace: oatpp::web::mime::multipart

Create in-memory part reader.

std::shared_ptr<PartReader> createInMemoryPartReader(data::v_io_size maxDataSize = 64 * 1024)

createAsyncInMemoryPartReader

Namespace: oatpp::web::mime::multipart

Create in-memory part reader.

std::shared_ptr<AsyncPartReader> createAsyncInMemoryPartReader(data::v_io_size maxDataSize = 64 * 1024)