Allow MIME lines to build only the content part of the line without header.
git-svn-id: http://voip.null.ro/svn/yate@5531 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
24e89ec1b0
commit
27501cbced
|
@ -104,9 +104,11 @@ MimeHeaderLine* MimeHeaderLine::clone(const char* newName) const
|
|||
return new MimeHeaderLine(*this,newName);
|
||||
}
|
||||
|
||||
void MimeHeaderLine::buildLine(String& line) const
|
||||
void MimeHeaderLine::buildLine(String& line, bool header) const
|
||||
{
|
||||
line << name() << ": " << *this;
|
||||
if (header)
|
||||
line << name() << ": ";
|
||||
line << *this;
|
||||
const ObjList* p = &m_params;
|
||||
for (; p; p = p->next()) {
|
||||
NamedString* s = static_cast<NamedString*>(p->get());
|
||||
|
@ -326,9 +328,11 @@ MimeHeaderLine* MimeAuthLine::clone(const char* newName) const
|
|||
return new MimeAuthLine(*this,newName);
|
||||
}
|
||||
|
||||
void MimeAuthLine::buildLine(String& line) const
|
||||
void MimeAuthLine::buildLine(String& line, bool header) const
|
||||
{
|
||||
line << name() << ": " << *this;
|
||||
if (header)
|
||||
line << name() << ": ";
|
||||
line << *this;
|
||||
const ObjList* p = &m_params;
|
||||
for (bool first = true; p; p = p->next()) {
|
||||
NamedString* s = static_cast<NamedString*>(p->get());
|
||||
|
|
|
@ -84,8 +84,9 @@ public:
|
|||
/**
|
||||
* Build a string line from this MIME header without adding a line separator
|
||||
* @param line Destination string
|
||||
* @param header True to add the header in front of line text
|
||||
*/
|
||||
virtual void buildLine(String& line) const;
|
||||
virtual void buildLine(String& line, bool header = true) const;
|
||||
|
||||
/**
|
||||
* Assignement operator. Set the header's value
|
||||
|
@ -223,8 +224,10 @@ public:
|
|||
/**
|
||||
* Build a string line from this MIME header without adding a line separator
|
||||
* @param line Destination string
|
||||
* @param header True to add the header in front of line text
|
||||
*/
|
||||
virtual void buildLine(String& line) const;
|
||||
virtual void buildLine(String& line, bool header = true) const;
|
||||
|
||||
private:
|
||||
void operator=(const MimeAuthLine&); // no assignment
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue