17#ifndef MS_HTTP_CLIENT_MIME_HPP
18#define MS_HTTP_CLIENT_MIME_HPP
24namespace matrix_science
32 class MS_MASCOTRESFILE_API ms_http_client_mime_item
35 ms_http_client_mime_item();
36 ms_http_client_mime_item(
const std::string & name,
const std::string & value);
37 ms_http_client_mime_item(
const std::string & name,
const std::string & value,
const std::string & filename,
const std::string & contentType);
39 std::string name()
const;
40 std::string value()
const;
41 bool hasFilename()
const;
42 std::string filename()
const;
43 std::string contentType()
const;
45 void setName(
const std::string & name);
46 void setValue(
const std::string & value);
47 void setValueWithFilename(
const std::string & value,
const std::string & filename,
const std::string & contentType);
53 std::string filename_;
54 std::string contentType_;
80 static std::string formatHeader(
81 const std::string & boundary,
82 ContentType contentType);
88 void append(
const std::string & name,
const std::string & value);
91 void appendFile(
const std::string & name,
const std::string & filename,
const std::string & contentType,
const std::string & prefixData =
"");
96 int count()
const {
return getCount(); }
100 std::string getName(
int oneBasedIndex)
const;
101 std::string name(
int oneBasedIndex)
const {
return getName(oneBasedIndex); }
104 std::string getValue(
int oneBasedIndex)
const;
105 std::string value(
int oneBasedIndex)
const {
return getValue(oneBasedIndex); }
108 bool hasFilename(
int oneBasedIndex)
const;
111 std::string getFilename(
int oneBasedIndex)
const;
112 std::string filename(
int oneBasedIndex)
const {
return getFilename(oneBasedIndex); }
116 void setValue(
int oneBasedIndex,
const std::string & value);
119 void setValueWithFilename(
int oneBasedIndex,
const std::string & value,
const std::string & filename,
const std::string & contentType);
123 void erase(
int oneBasedIndex);
127 const std::string & boundary,
128 matrix_science::ms_http_client_mime::Continuation continuation)
const;
131 std::vector<ms_http_client_mime_item> items_;
The class eases the building of a MIME section.
Definition: ms_http_client_mime.hpp:67