vcs
vcsjob.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef VCSJOB_H
00023 #define VCSJOB_H
00024
00025 #include <kjob.h>
00026
00027 #include "vcsexport.h"
00028
00029 class QVariant;
00030 class QString;
00031 class KUrl;
00032
00033 namespace KDevelop
00034 {
00035
00036 class IPlugin;
00037
00044 class KDEVPLATFORMVCS_EXPORT VcsJob : public KJob
00045 {
00046 Q_OBJECT
00047 public:
00048 VcsJob( QObject* parent = 0);
00049 virtual ~VcsJob();
00056 enum JobType
00057 {
00058 Add = 0 ,
00059 Remove = 1 ,
00060 Copy = 2 ,
00061 Move = 3 ,
00062 Diff = 4 ,
00063 Commit = 5 ,
00064 Update = 6 ,
00065 Merge = 7 ,
00066 Resolve = 8 ,
00067 Import = 9 ,
00068 Checkout = 10 ,
00069 Log = 11 ,
00070 Push = 12 ,
00071 Pull = 13 ,
00072 Annotate = 14 ,
00073 Clone = 15 ,
00074 Status = 16 ,
00075 Revert = 17 ,
00076 Cat = 18 ,
00077 UserType = 1000
00078 };
00079
00083 enum JobStatus
00084 {
00085 JobRunning = 0 ,
00086 JobSucceeded = 1 ,
00087 JobCanceled = 2 ,
00088 JobFailed = 3 ,
00089 JobNotStarted = 4
00090 };
00091
00099 virtual QVariant fetchResults() = 0;
00100
00108 virtual JobStatus status() const = 0;
00109
00115 JobType type();
00116
00123 virtual KDevelop::IPlugin* vcsPlugin() const = 0;
00124
00125 protected:
00129 void setType( JobType );
00130
00131 Q_SIGNALS:
00137 void resultsReady( KDevelop::VcsJob* );
00138
00139 private:
00140 class VcsJobPrivate* const d;
00141 };
00142
00143 }
00144
00145 #endif
00146