00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KIMAP_SETMETADATAJOB_H
00021 #define KIMAP_SETMETADATAJOB_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 SetMetaDataJobPrivate;
00032
00068 class KIMAP_EXPORT SetMetaDataJob : public MetaDataJobBase
00069 {
00070 Q_OBJECT
00071 Q_DECLARE_PRIVATE(SetMetaDataJob)
00072
00073 friend class SessionPrivate;
00074
00075 public:
00076 explicit SetMetaDataJob( Session *session );
00077 virtual ~SetMetaDataJob();
00078
00136 void addMetaData(const QByteArray &name, const QByteArray &value);
00137
00167
00168
00169
00170
00171
00172
00173
00174 void setEntry(const QByteArray &entry);
00175
00179 enum MetaDataError {
00180 NoError = 0,
00181 TooMany = 1,
00182 TooBig = 2,
00183 NoPrivate = 4
00184 };
00185
00186
00187 Q_DECLARE_FLAGS(MetaDataErrors, MetaDataError)
00188
00189
00194 MetaDataErrors metaDataErrors() const;
00204 qint64 maxAcceptedSize();
00205
00206 protected:
00207 virtual void doStart();
00208 virtual void handleResponse( const Message &response );
00209
00210 };
00211
00212 }
00213
00214 Q_DECLARE_OPERATORS_FOR_FLAGS( KIMAP::SetMetaDataJob::MetaDataErrors )
00215
00216 #endif