00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_ITEMFETCHJOB_H
00021 #define AKONADI_ITEMFETCHJOB_H
00022
00023 #include <akonadi/item.h>
00024 #include <akonadi/job.h>
00025
00026 namespace Akonadi {
00027
00028 class Collection;
00029 class ItemFetchJobPrivate;
00030 class ItemFetchScope;
00031
00082 class AKONADI_EXPORT ItemFetchJob : public Job
00083 {
00084 Q_OBJECT
00085 public:
00092 explicit ItemFetchJob( const Collection &collection, QObject *parent = 0 );
00093
00105 explicit ItemFetchJob( const Item &item, QObject *parent = 0 );
00106
00119 explicit ItemFetchJob( const Item::List &items, QObject *parent = 0 );
00120
00124 virtual ~ItemFetchJob();
00125
00132 Item::List items() const;
00133
00145 void setFetchScope( ItemFetchScope &fetchScope );
00146
00159 void setFetchScope( const ItemFetchScope &fetchScope );
00160
00173 ItemFetchScope &fetchScope();
00174
00182 void setCollection( const Collection &collection );
00183
00184 Q_SIGNALS:
00194 void itemsReceived( const Akonadi::Item::List &items );
00195
00196 protected:
00197 virtual void doStart();
00198 virtual void doHandleResponse( const QByteArray &tag, const QByteArray &data );
00199
00200 private:
00201 Q_DECLARE_PRIVATE( ItemFetchJob )
00202
00203
00204 Q_PRIVATE_SLOT( d_func(), void selectDone( KJob* ) )
00205 Q_PRIVATE_SLOT( d_func(), void timeout() )
00206
00207 };
00208
00209 }
00210
00211 #endif