File indexing completed on 2024-05-19 05:45:41

0001 /*
0002 SPDX-FileCopyrightText: 2021 Hamed Masafi <hamed.masfi@gmail.com>
0003 
0004 SPDX-License-Identifier: GPL-3.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QString>
0010 #include <filestatus.h>
0011 
0012 namespace Git
0013 {
0014 
0015 class MiniManager
0016 {
0017 public:
0018     explicit MiniManager(const QString &path);
0019 
0020     Q_REQUIRED_RESULT const QString &path() const;
0021     void setPath(const QString &newPath);
0022 
0023     Q_REQUIRED_RESULT bool isValid() const;
0024     Q_REQUIRED_RESULT QList<FileStatus> repoFilesStatus() const;
0025     void repoFilesStatus(const std::function<bool(const FileStatus &)> &cb) const;
0026 
0027 private:
0028     QString mPath;
0029     bool mIsValid{false};
0030 };
0031 
0032 } // namespace Git