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
00060 class AKONADI_EXPORT ItemFetchJob : public Job
00061 {
00062 Q_OBJECT
00063 public:
00070 explicit ItemFetchJob( const Collection &collection, QObject *parent = 0 );
00071
00083 explicit ItemFetchJob( const Item &item, QObject *parent = 0 );
00084
00088 virtual ~ItemFetchJob();
00089
00096 Item::List items() const;
00097
00109 void setFetchScope( ItemFetchScope &fetchScope );
00110
00123 ItemFetchScope &fetchScope();
00124
00132 void setCollection( const Collection &collection );
00133
00134 Q_SIGNALS:
00140 void itemsReceived( const Akonadi::Item::List &items );
00141
00142 protected:
00143 virtual void doStart();
00144 virtual void doHandleResponse( const QByteArray &tag, const QByteArray &data );
00145
00146 private:
00147 Q_DECLARE_PRIVATE( ItemFetchJob )
00148
00149
00150 Q_PRIVATE_SLOT( d_func(), void selectDone( KJob* ) )
00151 Q_PRIVATE_SLOT( d_func(), void timeout() )
00152
00153 };
00154
00155 }
00156
00157 #endif