• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KIMAP Library

searchjob.h

00001 /*
00002     Copyright (c) 2009 Andras Mantia <amantia@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or modify it
00005     under the terms of the GNU Library General Public License as published by
00006     the Free Software Foundation; either version 2 of the License, or (at your
00007     option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful, but WITHOUT
00010     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012     License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to the
00016     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017     02110-1301, USA.
00018 */
00019 
00020 #ifndef KIMAP_SEARCHJOB_H
00021 #define KIMAP_SEARCHJOB_H
00022 
00023 #include "kimap_export.h"
00024 
00025 #include "job.h"
00026 
00027 class QDate;
00028 
00029 namespace KIMAP {
00030 
00031 class Session;
00032 struct Message;
00033 class SearchJobPrivate;
00034 
00035 class KIMAP_EXPORT SearchJob : public Job
00036 {
00037   Q_OBJECT
00038   Q_DECLARE_PRIVATE(SearchJob)
00039 
00040   friend class SessionPrivate;
00041 
00042   public:
00043     enum SearchLogic {
00044       And = 0,
00045       Or,
00046       Not
00047     };
00048 
00049     enum SearchCriteria {
00050        All = 0,
00051        Answered,
00052        BCC,
00053        Before,
00054        Body,
00055        CC,
00056        Deleted,
00057        Draft,
00058        Flagged,
00059        From,
00060        Header,
00061        Keyword,
00062        Larger,
00063        New,
00064        Old,
00065        On,
00066        Recent,
00067        Seen,
00068        SentBefore,
00069        SentOn,
00070        SentSince,
00071        Since,
00072        Smaller,
00073        Subject,
00074        Text,
00075        To,
00076        Uid,
00077        Unanswered,
00078        Undeleted,
00079        Undraft,
00080        Unflagged,
00081        Unkeyword,
00082        Unseen
00083     };
00084 
00085     explicit SearchJob( Session *session );
00086     virtual ~SearchJob();
00087 
00088     void setUidBased(bool uidBased);
00089     bool isUidBased() const;
00090 
00091     void setCharset( const QByteArray &charSet );
00092     QByteArray charset() const;
00093 
00098     QList<int> foundItems();
00099 
00105     void addSearchCriteria( SearchCriteria criteria );
00106 
00114     void addSearchCriteria( SearchCriteria criteria, const QByteArray &argument );
00115 
00123     void addSearchCriteria( SearchCriteria criteria, int argument );
00124 
00132     void addSearchCriteria( SearchCriteria criteria, const QDate& argument );
00133 
00139     void addSearchCriteria( const QByteArray &searchCriteria );
00140 
00145     void setSearchLogic(SearchLogic logic);
00146 
00147   protected:
00148     virtual void doStart();
00149     virtual void handleResponse(const Message &response);
00150 };
00151 
00152 }
00153 
00154 #endif

KIMAP Library

Skip menu "KIMAP Library"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal