PageRenderTime 58ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  1. /***************************************************************************
  2. * Copyright (C) 2007 by Thomas Keller *
  3. * me@thomaskeller.biz *
  4. * *
  5. * This program is free software; you can redistribute it and/or modify *
  6. * it under the terms of the GNU General Public License as published by *
  7. * the Free Software Foundation, either version 3 of the License, or *
  8. * (at your option) any later version. *
  9. * *
  10. * This program is distributed in the hope that it will be useful, *
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  13. * GNU General Public License for more details. *
  14. * *
  15. * You should have received a copy of the GNU General Public License *
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>. *
  17. ***************************************************************************/
  18. #ifndef MONOTONE_UTIL_H
  19. #define MONOTONE_UTIL_H
  20. #include "vocab.h"
  21. #include "CertList.h"
  22. #include "MonotoneThread.h"
  23. #include <QEventLoop>
  24. class MonotoneUtil : public QObject
  25. {
  26. Q_OBJECT
  27. public:
  28. static void runSynchronousTask(const MonotoneHandlePtr &, const MonotoneTaskPtr &);
  29. static QString getBaseWorkspaceRevision(const MonotoneHandlePtr &);
  30. static QString getOption(const MonotoneHandlePtr &, const QString &);
  31. static QString getBranchName(const MonotoneHandlePtr &, const QString & defaultBranch = tr("[unknown branch]"));
  32. static QString getBranchNameShort(const MonotoneHandlePtr &);
  33. static QStringList resolveSelector(const MonotoneHandlePtr &, const QString &);
  34. static CertList getCerts(const MonotoneHandlePtr &, const QString &);
  35. static bool createCert(const MonotoneHandlePtr & db, const QString &, const QString &, const QString &, const QString &);
  36. static FileEntryList getRevisionManifest(const MonotoneHandlePtr &, const QString &);
  37. static QMap<QString, QString> getPublicKeyMap(const MonotoneHandlePtr &);
  38. static QMap<QString, QString> getPrivateKeyMap(const MonotoneHandlePtr &);
  39. static QStringList getPreviousContentMarks(const MonotoneHandlePtr &, const QString &, const QString &);
  40. static QString getCorrespondingPath(const MonotoneHandlePtr &, const QString &, const QString &, const QString &);
  41. static QString getFileId(const MonotoneHandlePtr &, const QString &);
  42. static QStringList getRoots(const MonotoneHandlePtr &, bool &);
  43. static QStringList topsortRevisions(const MonotoneHandlePtr &, const QStringList &);
  44. static QStringList getCommonAncestors(const MonotoneHandlePtr &, const QStringList &);
  45. static QStringList getDefaultDatabaseLocations(const MonotoneHandlePtr &);
  46. static bool getFileAttribute(const MonotoneHandlePtr &, const QString &, const QString &, const QString &, QPair<QString, QString> &);
  47. static QMap<QString, QString> getDatabaseVariables(const MonotoneHandlePtr &, const QString &);
  48. // FIXME: decide what to do with that
  49. static QString stripMtnPrefix(const QString &);
  50. signals:
  51. void finished();
  52. private:
  53. void run(const MonotoneThreadPtr &, const MonotoneTaskPtr &);
  54. int currentCommandNumber;
  55. private slots:
  56. void taskFinished(const MonotoneTaskPtr &);
  57. void taskAborted(const MonotoneTaskPtr &);
  58. };
  59. #endif