KDevelop API Documentation

vcs/cvsservice/cvspartimpl.h

Go to the documentation of this file.
00001 /*************************************************************************** 00002 * Copyright (C) 2003 by Mario Scalas * 00003 * mario.scalas@libero.it * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 ***************************************************************************/ 00011 00012 #ifndef CVSPARTIMPL_H 00013 #define CVSPARTIMPL_H 00014 00015 #include <qobject.h> 00016 #include <qstringlist.h> 00017 #include <qguardedptr.h> 00018 #include <kurl.h> 00019 00020 #include <kdevversioncontrol.h> 00021 #include <kdevvcsfileinfoprovider.h> 00022 00023 class CvsServicePart; 00024 class KDialogBase; 00025 class KURL; 00026 class KURL::List; 00027 class CvsProcessWidget; 00028 class KDevMainWindow; 00029 class KDevCore; 00030 class KDevDiffFrontend; 00031 class QDir; 00032 class JobScheduler; 00033 class KDevVCSFileInfoProvider; 00034 class CVSFileInfoProvider; 00035 00046 class CvsServicePartImpl : public QObject 00047 { 00048 friend class CvsServicePart; 00049 00050 Q_OBJECT 00051 public: 00053 enum CvsOperation 00054 { 00055 opFakeStub, opAdd, opCommit, opUpdate, opRevert, opRemove, opLog, opDiff, opTag, opUnTag 00056 }; 00057 00063 CvsServicePartImpl( CvsServicePart *part, const char *name=0 ); 00067 virtual ~CvsServicePartImpl(); 00068 00073 virtual void login(); 00077 virtual void logout(); 00082 virtual void checkout(); 00087 virtual void commit( const KURL::List& urlList ); 00093 virtual void update( const KURL::List& urlList ); 00099 virtual void add( const KURL::List& urlList, bool binary = false ); 00104 virtual void remove( const KURL::List& urlList ); 00109 virtual void log( const KURL::List& urlList ); 00115 virtual void diff( const KURL::List& urlList ); 00120 virtual void tag( const KURL::List& urlList ); 00125 virtual void unTag( const KURL::List& urlList ); 00130 virtual void removeStickyFlag( const KURL::List& urlList ); 00135 virtual void addToIgnoreList( const KURL::List& urlList ); 00140 virtual void removeFromIgnoreList( const KURL::List& urlList ); 00154 virtual void createNewProject( const QString &dirName, 00155 const QString &cvsRsh, const QString &location, 00156 const QString &message, const QString &module, const QString &vendor, 00157 const QString &release, bool mustInitRoot ); 00158 00162 virtual bool isValidDirectory( const QDir &dir ) const; 00166 KDevVCSFileInfoProvider *fileInfoProvider() const; 00167 00168 00169 // Helpers 00170 public: 00175 void flushJobs(); 00181 CvsProcessWidget *processWidget() const; 00182 00183 signals: 00184 void warning( const QString &msg ); 00190 void checkoutFinished( QString checkedDir ); 00191 00192 private slots: 00193 void slotJobFinished( bool normalExit, int exitStatus ); 00194 void slotDiffFinished( bool normalExit, int exitStatus ); 00195 void slotCheckoutFinished( bool normalExit, int exitStatus ); 00196 void slotProjectOpened(); 00197 00198 private: 00208 bool prepareOperation( const KURL::List &someUrls, CvsOperation op ); 00213 void doneOperation( const KURL::List &someUrls = KURL::List(), CvsOperation op = opFakeStub ); 00214 00215 void emitFileStateModified( const KURL::List &urls, VCSFileInfo::FileState &commonState ); 00216 00220 static bool isRegisteredInRepository( const QString &projectDirectory, const KURL &url ); 00229 static void validateURLs( const QString &projectDirectory, KURL::List &urls, CvsOperation op ); 00230 00238 static void addToIgnoreList( const QString &projectDirectory, const KURL &url ); 00239 00247 static void addToIgnoreList( const QString &projectDirectory, const KURL::List &urls ); 00248 00258 static void removeFromIgnoreList( const QString &projectDirectory, const KURL &url ); 00259 00269 static void removeFromIgnoreList( const QString &projectDirectory, const KURL::List &urls ); 00273 void addFilesToProject( const QStringList &filesToAdd ); 00277 void removedFilesFromProject(const QStringList &filesToRemove); 00283 QStringList checkFileListAgainstCVS( const QStringList &filesToCheck ) const; 00284 00286 static const QString changeLogFileName; 00289 static const QString changeLogPrependString; 00290 00291 // Internal short-cuts 00292 KDevMainWindow *mainWindow() const; 00293 KDevCore *core() const; 00294 QString projectDirectory() const; 00295 KDevDiffFrontend *diffFrontend() const; 00296 00298 bool requestCvsService(); 00300 void releaseCvsService(); 00301 00302 CvsService_stub *m_cvsService; 00303 Repository_stub *m_repository; 00304 00306 QString modulePath; 00307 00308 CVSFileInfoProvider *m_fileInfoProvider; 00309 JobScheduler *m_scheduler; 00311 CvsServicePart *m_part; 00312 00315 QGuardedPtr<CvsProcessWidget> m_widget; 00316 00318 const KURL::List &urlList() const; 00325 QStringList fileList( bool relativeToProjectDir = true ) const; 00327 CvsOperation lastOperation() const; 00328 00329 // Both this data members are set by prepareOperation() method 00330 KURL::List m_urlList; 00331 CvsOperation m_lastOperation; 00332 }; 00333 00334 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:01:53 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003