diff --git a/kimap/acljobbase.h b/kimap/acljobbase.h index b491dd291..3bc1e1ac7 100644 --- a/kimap/acljobbase.h +++ b/kimap/acljobbase.h @@ -1,64 +1,64 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_ACLJOBBASE_H #define KIMAP_ACLJOBBASE_H #include "kimap_export.h" #include "acl.h" #include "job.h" namespace KIMAP { class Session; -class Message; +struct Message; class AclJobBasePrivate; /** @short Base class of Acl related jobs. It cannot be used directly, you must subclass it and reimplement at least the doStart() method. */ class KIMAP_EXPORT AclJobBase : public Job { Q_OBJECT Q_DECLARE_PRIVATE(AclJobBase) friend class SessionPrivate; public: AclJobBase( Session *session ); virtual ~AclJobBase(); enum AclModifier { Add = 0, Remove, Change }; void setMailBox( const QString &mailBox ); QString mailBox() const; protected: explicit AclJobBase( JobPrivate &dd ); }; } #endif diff --git a/kimap/appendjob.h b/kimap/appendjob.h index 27440b0b8..d1919bb2e 100644 --- a/kimap/appendjob.h +++ b/kimap/appendjob.h @@ -1,62 +1,62 @@ /* Copyright (c) 2009 Kevin Ottens This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_APPENDJOB_H #define KIMAP_APPENDJOB_H #include "kimap_export.h" #include "job.h" namespace KIMAP { class Session; -class Message; +struct Message; class AppendJobPrivate; class KIMAP_EXPORT AppendJob : public Job { Q_OBJECT Q_DECLARE_PRIVATE(AppendJob) friend class SessionPrivate; public: AppendJob( Session *session ); virtual ~AppendJob(); void setMailBox( const QString &mailBox ); QString mailBox() const; void setFlags( const QList &flags); QList flags() const; void setContent( const QByteArray &content ); QByteArray content() const; qint64 uid() const; protected: virtual void doStart(); virtual void handleResponse(const Message &response); }; } #endif diff --git a/kimap/capabilitiesjob.h b/kimap/capabilitiesjob.h index 9ecf7ebda..8262f2f12 100644 --- a/kimap/capabilitiesjob.h +++ b/kimap/capabilitiesjob.h @@ -1,56 +1,56 @@ /* Copyright (c) 2009 Kevin Ottens This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_CAPABILITIESJOB_H #define KIMAP_CAPABILITIESJOB_H #include "kimap_export.h" #include "job.h" namespace KIMAP { class Session; -class Message; +struct Message; class CapabilitiesJobPrivate; class KIMAP_EXPORT CapabilitiesJob : public Job { Q_OBJECT Q_DECLARE_PRIVATE(CapabilitiesJob) friend class SessionPrivate; public: CapabilitiesJob( Session *session ); virtual ~CapabilitiesJob(); QStringList capabilities() const; Q_SIGNALS: void capabilitiesReceived( const QStringList &capabilities ); protected: virtual void doStart(); virtual void handleResponse( const Message &response ); }; } #endif diff --git a/kimap/closejob.h b/kimap/closejob.h index 3392e83e6..6affb2bf8 100644 --- a/kimap/closejob.h +++ b/kimap/closejob.h @@ -1,50 +1,50 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_CLOSEJOB_H #define KIMAP_CLOSEJOB_H #include "kimap_export.h" #include "job.h" namespace KIMAP { class Session; -class Message; +struct Message; class CloseJobPrivate; class KIMAP_EXPORT CloseJob : public Job { Q_OBJECT Q_DECLARE_PRIVATE(CloseJob) friend class SessionPrivate; public: explicit CloseJob( Session *session ); virtual ~CloseJob(); protected: virtual void doStart(); }; } #endif diff --git a/kimap/copyjob.h b/kimap/copyjob.h index 9c37b54aa..608f9dd91 100644 --- a/kimap/copyjob.h +++ b/kimap/copyjob.h @@ -1,57 +1,57 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_COPYJOB_H #define KIMAP_COPYJOB_H #include "kimap_export.h" #include "job.h" #include "imapset.h" namespace KIMAP { class Session; -class Message; +struct Message; class CopyJobPrivate; class KIMAP_EXPORT CopyJob : public Job { Q_OBJECT Q_DECLARE_PRIVATE(CopyJob) friend class SessionPrivate; public: explicit CopyJob( Session *session ); virtual ~CopyJob(); void setMailBox( const QString &mailBox ); QString mailBox() const; void setSequenceSet( const ImapSet &set ); ImapSet sequenceSet() const; protected: virtual void doStart(); }; } #endif diff --git a/kimap/createjob.h b/kimap/createjob.h index 14fe82ebf..d55d5888f 100644 --- a/kimap/createjob.h +++ b/kimap/createjob.h @@ -1,53 +1,53 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_CREATEJOB_H #define KIMAP_CREATEJOB_H #include "kimap_export.h" #include "job.h" namespace KIMAP { class Session; -class Message; +struct Message; class CreateJobPrivate; class KIMAP_EXPORT CreateJob : public Job { Q_OBJECT Q_DECLARE_PRIVATE(CreateJob) friend class SessionPrivate; public: explicit CreateJob( Session *session ); virtual ~CreateJob(); void setMailBox( const QString &mailBox ); QString mailBox() const; protected: virtual void doStart(); }; } #endif diff --git a/kimap/deleteacljob.h b/kimap/deleteacljob.h index a0f93646e..6802ee8d5 100644 --- a/kimap/deleteacljob.h +++ b/kimap/deleteacljob.h @@ -1,55 +1,55 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_DELETEACLJOB_H #define KIMAP_DELETEACLJOB_H #include "kimap_export.h" #include "acljobbase.h" namespace KIMAP { class Session; -class Message; +struct Message; class DeleteAclJobPrivate; class KIMAP_EXPORT DeleteAclJob : public AclJobBase { Q_OBJECT Q_DECLARE_PRIVATE(DeleteAclJob) friend class SessionPrivate; public: explicit DeleteAclJob( Session *session ); virtual ~DeleteAclJob(); void setIdentifier( const QByteArray &identifier ); QByteArray identifier(); protected: virtual void doStart(); }; } #endif diff --git a/kimap/expungejob.h b/kimap/expungejob.h index 365cd6294..7f91eac83 100644 --- a/kimap/expungejob.h +++ b/kimap/expungejob.h @@ -1,51 +1,51 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_EXPUNGEJOB_H #define KIMAP_EXPUNGEJOB_H #include "kimap_export.h" #include "job.h" namespace KIMAP { class Session; -class Message; +struct Message; class ExpungeJobPrivate; class KIMAP_EXPORT ExpungeJob : public Job { Q_OBJECT Q_DECLARE_PRIVATE(ExpungeJob) friend class SessionPrivate; public: explicit ExpungeJob( Session *session ); virtual ~ExpungeJob(); protected: virtual void doStart(); virtual void handleResponse(const Message &response); }; } #endif diff --git a/kimap/fetchjob.h b/kimap/fetchjob.h index ffe592b06..4e60714d4 100644 --- a/kimap/fetchjob.h +++ b/kimap/fetchjob.h @@ -1,102 +1,102 @@ /* Copyright (c) 2009 Kevin Ottens This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_FETCHJOB_H #define KIMAP_FETCHJOB_H #include "kimap_export.h" #include "imapset.h" #include "job.h" #include "kmime/kmime_content.h" #include "kmime/kmime_message.h" #include namespace KIMAP { class Session; -class Message; +struct Message; class FetchJobPrivate; typedef boost::shared_ptr ContentPtr; typedef QMap MessageParts; typedef boost::shared_ptr MessagePtr; typedef QList MessageFlags; class KIMAP_EXPORT FetchJob : public Job { Q_OBJECT Q_DECLARE_PRIVATE(FetchJob) friend class SessionPrivate; public: struct FetchScope { QList parts; // used only if mode == Headers or Content enum {Headers, Flags, Structure, Content} mode; }; explicit FetchJob( Session *session ); virtual ~FetchJob(); void setSequenceSet( const ImapSet &set ); ImapSet sequenceSet() const; void setUidBased(bool uidBased); bool isUidBased() const; void setScope( const FetchScope &scope ); FetchScope scope() const; QMap messages() const; QMap parts() const; QMap flags() const; QMap sizes() const; QMap uids() const; Q_SIGNALS: void headersReceived( const QString &mailBox, const QMap &uids, const QMap &sizes, const QMap &flags, const QMap &messages ); void messagesReceived( const QString &mailBox, const QMap &uids, const QMap &messages ); void partsReceived( const QString &mailBox, const QMap &uids, const QMap &parts ); protected: virtual void doStart(); virtual void handleResponse(const Message &response); private: Q_PRIVATE_SLOT( d_func(), void emitPendings() ) }; } #endif diff --git a/kimap/getacljob.h b/kimap/getacljob.h index b45dc41d5..aa8d90cee 100644 --- a/kimap/getacljob.h +++ b/kimap/getacljob.h @@ -1,59 +1,59 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_GETACLJOB_H #define KIMAP_GETACLJOB_H #include "kimap_export.h" #include "acljobbase.h" namespace KIMAP { class Session; -class Message; +struct Message; class GetAclJobPrivate; class KIMAP_EXPORT GetAclJob : public AclJobBase { Q_OBJECT Q_DECLARE_PRIVATE(GetAclJob) friend class SessionPrivate; public: explicit GetAclJob( Session *session ); virtual ~GetAclJob(); QList identifiers() const; bool hasRightEnabled(const QByteArray &identifier, Acl::Right right) const; Acl::Rights rights(const QByteArray &identifier) const; QMap allRights() const; protected: virtual void doStart(); virtual void handleResponse(const Message &response); }; } #endif diff --git a/kimap/getmetadatajob.h b/kimap/getmetadatajob.h index 98586759a..72c82a5b2 100644 --- a/kimap/getmetadatajob.h +++ b/kimap/getmetadatajob.h @@ -1,97 +1,97 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_GETMETADATAJOB_H #define KIMAP_GETMETADATAJOB_H #include "kimap_export.h" #include "metadatajobbase.h" namespace KIMAP { class Session; -class Message; +struct Message; class GetMetaDataJobPrivate; class KIMAP_EXPORT GetMetaDataJob : public MetaDataJobBase { Q_OBJECT Q_DECLARE_PRIVATE(GetMetaDataJob) friend class SessionPrivate; public: explicit GetMetaDataJob( Session *session ); virtual ~GetMetaDataJob(); enum Depth { NoDepth = 0, OneLevel, AllLevels }; Q_DECLARE_FLAGS(Depths, Depth) /** * Add an entry, attribute pair to query, if the job is operating in Annotatemore mode, the attribute name is used.In Metadata mode the @param attribute is ignored. * @param entry the metadata entry name * @param attribute the attribute name, in Annotatemore mode */ void addEntry(const QByteArray &entry, const QByteArray &attribute = QByteArray()); /** * Only entry values that are less than or equal in octet size to the specified @param size limit are returned. In * Annotatemore mode, this setting is ignored. */ void setMaximumSize(qint64 size); /** * Default is NoDepth. In Annotatemore mode, this setting is ignored. * @param depth */ void setDepth(Depth depth); /** * Get the metadata. If used in Metadata mode, @param attribute is ignored. * @param mailBox * @param entry * @param attribute * @return */ QByteArray metaData(const QString &mailBox, const QByteArray &entry, const QByteArray &attribute = QByteArray()) const; /** * Get all the metadata for a given mailbox. * * @param mailBox * @return */ QMap > allMetaData(const QString &mailBox) const; protected: virtual void doStart(); virtual void handleResponse( const Message &response ); }; } #endif diff --git a/kimap/getquotajob.h b/kimap/getquotajob.h index 14f7bcb16..adb1cc294 100644 --- a/kimap/getquotajob.h +++ b/kimap/getquotajob.h @@ -1,53 +1,53 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_GETQUOTAJOB_H #define KIMAP_GETQUOTAJOB_H #include "quotajobbase.h" namespace KIMAP { class Session; -class Message; +struct Message; class GetQuotaJobPrivate; class KIMAP_EXPORT GetQuotaJob : public QuotaJobBase { Q_OBJECT Q_DECLARE_PRIVATE(GetQuotaJob) friend class SessionPrivate; public: explicit GetQuotaJob( Session *session ); virtual ~GetQuotaJob(); void setRoot(const QByteArray &root); QByteArray root() const; protected: virtual void doStart(); virtual void handleResponse(const Message &response); }; } #endif diff --git a/kimap/getquotarootjob.h b/kimap/getquotarootjob.h index 5017ea7c8..7a9829255 100644 --- a/kimap/getquotarootjob.h +++ b/kimap/getquotarootjob.h @@ -1,59 +1,59 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_GETQUOTAROOTJOB_H #define KIMAP_GETQUOTAROOTJOB_H #include "quotajobbase.h" namespace KIMAP { class Session; -class Message; +struct Message; class GetQuotaRootJobPrivate; class KIMAP_EXPORT GetQuotaRootJob : public QuotaJobBase { Q_OBJECT Q_DECLARE_PRIVATE(GetQuotaRootJob) friend class SessionPrivate; public: explicit GetQuotaRootJob( Session *session ); virtual ~GetQuotaRootJob(); void setMailBox(const QString &mailBox); QString mailBox() const; QList roots() const; qint64 usage(const QByteArray &root, const QByteArray &resource) const; qint64 limit(const QByteArray &root, const QByteArray &resource) const; QMap allUsages(const QByteArray &root) const; QMap allLimits(const QByteArray &root) const; protected: virtual void doStart(); virtual void handleResponse(const Message &response); }; } #endif diff --git a/kimap/job.h b/kimap/job.h index 1d855df43..cf3679016 100644 --- a/kimap/job.h +++ b/kimap/job.h @@ -1,67 +1,67 @@ /* Copyright (c) 2009 Kevin Ottens This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_JOB_H #define KIMAP_JOB_H #include "kimap_export.h" #include namespace KIMAP { class Session; class SessionPrivate; class JobPrivate; -class Message; +struct Message; class KIMAP_EXPORT Job : public KJob { Q_OBJECT Q_DECLARE_PRIVATE(Job) friend class SessionPrivate; public: virtual ~Job(); virtual void start(); private: virtual void doStart() = 0; virtual void handleResponse(const Message &response); virtual void connectionLost(); protected: enum HandlerResponse { Handled = 0, NotHandled }; HandlerResponse handleErrorReplies(const Message &response); explicit Job( Session *session ); explicit Job( JobPrivate &dd ); JobPrivate *const d_ptr; }; } #endif diff --git a/kimap/listjob.h b/kimap/listjob.h index ffe7c5c30..99e694036 100644 --- a/kimap/listjob.h +++ b/kimap/listjob.h @@ -1,80 +1,80 @@ /* Copyright (c) 2009 Kevin Ottens This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_LISTJOB_H #define KIMAP_LISTJOB_H #include "kimap_export.h" #include "job.h" namespace KIMAP { class Session; -class Message; +struct Message; class ListJobPrivate; struct KIMAP_EXPORT MailBoxDescriptor { QString name; QChar separator; inline bool operator==(const MailBoxDescriptor &other) const { return other.name==name && other.separator==separator; } inline bool operator<(const MailBoxDescriptor &other) const { return other.name mailBoxes() const; QMap< MailBoxDescriptor, QList > flags() const; Q_SIGNALS: void mailBoxesReceived( const QList &descriptors, const QList< QList > &flags ); protected: virtual void doStart(); virtual void handleResponse(const Message &response); private: Q_PRIVATE_SLOT( d_func(), void emitPendings() ) }; } #endif diff --git a/kimap/listrightsjob.h b/kimap/listrightsjob.h index 9fd0753ac..cf19774b4 100644 --- a/kimap/listrightsjob.h +++ b/kimap/listrightsjob.h @@ -1,57 +1,57 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_LISTRIGHTSJOB_H #define KIMAP_LISTRIGHTSJOB_H #include "kimap_export.h" #include "acljobbase.h" namespace KIMAP { class Session; -class Message; +struct Message; class ListRightsJobPrivate; class KIMAP_EXPORT ListRightsJob : public AclJobBase { Q_OBJECT Q_DECLARE_PRIVATE(ListRightsJob) friend class SessionPrivate; public: explicit ListRightsJob( Session *session ); virtual ~ListRightsJob(); void setIdentifier( const QByteArray &identifier ); QByteArray identifier(); Acl::Rights defaultRights(); QList possibleRights(); protected: virtual void doStart(); virtual void handleResponse(const Message &response); }; } #endif diff --git a/kimap/loginjob.h b/kimap/loginjob.h index 563c81267..c4cb1b1ad 100644 --- a/kimap/loginjob.h +++ b/kimap/loginjob.h @@ -1,98 +1,98 @@ /* Copyright (c) 2009 Kevin Ottens Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_LOGINJOB_H #define KIMAP_LOGINJOB_H #include "kimap_export.h" #include "job.h" namespace KIMAP { class Session; -class Message; +struct Message; class LoginJobPrivate; class KIMAP_EXPORT LoginJob : public Job { Q_OBJECT Q_DECLARE_PRIVATE(LoginJob) friend class SessionPrivate; public: enum EncryptionMode { Unencrypted = 0, TlsV1, SslV2, SslV3, SslV3_1, AnySslVersion }; enum AuthenticationMode { ClearText = 0, Login, Plain, CramMD5, DigestMD5, NTLM, GSSAPI, Anonymous }; explicit LoginJob( Session *session ); virtual ~LoginJob(); QString userName() const; void setUserName( const QString &userName ); QString password() const; void setPassword( const QString &password ); /** * Set the encryption mode for the connection. In case an encryption mode is set, the caller * MUST check the encryptionMode() result after executing the job, to see if the connection is * encrypted or not (e.g handshaking failed). * @param mode the encryption mode, see EncryptionModes */ void setEncryptionMode(EncryptionMode mode); /** Get the encryption mode. @return the currently active encryption mode */ EncryptionMode encryptionMode(); void setAuthenticationMode(AuthenticationMode mode); protected: virtual void doStart(); virtual void handleResponse( const Message &response ); virtual void connectionLost(); private: Q_PRIVATE_SLOT( d_func(), void sslResponse(bool) ) }; } #endif diff --git a/kimap/metadatajobbase.h b/kimap/metadatajobbase.h index b42387479..edf7e06fa 100644 --- a/kimap/metadatajobbase.h +++ b/kimap/metadatajobbase.h @@ -1,74 +1,74 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_METADATAJOBBASE_H #define KIMAP_METADATAJOBBASE_H #include "kimap_export.h" #include "job.h" namespace KIMAP { class Session; -class Message; +struct Message; class MetaDataJobBasePrivate; /** @short Base class of Metadata/Annotatemore related jobs. It cannot be used directly, you must subclass it and reimplement at least the doStart() method. */ class KIMAP_EXPORT MetaDataJobBase : public Job { Q_OBJECT Q_DECLARE_PRIVATE(MetaDataJobBase) friend class SessionPrivate; public: explicit MetaDataJobBase( Session *session ); virtual ~MetaDataJobBase(); enum ServerCapability { Metadata = 0, //rfc5464 Annotatemore //compatibility with draft-daboo-imap-annotatemore-07 }; void setMailBox( const QString &mailBox ); QString mailBox() const; /** * Set what kind of annotation does the server support. The commands send out depend on the mode set here. * @param capability Metadata (RFC5464 mode) or Annotatemore (draft-daboo-imap-annotatemore-07 mode) */ void setServerCapability(const ServerCapability& capability); /** * Check the operating mode. * @return the annotation capability of the server, see ServerCapability */ ServerCapability serverCapability() const; protected: MetaDataJobBase( JobPrivate &dd ); }; } #endif diff --git a/kimap/myrightsjob.h b/kimap/myrightsjob.h index 19f8c9c3b..46d9594eb 100644 --- a/kimap/myrightsjob.h +++ b/kimap/myrightsjob.h @@ -1,56 +1,56 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_MYRIGHTSJOB_H #define KIMAP_MYRIGHTSJOB_H #include "kimap_export.h" #include "acljobbase.h" namespace KIMAP { class Session; -class Message; +struct Message; class MyRightsJobPrivate; class KIMAP_EXPORT MyRightsJob : public AclJobBase { Q_OBJECT Q_DECLARE_PRIVATE(MyRightsJob) friend class SessionPrivate; public: explicit MyRightsJob( Session *session ); virtual ~MyRightsJob(); bool hasRightEnabled(Acl::Right right); Acl::Rights rights(); protected: virtual void doStart(); virtual void handleResponse(const Message &response); }; } #endif diff --git a/kimap/quotajobbase.h b/kimap/quotajobbase.h index 8ad05d985..a263b6c76 100644 --- a/kimap/quotajobbase.h +++ b/kimap/quotajobbase.h @@ -1,57 +1,57 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_QUOTAJOBBASE_H #define KIMAP_QUOTAJOBBASE_H #include "kimap_export.h" #include "job.h" namespace KIMAP { class Session; -class Message; +struct Message; class QuotaJobBasePrivate; /** @short Base class of Quota related jobs. It cannot be used directly, you must subclass it and reimplement at least the doStart() method. */ class KIMAP_EXPORT QuotaJobBase : public Job { Q_OBJECT Q_DECLARE_PRIVATE(QuotaJobBase) friend class SessionPrivate; public: explicit QuotaJobBase( Session *session ); virtual ~QuotaJobBase(); qint64 usage(const QByteArray& resource); qint64 limit(const QByteArray& resource); protected: QuotaJobBase( JobPrivate &dd ); }; } #endif diff --git a/kimap/searchjob.h b/kimap/searchjob.h index a8232621a..4f8d903e7 100644 --- a/kimap/searchjob.h +++ b/kimap/searchjob.h @@ -1,154 +1,154 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_SEARCHJOB_H #define KIMAP_SEARCHJOB_H #include "kimap_export.h" #include "job.h" class QDate; namespace KIMAP { class Session; -class Message; +struct Message; class SearchJobPrivate; class KIMAP_EXPORT SearchJob : public Job { Q_OBJECT Q_DECLARE_PRIVATE(SearchJob) friend class SessionPrivate; public: enum SearchLogic { And = 0, Or, Not }; enum SearchCriteria { All = 0, Answered, BCC, Before, Body, CC, Deleted, Draft, Flagged, From, Header, Keyword, Larger, New, Old, On, Recent, Seen, SentBefore, SentOn, SentSince, Since, Smaller, Subject, Text, To, Uid, Unanswered, Undeleted, Undraft, Unflagged, Unkeyword, Unseen }; explicit SearchJob( Session *session ); virtual ~SearchJob(); void setUidBased(bool uidBased); bool isUidBased() const; void setCharset( const QByteArray &charSet ); QByteArray charset() const; /** * Get the search result, as a list of sequence numbers or UIDs, based on the isUidBased status * @return the found items */ QList foundItems(); /** * Add a search criteria that doesn't have an argument. Passing a criteria that * should have an argument will be ignored. * @param criteria a criteria from SearchCriterias */ void addSearchCriteria( SearchCriteria criteria ); /** * Add a search criteria that has one or more space separate string arguments. * Passing a criteria that accepts a different type or argument or no * argument will be ignored. * @param criteria a criteria from SearchCriterias * @param argument the arguments */ void addSearchCriteria( SearchCriteria criteria, const QByteArray &argument ); /** * Add a search criteria that has an integer argument. * Passing a criteria that accepts a different type or argument or no * argument will be ignored. * @param criteria a criteria from SearchCriterias * @param argument a number argument */ void addSearchCriteria( SearchCriteria criteria, int argument ); /** * Add a search criteria that has a date as argument. * Passing a criteria that accepts a different type or argument or no * argument will be ignored. * @param criteria a criteria from SearchCriterias * @param argument a date */ void addSearchCriteria( SearchCriteria criteria, const QDate& argument ); /** * Add a custom criteria. No checks are done, the data is sent as it is * to the server. * @param searchCriteria free form search criteria. */ void addSearchCriteria( const QByteArray &searchCriteria ); /** * Set the logic combining the search criterias. * @param logic AND (the default), OR, NOT. See SearchLogics. */ void setSearchLogic(SearchLogic logic); protected: virtual void doStart(); virtual void handleResponse(const Message &response); }; } #endif diff --git a/kimap/selectjob.h b/kimap/selectjob.h index 213d070de..c67d28c06 100644 --- a/kimap/selectjob.h +++ b/kimap/selectjob.h @@ -1,67 +1,67 @@ /* Copyright (c) 2009 Kevin Ottens This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_SELECTJOB_H #define KIMAP_SELECTJOB_H #include "kimap_export.h" #include "job.h" namespace KIMAP { class Session; -class Message; +struct Message; class SelectJobPrivate; class KIMAP_EXPORT SelectJob : public Job { Q_OBJECT Q_DECLARE_PRIVATE(SelectJob) friend class SessionPrivate; public: explicit SelectJob( Session *session ); virtual ~SelectJob(); void setMailBox( const QString &mailBox ); QString mailBox() const; void setOpenReadOnly( bool readOnly ); bool isOpenReadOnly() const; QList flags() const; QList permanentFlags() const; int messageCount() const; int recentCount() const; int firstUnseenIndex() const; qint64 uidValidity() const; qint64 nextUid() const; protected: virtual void doStart(); virtual void handleResponse( const Message &response ); }; } #endif diff --git a/kimap/session.h b/kimap/session.h index 109c2d469..bad692bb6 100644 --- a/kimap/session.h +++ b/kimap/session.h @@ -1,76 +1,76 @@ /* Copyright (c) 2009 Kevin Ottens This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_SESSION_H #define KIMAP_SESSION_H #include "kimap_export.h" #include class KSslErrorUiData; namespace KIMAP { class SessionUiProxy; class SessionPrivate; class JobPrivate; -class Message; +struct Message; class KIMAP_EXPORT Session : public QObject { Q_OBJECT Q_ENUMS(State) friend class JobPrivate; public: enum State { Disconnected = 0, NotAuthenticated, Authenticated, Selected }; Session( const QString &hostName, quint16 port, QObject *parent=0 ); ~Session(); QString hostName() const; quint16 port() const; State state() const; /** * Sets an ui proxy that displays the error messages and waits for user feedback. * @param proxy the ui proxy object */ void setUiProxy(SessionUiProxy *proxy); private: Q_PRIVATE_SLOT( d, void doStartNext() ) Q_PRIVATE_SLOT( d, void jobDone( KJob* ) ) Q_PRIVATE_SLOT( d, void jobDestroyed( QObject* ) ) Q_PRIVATE_SLOT( d, void responseReceived( const KIMAP::Message& ) ) Q_PRIVATE_SLOT( d, void socketConnected() ) Q_PRIVATE_SLOT( d, void socketDisconnected() ) Q_PRIVATE_SLOT( d, void socketError() ) Q_PRIVATE_SLOT( d, void handleSslError( const KSslErrorUiData &errorData ) ) friend class SessionPrivate; SessionPrivate *const d; }; } #endif diff --git a/kimap/session_p.h b/kimap/session_p.h index 410c3ad6e..8cced20e8 100644 --- a/kimap/session_p.h +++ b/kimap/session_p.h @@ -1,96 +1,96 @@ /* Copyright (c) 2009 Kevin Ottens This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_SESSION_P_H #define KIMAP_SESSION_P_H #include "session.h" #include #include #include #include class KJob; namespace KIMAP { class Job; -class Message; +struct Message; class SessionThread; class SessionUiProxy; class SessionPrivate : public QObject { Q_OBJECT friend class Session; public: SessionPrivate( Session *session ); void addJob(Job *job); QByteArray sendCommand( const QByteArray &command, const QByteArray &args = QByteArray() ); void startSsl(const KTcpSocket::SslVersion &version); void sendData( const QByteArray &data ); QString selectedMailBox() const; void handleSslError( const KSslErrorUiData &errorData ); Q_SIGNALS: void encryptionNegotiationResult(bool); private: void reconnect(); void startNext(); void doStartNext(); void jobDone( KJob *job ); void jobDestroyed( QObject *job ); void responseReceived( const KIMAP::Message &response ); void socketConnected(); void socketDisconnected(); void socketError(); Session *const q; Session::State state; SessionThread *thread; SessionUiProxy *uiProxy; bool jobRunning; Job *currentJob; QQueue queue; QByteArray authTag; QByteArray selectTag; QByteArray closeTag; QByteArray currentMailBox; QByteArray upcomingMailBox; quint16 tagCount; }; } #endif diff --git a/kimap/sessionthread_p.h b/kimap/sessionthread_p.h index 375c29c99..97d5230a4 100644 --- a/kimap/sessionthread_p.h +++ b/kimap/sessionthread_p.h @@ -1,84 +1,84 @@ /* Copyright (c) 2009 Kevin Ottens This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_SESSIONTHREAD_P_H #define KIMAP_SESSIONTHREAD_P_H #include #include #include #include typedef KTcpSocket SessionSocket; namespace KIMAP { class ImapStreamParser; -class Message; +struct Message; class Session; class SessionThread : public QThread { Q_OBJECT public: explicit SessionThread( const QString &hostName, quint16 port, Session *parent ); ~SessionThread(); inline QString hostName() { return m_hostName; } inline quint16 port() { return m_port; } void sendData( const QByteArray &payload ); void run(); public slots: void closeSocket(); void reconnect(); void startSsl(const KTcpSocket::SslVersion &version); signals: void responseReceived(const KIMAP::Message &response); void encryptionNegotiationResult(bool); void sslError(const KSslErrorUiData&); private slots: void readMessage(); void writeDataQueue(); void sslConnected(); void sslErrorHandlerResponse(bool result); private: QString m_hostName; quint16 m_port; Session *m_session; SessionSocket *m_socket; ImapStreamParser *m_stream; QQueue m_dataQueue; QMutex m_mutex; bool m_encryptedMode; }; } #endif diff --git a/kimap/setacljob.h b/kimap/setacljob.h index 89d8b8b72..7edda81d4 100644 --- a/kimap/setacljob.h +++ b/kimap/setacljob.h @@ -1,56 +1,56 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_SETACLJOB_H #define KIMAP_SETACLJOB_H #include "kimap_export.h" #include "acljobbase.h" namespace KIMAP { class Session; -class Message; +struct Message; class SetAclJobPrivate; class KIMAP_EXPORT SetAclJob : public AclJobBase { Q_OBJECT Q_DECLARE_PRIVATE(SetAclJob) friend class SessionPrivate; public: explicit SetAclJob( Session *session ); virtual ~SetAclJob(); void setRights(AclModifier modifier, Acl::Rights rights); void setIdentifier( const QByteArray &identifier ); QByteArray identifier(); protected: virtual void doStart(); }; } #endif diff --git a/kimap/setmetadatajob.h b/kimap/setmetadatajob.h index 3b6bd0d87..4302fcfb2 100644 --- a/kimap/setmetadatajob.h +++ b/kimap/setmetadatajob.h @@ -1,90 +1,90 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_SETMETADATAJOB_H #define KIMAP_SETMETADATAJOB_H #include "kimap_export.h" #include "metadatajobbase.h" namespace KIMAP { class Session; -class Message; +struct Message; class SetMetaDataJobPrivate; class KIMAP_EXPORT SetMetaDataJob : public MetaDataJobBase { Q_OBJECT Q_DECLARE_PRIVATE(SetMetaDataJob) friend class SessionPrivate; public: explicit SetMetaDataJob( Session *session ); virtual ~SetMetaDataJob(); /** * Add a metadata to the mailbox. Depending on the supported standard by the server (setServerCapability), * the @param name can have a different meaning. * @param name the entry name if serverCapability() returns Metadata (RFC5464 mode), the attribute value name * if serverCapability() is Annotatemore (draft-daboo-imap-annotatemore-07 mode). * @param value the value of the entry/attribute */ void addMetaData(const QByteArray &name, const QByteArray &value); /** * Set the entry name for the metada, if the job is operating in Annotatemore mode. In Metadata mode, this setting is * ignored. * @param entry the metadata entry name */ void setEntry(const QByteArray &entry); enum MetaDataError { NoError = 0, TooMany = 1, TooBig = 2, NoPrivate = 4 }; // Q_DECLARE_WHATEVER_THAT_WAS missing Q_DECLARE_FLAGS(MetaDataErrors, MetaDataError) /** * The metadata errors recived from the server. * @return OR connected error codes, see MetaDataError */ MetaDataErrors metaDataErrors() const; /** * The maximum accepted metadata size. * @return the accepted metadata size, -1 means the limit is unknown. */ qint64 maxAcceptedSize(); protected: virtual void doStart(); virtual void handleResponse( const Message &response ); }; } Q_DECLARE_OPERATORS_FOR_FLAGS( KIMAP::SetMetaDataJob::MetaDataErrors ) #endif diff --git a/kimap/setquotajob.h b/kimap/setquotajob.h index 39d179a00..db16acbc7 100644 --- a/kimap/setquotajob.h +++ b/kimap/setquotajob.h @@ -1,61 +1,61 @@ /* Copyright (c) 2009 Andras Mantia This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_SETQUOTAJOB_H #define KIMAP_SETQUOTAJOB_H #include "quotajobbase.h" namespace KIMAP { class Session; -class Message; +struct Message; class SetQuotaJobPrivate; class KIMAP_EXPORT SetQuotaJob : public QuotaJobBase { Q_OBJECT Q_DECLARE_PRIVATE(SetQuotaJob) friend class SessionPrivate; public: explicit SetQuotaJob( Session *session ); virtual ~SetQuotaJob(); /** * Set a limit for a quota resource * @param resource quota resouce name * @param limit limit for the resouce */ // use qint64 for all the quota stuff void setQuota(const QByteArray& resource, qint64 limit); void setRoot(const QByteArray &root); QByteArray root() const; protected: virtual void doStart(); virtual void handleResponse(const Message &response); }; } #endif diff --git a/kimap/storejob.h b/kimap/storejob.h index 0ea5d9c4f..7c41d905d 100644 --- a/kimap/storejob.h +++ b/kimap/storejob.h @@ -1,75 +1,75 @@ /* Copyright (c) 2009 Kevin Ottens This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef KIMAP_STOREJOB_H #define KIMAP_STOREJOB_H #include "kimap_export.h" #include "job.h" #include "imapset.h" namespace KIMAP { class Session; -class Message; +struct Message; class StoreJobPrivate; typedef QList MessageFlags; class KIMAP_EXPORT StoreJob : public Job { Q_OBJECT Q_DECLARE_PRIVATE(StoreJob) friend class SessionPrivate; public: enum StoreMode { SetFlags, AppendFlags, RemoveFlags }; explicit StoreJob( Session *session ); virtual ~StoreJob(); void setSequenceSet( const ImapSet &set ); ImapSet sequenceSet() const; void setUidBased( bool uidBased ); bool isUidBased() const; void setFlags( const MessageFlags &flags ); MessageFlags flags() const; void setMode( StoreMode mode ); StoreMode mode() const; QMap resultingFlags() const; protected: virtual void doStart(); virtual void handleResponse(const Message &response); }; } #endif