diff options
author | Luciano Iam <lucianito@gmail.com> | 2020-04-12 10:02:07 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-13 16:29:37 +0200 |
commit | b66b2858b127c726d3ed2a5263cc9c51213f3774 (patch) | |
tree | 7cba118eb6fa5026926c16d2bb8f6f3fa8fe11ef /libs/surfaces/websockets | |
parent | d709d8b86801fa013907dc0de9055a34fa694c12 (diff) |
WebSockets: add version field in manifests and update loader
Diffstat (limited to 'libs/surfaces/websockets')
-rw-r--r-- | libs/surfaces/websockets/manifest.cc | 5 | ||||
-rw-r--r-- | libs/surfaces/websockets/manifest.h | 4 |
2 files changed, 7 insertions, 2 deletions
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_ |