Commit 265a9d10 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Introduce KMime::Content::headers()

A simple getter to get a vector of all headers in a part.

Differential Revision: https://phabricator.kde.org/D7075
parent 232642f2
cmake_minimum_required(VERSION 3.0)
set(PIM_VERSION "5.6.40")
set(PIM_VERSION "5.6.41")
project(KMime VERSION ${PIM_VERSION})
......
......@@ -615,6 +615,11 @@ void Content::changeEncoding(Headers::contentEncoding e)
}
}
QVector<Headers::Base*> Content::headers() const
{
return d_ptr->headers;
}
Headers::Base *Content::headerByType(const char *type) const
{
Q_ASSERT(type && *type);
......
......@@ -247,6 +247,12 @@ public:
*/
void setHead(const QByteArray &head);
/**
* Returns all headers.
* @since 5.7
*/
QVector<Headers::Base*> headers() const;
/**
Returns the first header of type @p type, if it exists. Otherwise returns 0.
Note that the returned header may be empty.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment