Line data Source code
1 : /*
2 : * SPDX-License-Identifier: GPL-3.0-only
3 : * MuseScore-Studio-CLA-applies
4 : *
5 : * MuseScore Studio
6 : * Music Composition & Notation
7 : *
8 : * Copyright (C) 2021 MuseScore Limited and others
9 : *
10 : * This program is free software: you can redistribute it and/or modify
11 : * it under the terms of the GNU General Public License version 3 as
12 : * published by the Free Software Foundation.
13 : *
14 : * This program is distributed in the hope that it will be useful,
15 : * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 : * GNU General Public License for more details.
18 : *
19 : * You should have received a copy of the GNU General Public License
20 : * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 : */
22 : #pragma once
23 :
24 : #include "modularity/imoduleinterface.h"
25 :
26 : #include "convertertypes.h"
27 :
28 : #include "global/types/ret.h"
29 : #include "global/types/uri.h"
30 : #include "global/io/path.h"
31 : #include "global/progress.h"
32 :
33 : namespace mu::converter {
34 : class IConverterController : MODULE_CONTEXT_INTERFACE
35 : {
36 0 : INTERFACE_ID(IConverterController)
37 : public:
38 17 : virtual ~IConverterController() = default;
39 :
40 : virtual muse::Ret fileConvert(const muse::io::path_t& in, const muse::io::path_t& out, const OpenParams& openParams = {},
41 : const muse::String& soundProfile = {}, const muse::io::path_t& tracksDiffPath = {},
42 : const muse::UriQuery& extensionUri = {}, const std::string& transposeOptionsJson = {},
43 : const std::optional<ConvertTarget>& target = std::nullopt) = 0;
44 :
45 : virtual muse::Ret batchConvert(const muse::io::path_t& batchJobFile, const OpenParams& openParams = {},
46 : const muse::String& soundProfile = {}, const muse::UriQuery& extensionUri = {},
47 : muse::ProgressPtr progress = nullptr) = 0;
48 :
49 : virtual muse::Ret convertScoreParts(const muse::io::path_t& in, const muse::io::path_t& out, const OpenParams& openParams = {}) = 0;
50 :
51 : virtual muse::Ret exportScoreMedia(const muse::io::path_t& in, const muse::io::path_t& out, const OpenParams& openParams = {},
52 : const muse::io::path_t& highlightConfigPath = muse::io::path_t()) = 0;
53 : virtual muse::Ret exportScoreMeta(const muse::io::path_t& in, const muse::io::path_t& out, const OpenParams& openParams = {}) = 0;
54 : virtual muse::Ret exportScoreParts(const muse::io::path_t& in, const muse::io::path_t& out, const OpenParams& openParams = {}) = 0;
55 : virtual muse::Ret exportScorePartsPdfs(const muse::io::path_t& in, const muse::io::path_t& out, const OpenParams& openParams = {}) = 0;
56 : virtual muse::Ret exportScoreTranspose(const muse::io::path_t& in, const muse::io::path_t& out, const std::string& optionsJson,
57 : const OpenParams& openParams = {}) = 0;
58 :
59 : virtual muse::Ret exportScoreElements(const muse::io::path_t& in, const muse::io::path_t& out, const OpenParams& openParams = {}) = 0;
60 :
61 : virtual muse::Ret exportScoreVideo(const muse::io::path_t& in, const muse::io::path_t& out, const OpenParams& openParams = {},
62 : bool withAudio = true) = 0;
63 :
64 : virtual muse::Ret updateSource(const muse::io::path_t& in, const std::string& newSource, bool forceMode = false) = 0;
65 : };
66 : }
|