KIMAP Library
getmetadatajob.h
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
00033 class KIMAP_EXPORT GetMetaDataJob : public MetaDataJobBase
00034 {
00035 Q_OBJECT
00036 Q_DECLARE_PRIVATE(GetMetaDataJob)
00037
00038 friend class SessionPrivate;
00039
00040 public:
00041 explicit GetMetaDataJob( Session *session );
00042 virtual ~GetMetaDataJob();
00043
00044 enum Depth {
00045 NoDepth = 0,
00046 OneLevel,
00047 AllLevels
00048 };
00049
00050 Q_DECLARE_FLAGS(Depths, Depth)
00051
00052
00057 void addEntry(const QByteArray &entry, const QByteArray &attribute = QByteArray());
00058
00063 void setMaximumSize(qint64 size);
00064
00069 void setDepth(Depth depth);
00070
00078 QByteArray metaData(const QString &mailBox, const QByteArray &entry,
00079 const QByteArray &attribute = QByteArray()) const;
00080
00087 QMap<QByteArray, QMap<QByteArray, QByteArray> > allMetaData(const QString &mailBox) const;
00088
00089 protected:
00090 virtual void doStart();
00091 virtual void handleResponse( const Message &response );
00092
00093 };
00094
00095 }
00096
00097 #endif