00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_ITEMSEARCHJOB_H
00021 #define AKONADI_ITEMSEARCHJOB_H
00022
00023 #include <akonadi/item.h>
00024 #include <akonadi/job.h>
00025
00026 #include <QtCore/QUrl>
00027
00028 namespace Akonadi {
00029
00030 class ItemFetchScope;
00031 class ItemSearchJobPrivate;
00032
00070 class AKONADI_EXPORT ItemSearchJob : public Job
00071 {
00072 Q_OBJECT
00073
00074 public:
00081 explicit ItemSearchJob( const QString &query, QObject *parent = 0 );
00082
00086 ~ItemSearchJob();
00087
00091 void setQuery( const QString &query );
00092
00104 void setFetchScope( const ItemFetchScope &fetchScope );
00105
00118 ItemFetchScope &fetchScope();
00119
00123 Item::List items() const;
00124
00136 static QUrl akonadiItemIdUri();
00137
00138 Q_SIGNALS:
00148 void itemsReceived( const Akonadi::Item::List &items );
00149
00150 protected:
00151 void doStart();
00152 virtual void doHandleResponse( const QByteArray &tag, const QByteArray &data );
00153
00154 private:
00155
00156 Q_DECLARE_PRIVATE( ItemSearchJob )
00157
00158 Q_PRIVATE_SLOT( d_func(), void timeout() )
00159
00160 };
00161
00162 }
00163
00164 #endif