maildir
maildir.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __MAILDIR_H__
00021 #define __MAILDIR_H__
00022
00023
00024 #include <maildir_export.h>
00025
00026 #include <QString>
00027 #include <QStringList>
00028
00029 namespace KPIM {
00030
00031 class MAILDIR_EXPORT Maildir
00032 {
00033 public:
00034 explicit Maildir( const QString& path = QString(), bool isRoot = false );
00035
00036 Maildir(const Maildir & rhs);
00037
00038 Maildir& operator=(const Maildir & rhs);
00040 bool operator==(const Maildir & rhs) const;
00041
00042 ~Maildir();
00043
00046 bool isValid() const;
00047
00053 bool isValid( QString &error ) const;
00054
00061 bool create();
00062
00066 QString path() const;
00067
00073 QStringList entryList() const;
00074
00079 QStringList subFolderList() const;
00080
00086 QString addSubFolder( const QString& folderName );
00087
00091 bool removeSubFolder( const QString& folderName );
00092
00098 Maildir subFolder( const QString& folderName );
00099
00103 QByteArray readEntry( const QString& key ) const;
00104
00108 QByteArray readEntryHeaders( const QString& key ) const;
00109
00114 void writeEntry( const QString& key, const QByteArray& data );
00115
00119 QString addEntry( const QByteArray& data );
00120
00124 bool removeEntry( const QString& key );
00125 private:
00126 void swap( const Maildir& );
00127 class Private;
00128 Private *d;
00129 };
00130
00131 }
00132 #endif // __MAILDIR_H__