From 2777ca1413361bbc78f22b16ec1e62e30a119a7c Mon Sep 17 00:00:00 2001 From: haslersn Date: Sat, 6 Jul 2019 15:58:22 +0200 Subject: database: Outsource {music, perfdata}_db_path() to namespace djinterop::enginelibrary --- include/djinterop/database.hpp | 6 ------ include/djinterop/enginelibrary.hpp | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'include') 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 normalize_beatgrid( std::vector 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 -- cgit v1.2.3