Crashpad

Public Member Functions | List of all members
crashpad::FileHTTPBodyStream Class Reference

An implementation of HTTPBodyStream that reads from the specified file and provides its contents for an HTTP body. More...

`#include "util/net/http_body.h"`

Inheritance diagram for crashpad::FileHTTPBodyStream:

## Public Member Functions
| FileHTTPBodyStream (const base::FilePath &path)
| Creates a stream for reading the file at the specified path. 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 reads from the specified file and provides its contents for an HTTP body.

## Constructor & Destructor Documentation

## ◆ FileHTTPBodyStream()

crashpad::FileHTTPBodyStream::FileHTTPBodyStream | ( | const base::FilePath & | path | ) |
| explicit

Creates a stream for reading the file at the specified path.

Parameters

  [in] | path | The file from which this HTTPBodyStream will read.

## Member Function Documentation

## ◆ GetBytesBuffer()

FileOperationResult crashpad::FileHTTPBodyStream::GetBytesBuffer | ( | uint8_t * | buffer,
|  | size_t | max_len
| ) |  |
| override virtual

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

Parameters

  [out] | buffer | A user-supplied buffer into which this method will copy bytes from the stream.
  [in] | max_len | The 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:

- util/net/http_body.h
- util/net/http_body.cc