Move 'template_search_path()' and 'route_template_search_path()' into 'libs/ardour...
authorJohn Emmas <johne53@tiscali.co.uk>
Mon, 10 Mar 2014 15:59:12 +0000 (15:59 +0000)
committerJohn Emmas <johne53@tiscali.co.uk>
Mon, 10 Mar 2014 16:24:10 +0000 (16:24 +0000)
libs/ardour/ardour/search_paths.h
libs/ardour/search_paths.cc
libs/ardour/template_utils.cc

index 85ed2cbfd77f19e1f5dc39f14a0a6113e8cda90b..d52e4de0583cf6e4744a3353b092b6365bd133ec 100644 (file)
@@ -93,6 +93,18 @@ namespace ARDOUR {
         */
        LIBARDOUR_API PBD::Searchpath panner_search_path ();
 
+       /**
+        * return a Searchpath containing directories in which to look for
+        * route templates.
+        */
+       LIBARDOUR_API PBD::Searchpath route_template_search_path ();
+
+       /**
+        * return a Searchpath containing directories in which to look for
+        * other templates.
+        */
+       LIBARDOUR_API PBD::Searchpath template_search_path ();
+
 } // namespace ARDOUR
 
 #endif /* __libardour_search_paths_h__ */
index 09227f6347a84e90e70c6714177bd4a9d5da4d11..0efcce6451b5b61763557315e1b8b3282976ce45 100644 (file)
@@ -147,6 +147,22 @@ panner_search_path ()
        return spath;
 }
 
+Searchpath
+template_search_path ()
+{
+       Searchpath spath (ardour_data_search_path());
+       spath.add_subdirectory_to_paths(templates_dir_name);
+       return spath;
+}
+
+Searchpath
+route_template_search_path ()
+{
+       Searchpath spath (ardour_data_search_path());
+       spath.add_subdirectory_to_paths(route_templates_dir_name);
+       return spath;
+}
+
 #ifdef PLATFORM_WINDOWS
 
 const char*
index b912fdc446620a6630f352f5ef6337226ef9865b..8efe3115366594cbebc75d0de974a13b1b07fc80 100644 (file)
@@ -30,6 +30,7 @@
 #include "ardour/directory_names.h"
 #include "ardour/filesystem_paths.h"
 #include "ardour/filename_extensions.h"
+#include "ardour/search_paths.h"
 #include "ardour/io.h"
 
 using namespace std;
@@ -37,22 +38,6 @@ using namespace PBD;
 
 namespace ARDOUR {
 
-Searchpath
-template_search_path ()
-{
-       Searchpath spath (ardour_data_search_path());
-       spath.add_subdirectory_to_paths(templates_dir_name);
-       return spath;
-}
-
-Searchpath
-route_template_search_path ()
-{
-       Searchpath spath (ardour_data_search_path());
-       spath.add_subdirectory_to_paths(route_templates_dir_name);
-       return spath;
-}
-
 std::string
 user_template_directory ()
 {