akonadi
itemfetchjob.h
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
00069 class AKONADI_EXPORT ItemFetchJob : public Job
00070 {
00071 Q_OBJECT
00072 public:
00079 explicit ItemFetchJob( const Collection &collection, QObject *parent = 0 );
00080
00092 explicit ItemFetchJob( const Item &item, QObject *parent = 0 );
00093
00106 explicit ItemFetchJob( const Item::List &items, QObject *parent = 0 );
00107
00111 virtual ~ItemFetchJob();
00112
00119 Item::List items() const;
00120
00132 void setFetchScope( ItemFetchScope &fetchScope );
00133
00146 void setFetchScope( const ItemFetchScope &fetchScope );
00147
00160 ItemFetchScope &fetchScope();
00161
00169 void setCollection( const Collection &collection );
00170
00171 Q_SIGNALS:
00181 void itemsReceived( const Akonadi::Item::List &items );
00182
00183 protected:
00184 virtual void doStart();
00185 virtual void doHandleResponse( const QByteArray &tag, const QByteArray &data );
00186
00187 private:
00188 Q_DECLARE_PRIVATE( ItemFetchJob )
00189
00190
00191 Q_PRIVATE_SLOT( d_func(), void selectDone( KJob* ) )
00192 Q_PRIVATE_SLOT( d_func(), void timeout() )
00193
00194 };
00195
00196 }
00197
00198 #endif