mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Handle content disposition and add helper to set the content type in a content.
This commit is contained in:
parent
27f2dff83f
commit
9a73bbc894
2 changed files with 20 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ class ContentPrivate : public ClonableObjectPrivate {
|
|||
public:
|
||||
vector<char> body;
|
||||
ContentType contentType;
|
||||
string contentDisposition;
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
@ -76,6 +77,21 @@ void Content::setContentType (const ContentType &contentType) {
|
|||
d->contentType = contentType;
|
||||
}
|
||||
|
||||
void Content::setContentType (const string &contentType) {
|
||||
L_D(Content);
|
||||
d->contentType = ContentType(contentType);
|
||||
}
|
||||
|
||||
const string &Content::getContentDisposition () const {
|
||||
L_D(const Content);
|
||||
return d->contentDisposition;
|
||||
}
|
||||
|
||||
void Content::setContentDisposition (const string &contentDisposition) {
|
||||
L_D(Content);
|
||||
d->contentDisposition = contentDisposition;
|
||||
}
|
||||
|
||||
const std::vector<char> &Content::getBody () const {
|
||||
L_D(const Content);
|
||||
return d->body;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ public:
|
|||
|
||||
const ContentType &getContentType () const;
|
||||
void setContentType (const ContentType &contentType);
|
||||
void setContentType (const std::string &contentType);
|
||||
|
||||
const std::string &getContentDisposition () const;
|
||||
void setContentDisposition (const std::string &contentDisposition);
|
||||
|
||||
const std::vector<char> &getBody () const;
|
||||
std::string getBodyAsString () const;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue