lv2PresetExport.h (848B)
1 #pragma once 2 3 #include <cstdint> 4 #include <string> 5 #include <vector> 6 7 namespace synthLib 8 { 9 class Lv2PresetExport 10 { 11 public: 12 using PresetData = std::vector<uint8_t>; 13 14 struct Preset 15 { 16 std::string name; 17 PresetData data; 18 }; 19 20 struct Bank 21 { 22 std::string name; 23 std::vector<Preset> presets; 24 }; 25 26 static bool exportPresets(const std::string& _outputPath, const std::string& _pluginId, const std::vector<Bank>& _banks); 27 static bool exportPresets(const std::string& _outputPath, const std::string& _pluginId, const Bank& _bank); 28 29 static std::string getBankPath(const std::string& _outputPath, const std::string& _bankName); 30 static std::string getManifestFilename(const std::string& _path); 31 32 static std::string getBankFilename(const std::string& _bankName); 33 static bool manifestFileExists(const std::string& _path); 34 }; 35 }