KIMAP Library
20 #ifndef KIMAP_MESSAGE_P_H
21 #define KIMAP_MESSAGE_P_H
23 #include <QtCore/QByteArray>
24 #include <QtCore/QList>
25 #include <QtCore/QMetaType>
34 enum Type { String = 0, List };
36 explicit Part(
const QByteArray &
string)
37 : m_type( String ), m_string( string ) { }
38 explicit Part(
const QList<QByteArray> &list)
39 : m_type( List ), m_list( list ) { }
41 inline Type type()
const {
return m_type; }
42 inline QByteArray toString()
const {
return m_string; }
43 inline QList<QByteArray> toList()
const {
return m_list; }
48 QList<QByteArray> m_list;
51 inline QByteArray toString()
const
55 foreach (
const Part &part, content ) {
56 if ( part.type() == Part::List ) {
58 foreach (
const QByteArray &item, part.toList() ) {
64 result += part.toString() +
' ';
68 if ( !responseCode.isEmpty() ) {
70 foreach (
const Part &part, responseCode ) {
71 if ( part.type() == Part::List ) {
73 foreach (
const QByteArray &item, part.toList() ) {
79 result+= part.toString() +
' ';
89 QList<Part> responseCode;
94 Q_DECLARE_METATYPE( KIMAP::Message )
95 static const
int _kimap_messageTypeId = qRegisterMetaType<KIMAP::Message>();
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:08 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.