akonadi
itemsearchjob.h
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 <QUrl>
00024
00025 #include <akonadi/item.h>
00026 #include <akonadi/job.h>
00027
00028 namespace Akonadi {
00029
00030 class ItemFetchScope;
00031 class ItemSearchJobPrivate;
00032
00063 class AKONADI_EXPORT ItemSearchJob : public Job
00064 {
00065 Q_OBJECT
00066
00067 public:
00074 explicit ItemSearchJob( const QString &query, QObject *parent = 0 );
00075
00079 ~ItemSearchJob();
00080
00084 void setQuery( const QString &query );
00085
00097 void setFetchScope( const ItemFetchScope &fetchScope );
00098
00111 ItemFetchScope &fetchScope();
00112
00116 Item::List items() const;
00117
00129 static QUrl akonadiItemIdUri();
00130
00131 Q_SIGNALS:
00141 void itemsReceived( const Akonadi::Item::List &items );
00142
00143 protected:
00144 void doStart();
00145 virtual void doHandleResponse( const QByteArray &tag, const QByteArray &data );
00146
00147 private:
00148
00149 Q_DECLARE_PRIVATE( ItemSearchJob )
00150
00151 Q_PRIVATE_SLOT( d_func(), void timeout() )
00152
00153 };
00154
00155 }
00156
00157 #endif