00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KIMAP_GETMETADATAJOB_H
00021 #define KIMAP_GETMETADATAJOB_H
00022
00023 #include "kimap_export.h"
00024
00025 #include "metadatajobbase.h"
00026
00027 namespace KIMAP {
00028
00029 class Session;
00030 struct Message;
00031 class GetMetaDataJobPrivate;
00032
00061 class KIMAP_EXPORT GetMetaDataJob : public MetaDataJobBase
00062 {
00063 Q_OBJECT
00064 Q_DECLARE_PRIVATE( GetMetaDataJob )
00065
00066 friend class SessionPrivate;
00067
00068 public:
00069 explicit GetMetaDataJob( Session *session );
00070 virtual ~GetMetaDataJob();
00071
00075 enum Depth {
00076 NoDepth = 0,
00077 OneLevel,
00078 AllLevels
00079 };
00080
00081 Q_DECLARE_FLAGS( Depths, Depth )
00082
00083
00096 void addEntry( const QByteArray &entry, const QByteArray &attribute = QByteArray() );
00097
00115 void setMaximumSize( qint64 size );
00116
00137 void setDepth( Depth depth );
00138
00158
00159
00160 QByteArray metaData( const QString &mailBox, const QByteArray &entry,
00161 const QByteArray &attribute = QByteArray() ) const;
00162
00184
00185
00186 QMap<QByteArray, QMap<QByteArray, QByteArray> > allMetaData( const QString &mailBox ) const;
00187
00188 protected:
00189 virtual void doStart();
00190 virtual void handleResponse( const Message &response );
00191
00192 };
00193
00194 }
00195
00196 #endif