diff options
author | haslersn <sebastian.hasler@gmx.net> | 2019-07-06 15:58:22 +0200 |
---|---|---|
committer | haslersn <sebastian.hasler@gmx.net> | 2019-07-08 00:39:02 +0200 |
commit | 2777ca1413361bbc78f22b16ec1e62e30a119a7c (patch) | |
tree | ae455034ec6031d3549959efa06d24aa7bd4b521 /include | |
parent | 4cbbd95eff4488d0f509ac40ae6568ff85b3e120 (diff) |
database: Outsource {music, perfdata}_db_path() to namespace djinterop::enginelibrary
Diffstat (limited to 'include')
-rw-r--r-- | include/djinterop/database.hpp | 6 | ||||
-rw-r--r-- | include/djinterop/enginelibrary.hpp | 14 |
2 files changed, 14 insertions, 6 deletions
diff --git a/include/djinterop/database.hpp b/include/djinterop/database.hpp index f6b321d..3a93762 100644 --- a/include/djinterop/database.hpp +++ b/include/djinterop/database.hpp @@ -90,12 +90,6 @@ public: /// `libdjinterop` or not bool is_supported() const; - /// Returns the path to the music database, i.e. m.db - std::string music_db_path() const; - - /// Returns the path to the performance data database, i.e. p.db - std::string perfdata_db_path() const; - /// Returns the UUID of the database std::string uuid() const; diff --git a/include/djinterop/enginelibrary.hpp b/include/djinterop/enginelibrary.hpp index 0549560..5a957cf 100644 --- a/include/djinterop/enginelibrary.hpp +++ b/include/djinterop/enginelibrary.hpp @@ -27,6 +27,13 @@ database make_database( std::string directory, const semantic_version& default_version = version_latest); +/// Given an enginelibrary database, returns the path to its m.db sqlite +/// database file +/// +/// If the given database is not an enginelibrary, then the behaviour of this +/// function is undefined. +std::string music_db_path(const database& db); + /// Normalizes a beat-grid, so that the beat indexes are in the form normally /// expected by Engine Prime. /// @@ -38,5 +45,12 @@ database make_database( std::vector<beatgrid_marker> normalize_beatgrid( std::vector<beatgrid_marker> beatgrid, int64_t sample_count); +/// Given an enginelibrary database, returns the path to its p.db sqlite +/// database file +/// +/// If the given database is not an enginelibrary, then the behaviour of this +/// function is undefined. +std::string perfdata_db_path(const database& db); + } // namespace enginelibrary } // namespace djinterop |