#include <MultipartData.h>
Definition at line 26 of file MultipartData.h.
◆ MultipartData() [1/2]
audacity::network_manager::MultipartData::MultipartData |
( |
| ) |
|
|
default |
◆ MultipartData() [2/2]
audacity::network_manager::MultipartData::MultipartData |
( |
const MultipartData & |
| ) |
|
|
delete |
◆ Add() [1/2]
void audacity::network_manager::MultipartData::Add |
( |
std::string_view |
name, |
|
|
std::string_view |
contentType, |
|
|
const void * |
value, |
|
|
size_t |
size |
|
) |
| |
Definition at line 186 of file MultipartData.cpp.
189{
190 mParts.emplace_back(std::make_unique<ByteBufferPart>(value,
size));
191
192 mParts.back()->SetContentDisposition(
"form-data; name=\"" + std::string(
name) +
"\"");
193
194 if (!contentType.empty())
195 mParts.back()->SetContentType(std::string(contentType));
196}
std::vector< std::unique_ptr< Part > > mParts
References mParts, name, and size.
◆ Add() [2/2]
void audacity::network_manager::MultipartData::Add |
( |
std::string_view |
name, |
|
|
std::string_view |
value |
|
) |
| |
Definition at line 181 of file MultipartData.cpp.
182{
183 Add(
name, {}, value.data(), value.length());
184}
void Add(std::string_view name, std::string_view value)
References Add(), and name.
Referenced by Add().
◆ AddFile()
void audacity::network_manager::MultipartData::AddFile |
( |
std::string_view |
name, |
|
|
std::string_view |
contentType, |
|
|
const wxFileName & |
fileName |
|
) |
| |
Definition at line 198 of file MultipartData.cpp.
201{
202 mParts.emplace_back(std::make_unique<FilePart>(fileName));
203
204 mParts.back()->SetContentDisposition(
205 "form-data; name=\"" + std::string(
name) +
"\"; filename=\"" +
206 fileName.GetFullName().ToUTF8().data() + "\"");
207
208 if (!contentType.empty())
209 mParts.back()->SetContentType(std::string(contentType));
210}
References mParts, and name.
◆ GetPart() [1/2]
◆ GetPart() [2/2]
const MultipartData::Part * audacity::network_manager::MultipartData::GetPart |
( |
size_t |
idx | ) |
const |
◆ GetPartsCount()
size_t audacity::network_manager::MultipartData::GetPartsCount |
( |
| ) |
const |
◆ IsEmpty()
bool audacity::network_manager::MultipartData::IsEmpty |
( |
| ) |
const |
◆ operator=()
◆ mParts
std::vector<std::unique_ptr<Part> > audacity::network_manager::MultipartData::mParts |
|
private |
The documentation for this class was generated from the following files: