• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KIMAP Library

  • sources
  • kde-4.12
  • kdepimlibs
  • kimap
searchjob.h
1 /*
2  Copyright (c) 2009 Andras Mantia <amantia@kde.org>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef KIMAP_SEARCHJOB_H
21 #define KIMAP_SEARCHJOB_H
22 
23 #include "kimap_export.h"
24 
25 #include "job.h"
26 
27 class QDate;
28 
29 namespace KIMAP {
30 
31 class Session;
32 struct Message;
33 class SearchJobPrivate;
34 
35 class KIMAP_EXPORT SearchJob : public Job
36 {
37  Q_OBJECT
38  Q_DECLARE_PRIVATE( SearchJob )
39 
40  friend class SessionPrivate;
41 
42  public:
43  enum SearchLogic {
44  And = 0,
45  Or,
46  Not
47  };
48 
49  enum SearchCriteria {
50  All = 0,
51  Answered,
52  BCC,
53  Before,
54  Body,
55  CC,
56  Deleted,
57  Draft,
58  Flagged,
59  From,
60  Header,
61  Keyword,
62  Larger,
63  New,
64  Old,
65  On,
66  Recent,
67  Seen,
68  SentBefore,
69  SentOn,
70  SentSince,
71  Since,
72  Smaller,
73  Subject,
74  Text,
75  To,
76  Uid,
77  Unanswered,
78  Undeleted,
79  Undraft,
80  Unflagged,
81  Unkeyword,
82  Unseen
83  };
84 
85  explicit SearchJob( Session *session );
86  virtual ~SearchJob();
87 
88  void setUidBased(bool uidBased);
89  bool isUidBased() const;
90 
91  void setCharset( const QByteArray &charSet );
92  QByteArray charset() const;
93 
99  KIMAP_DEPRECATED QList<int> foundItems();
100 
106  QList<qint64> results() const;
107 
113  void addSearchCriteria( SearchCriteria criteria );
114 
122  void addSearchCriteria( SearchCriteria criteria, const QByteArray &argument );
123 
131  void addSearchCriteria( SearchCriteria criteria, int argument );
132 
140  void addSearchCriteria( SearchCriteria criteria, const QDate& argument );
141 
147  void addSearchCriteria( const QByteArray &searchCriteria );
148 
153  void setSearchLogic(SearchLogic logic);
154 
155  protected:
156  virtual void doStart();
157  virtual void handleResponse(const Message &response);
158 };
159 
160 }
161 
162 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIMAP Library

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal