Crashpad
Public Types | Public Member Functions | List of all members
crashpad::CompositeHTTPBodyStream Class Reference

An implementation of HTTPBodyStream that combines an array of several other HTTPBodyStream objects into a single, unified stream. More...

#include "util/net/http_body.h"

Inheritance diagram for crashpad::CompositeHTTPBodyStream:
crashpad::HTTPBodyStream

Public Types

using PartsList = std::vector< HTTPBodyStream * >
 

Public Member Functions

 CompositeHTTPBodyStream (const PartsList &parts)
 Creates a stream from an array of other stream parts. More...
 
FileOperationResult GetBytesBuffer (uint8_t *buffer, size_t max_len) override
 Copies up to max_len bytes into the user-supplied buffer. More...
 

Detailed Description

An implementation of HTTPBodyStream that combines an array of several other HTTPBodyStream objects into a single, unified stream.

Constructor & Destructor Documentation

◆ CompositeHTTPBodyStream()

crashpad::CompositeHTTPBodyStream::CompositeHTTPBodyStream ( const PartsList &  parts)
explicit

Creates a stream from an array of other stream parts.

Parameters
[in]partsA vector of HTTPBodyStream objects, of which this object takes ownership, that will be represented as a single unified stream. Callers should not mutate the stream objects after passing them to an instance of this class.

Member Function Documentation

◆ GetBytesBuffer()

FileOperationResult crashpad::CompositeHTTPBodyStream::GetBytesBuffer ( uint8_t *  buffer,
size_t  max_len 
)
overridevirtual

Copies up to max_len bytes into the user-supplied buffer.

Parameters
[out]bufferA user-supplied buffer into which this method will copy bytes from the stream.
[in]max_lenThe length (or size) of buffer. At most this many bytes will be copied.
Returns
On success, a positive number indicating the number of bytes actually copied to buffer. On failure, a negative number. When the stream has no more data, returns 0.

Implements crashpad::HTTPBodyStream.


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