From b66b2858b127c726d3ed2a5263cc9c51213f3774 Mon Sep 17 00:00:00 2001 From: Luciano Iam Date: Sun, 12 Apr 2020 10:02:07 +0200 Subject: WebSockets: add version field in manifests and update loader --- libs/surfaces/websockets/manifest.cc | 5 ++++- libs/surfaces/websockets/manifest.h | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'libs') diff --git a/libs/surfaces/websockets/manifest.cc b/libs/surfaces/websockets/manifest.cc index 85407a231d..92fa57e5b6 100644 --- a/libs/surfaces/websockets/manifest.cc +++ b/libs/surfaces/websockets/manifest.cc @@ -54,10 +54,12 @@ SurfaceManifest::SurfaceManifest (std::string path) _name = value; } else if (name == "Description") { _description = value; + } else if (name == "Version") { + _version = value; } } - if (_name.empty () || _description.empty ()) { + if (_name.empty () || _description.empty () || _version.empty ()) { #ifndef NDEBUG std::cerr << "SurfaceManifest: missing properties in " << xml_path << std::endl; #endif @@ -76,6 +78,7 @@ SurfaceManifest::to_json () << "\"path\":\"" << Glib::path_get_basename (_path) << "\"" << ",\"name\":\"" << _name << "\"" << ",\"description\":\"" << _description << "\"" + << ",\"version\":\"" << _version << "\"" << "}"; return ss.str (); diff --git a/libs/surfaces/websockets/manifest.h b/libs/surfaces/websockets/manifest.h index 5c776639c3..45ecc37f6a 100644 --- a/libs/surfaces/websockets/manifest.h +++ b/libs/surfaces/websockets/manifest.h @@ -24,7 +24,7 @@ class SurfaceManifest { public: - // all ardour control surfaces store presets in xml format + // all ardour control surfaces implement presets using xml format SurfaceManifest (std::string); bool valid () { return _valid; } @@ -32,6 +32,7 @@ public: std::string path () { return _path; } std::string name () { return _name; } std::string description () { return _description; } + std::string version () { return _version; } std::string to_json (); @@ -43,6 +44,7 @@ private: std::string _path; std::string _name; std::string _description; + std::string _version; }; #endif // _ardour_surface_websockets_manifest_h_ -- cgit v1.2.3