/guitone-1.0rc5/src/monotone/MonotoneUtil.h
C Header | 68 lines | 41 code | 9 blank | 18 comment | 0 complexity | 279535509ef7c0d6a5f64f971d829257 MD5 | raw file
Possible License(s): GPL-3.0
- /***************************************************************************
- * Copyright (C) 2007 by Thomas Keller *
- * me@thomaskeller.biz *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation, either version 3 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program. If not, see <http://www.gnu.org/licenses/>. *
- ***************************************************************************/
- #ifndef MONOTONE_UTIL_H
- #define MONOTONE_UTIL_H
- #include "vocab.h"
- #include "CertList.h"
- #include "MonotoneThread.h"
- #include <QEventLoop>
- class MonotoneUtil : public QObject
- {
- Q_OBJECT
- public:
- static void runSynchronousTask(const MonotoneHandlePtr &, const MonotoneTaskPtr &);
- static QString getBaseWorkspaceRevision(const MonotoneHandlePtr &);
- static QString getOption(const MonotoneHandlePtr &, const QString &);
- static QString getBranchName(const MonotoneHandlePtr &, const QString & defaultBranch = tr("[unknown branch]"));
- static QString getBranchNameShort(const MonotoneHandlePtr &);
- static QStringList resolveSelector(const MonotoneHandlePtr &, const QString &);
- static CertList getCerts(const MonotoneHandlePtr &, const QString &);
- static bool createCert(const MonotoneHandlePtr & db, const QString &, const QString &, const QString &, const QString &);
- static FileEntryList getRevisionManifest(const MonotoneHandlePtr &, const QString &);
- static QMap<QString, QString> getPublicKeyMap(const MonotoneHandlePtr &);
- static QMap<QString, QString> getPrivateKeyMap(const MonotoneHandlePtr &);
- static QStringList getPreviousContentMarks(const MonotoneHandlePtr &, const QString &, const QString &);
- static QString getCorrespondingPath(const MonotoneHandlePtr &, const QString &, const QString &, const QString &);
- static QString getFileId(const MonotoneHandlePtr &, const QString &);
- static QStringList getRoots(const MonotoneHandlePtr &, bool &);
- static QStringList topsortRevisions(const MonotoneHandlePtr &, const QStringList &);
- static QStringList getCommonAncestors(const MonotoneHandlePtr &, const QStringList &);
- static QStringList getDefaultDatabaseLocations(const MonotoneHandlePtr &);
- static bool getFileAttribute(const MonotoneHandlePtr &, const QString &, const QString &, const QString &, QPair<QString, QString> &);
- static QMap<QString, QString> getDatabaseVariables(const MonotoneHandlePtr &, const QString &);
- // FIXME: decide what to do with that
- static QString stripMtnPrefix(const QString &);
- signals:
- void finished();
- private:
- void run(const MonotoneThreadPtr &, const MonotoneTaskPtr &);
- int currentCommandNumber;
- private slots:
- void taskFinished(const MonotoneTaskPtr &);
- void taskAborted(const MonotoneTaskPtr &);
- };
- #endif