-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
edcc817
commit 6dc23eb
Showing
12 changed files
with
213 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#============================================================================= | ||
# MuseScore | ||
# Music Composition & Notation | ||
# | ||
# Copyright (C) 2020 MuseScore BVBA and others | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License version 2. | ||
# | ||
# 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, write to the Free Software | ||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
#============================================================================= | ||
|
||
set(MODULE system) | ||
|
||
set(MODULE_SRC | ||
${CMAKE_CURRENT_LIST_DIR}/systemstubmodule.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/systemstubmodule.h | ||
${CMAKE_CURRENT_LIST_DIR}/filesystemstub.cpp | ||
${CMAKE_CURRENT_LIST_DIR}/filesystemstub.h | ||
) | ||
|
||
include(${PROJECT_SOURCE_DIR}/build/module.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
//============================================================================= | ||
// MuseScore | ||
// Music Composition & Notation | ||
// | ||
// Copyright (C) 2020 MuseScore BVBA and others | ||
// | ||
// This program is free software; you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License version 2. | ||
// | ||
// 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, write to the Free Software | ||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
//============================================================================= | ||
#include "filesystemstub.h" | ||
|
||
using namespace mu::system; | ||
using namespace mu; | ||
|
||
Ret FileSystemStub::exists(const io::path&) const | ||
{ | ||
return make_ret(Ret::Code::NotSupported); | ||
} | ||
|
||
Ret FileSystemStub::remove(const io::path&) const | ||
{ | ||
return make_ret(Ret::Code::NotSupported); | ||
} | ||
|
||
Ret FileSystemStub::makePath(const io::path&) const | ||
{ | ||
return make_ret(Ret::Code::NotSupported); | ||
} | ||
|
||
RetVal<io::paths> FileSystemStub::scanFiles(const io::path&, const QStringList&, IFileSystem::ScanMode) const | ||
{ | ||
RetVal<io::paths> result; | ||
result.ret = make_ret(Ret::Code::NotSupported); | ||
return result; | ||
} | ||
|
||
RetVal<QByteArray> FileSystemStub::readFile(const io::path&) const | ||
{ | ||
RetVal<QByteArray> result; | ||
result.ret = make_ret(Ret::Code::NotSupported); | ||
return result; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//============================================================================= | ||
// MuseScore | ||
// Music Composition & Notation | ||
// | ||
// Copyright (C) 2020 MuseScore BVBA and others | ||
// | ||
// This program is free software; you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License version 2. | ||
// | ||
// 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, write to the Free Software | ||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
//============================================================================= | ||
#ifndef MU_SYSTEM_FILESYSTEMSTUB_H | ||
#define MU_SYSTEM_FILESYSTEMSTUB_H | ||
|
||
#include "system/ifilesystem.h" | ||
|
||
namespace mu::system { | ||
class FileSystemStub : public IFileSystem | ||
{ | ||
public: | ||
Ret exists(const io::path& path) const override; | ||
Ret remove(const io::path& path) const override; | ||
|
||
Ret makePath(const io::path& path) const override; | ||
|
||
RetVal<io::paths> scanFiles(const io::path& rootDir, const QStringList& filters, | ||
ScanMode mode = ScanMode::IncludeSubdirs) const override; | ||
|
||
RetVal<QByteArray> readFile(const io::path& filePath) const override; | ||
}; | ||
} | ||
|
||
#endif // MU_SYSTEM_FILESYSTEMSTUB_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
//============================================================================= | ||
// MuseScore | ||
// Music Composition & Notation | ||
// | ||
// Copyright (C) 2020 MuseScore BVBA and others | ||
// | ||
// This program is free software; you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License version 2. | ||
// | ||
// 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, write to the Free Software | ||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
//============================================================================= | ||
#include "systemstubmodule.h" | ||
|
||
#include "modularity/ioc.h" | ||
#include "filesystemstub.h" | ||
|
||
using namespace mu::system; | ||
using namespace mu::framework; | ||
|
||
std::string SystemStubModule::moduleName() const | ||
{ | ||
return "system_stub"; | ||
} | ||
|
||
void SystemStubModule::registerExports() | ||
{ | ||
ioc()->registerExport<IFileSystem>(moduleName(), new FileSystemStub()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
//============================================================================= | ||
// MuseScore | ||
// Music Composition & Notation | ||
// | ||
// Copyright (C) 2020 MuseScore BVBA and others | ||
// | ||
// This program is free software; you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License version 2. | ||
// | ||
// 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, write to the Free Software | ||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
//============================================================================= | ||
#ifndef MU_SYSTEM_SYSTEMSTUBMODULE_H | ||
#define MU_SYSTEM_SYSTEMSTUBMODULE_H | ||
|
||
#include "modularity/imodulesetup.h" | ||
|
||
namespace mu::system { | ||
class SystemStubModule : public framework::IModuleSetup | ||
{ | ||
public: | ||
std::string moduleName() const override; | ||
|
||
void registerExports() override; | ||
}; | ||
} | ||
|
||
#endif // MU_SYSTEM_SYSTEMSTUBMODULE_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters