X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fsession_directory.h;h=685f0870dd4e43c9881eb6323938730d1d07912c;hb=8648a8a13b04549362f14a0738947d997ef1abc7;hp=a5eecffe99985174780b02e19c3b5789b1d50771;hpb=04c1ce19607eb04a1c5b306952e0c8e29f64525c;p=ardour.git diff --git a/libs/ardour/ardour/session_directory.h b/libs/ardour/ardour/session_directory.h index a5eecffe99..685f0870dd 100644 --- a/libs/ardour/ardour/session_directory.h +++ b/libs/ardour/ardour/session_directory.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2007 Tim Mayberry + Copyright (C) 2007 Tim Mayberry This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,29 +22,31 @@ #include #include -#include +#include "ardour/libardour_visibility.h" namespace ARDOUR { -using std::string; -using std::vector; -using PBD::sys::path; - -class SessionDirectory +class LIBARDOUR_API SessionDirectory { public: + /** * @param session_path An absolute path to a session directory. */ - SessionDirectory (const string& session_path); + SessionDirectory (const std::string& session_path); + + /** + * Change the root path of this SessionDirectory object + */ + SessionDirectory& operator= (const std::string& path); /** * @return the absolute path to the root directory of the session */ - const path root_path() const { return m_root_path; } + const std::string root_path() const { return m_root_path; } /** - * @return the absolute path to the directory in which + * @return the absolute path to the directory in which * the session stores audio files. * * If the session is an older session with an existing @@ -52,48 +54,103 @@ public: * directory otherwise it will return the new location * of root_path()/interchange/session_name/audiofiles */ - const path sound_path () const; + const std::string sound_path () const; + + /** + * @return the absolute path to the directory in which + * the session stores audio files for Ardour 2.X. + * + * If the session is an older session with an existing + * "sounds" directory then it will return a path to that + * directory otherwise it will return the new location + * of root_path()/interchange/session_name/audiofiles + */ + const std::string sound_path_2X () const; + + /** + * @return the absolute path to the directory in which + * the session stores MIDI files, ie + * root_path()/interchange/session_name/midifiles + */ + const std::string midi_path () const; + + /** + * @return the absolute path to the directory in which + * the session stores MIDNAM patch files, ie + * root_path()/interchange/session_name/patchfiles + */ + const std::string midi_patch_path () const; /** * @return The absolute path to the directory in which all * peak files are stored for a session. */ - const path peak_path () const; + const std::string peak_path () const; /** - * @return The absolute path to the directory that audio + * @return The absolute path to the directory in which all + * video files are stored for a session. + */ + const std::string video_path () const; + + /** + * @return The absolute path to the directory that source * files are moved to when they are no longer part of the * session. */ - const path dead_sound_path () const; + const std::string dead_path () const; + + /** + * @return The absolute path to the directory that audio + * files are created in by default when exporting. + */ + const std::string export_path () const; /** - * @return true if session directory and all the required + * @return true if session directory and all the required * subdirectories exist. */ bool is_valid () const; /** - * @return true If a new session directory and all the - * subdirectories were created, otherwise false. + * Create the session directory and all the subdirectories. + * + * @return true If a new session directory and subdirectories were + * created, otherwise false. + * + * @post is_valid () */ bool create (); -protected: + /** + * @return The path to the directory under which source directories + * are created for different source types. + * i.e root_path()/interchange/session_name + */ + const std::string sources_root() const; + + /** + * @return The path to the directory under which source directories + * are created for different source types in Ardour 2.X + * i.e root_path()/interchange/session_name + */ + const std::string sources_root_2X() const; + +private: /** * @return The path to the old style sound directory. * It isn't created by create(). */ - const path old_sound_path () const; + const std::string old_sound_path () const; /** * @return a vector containing the fullpath of all subdirectories. */ - const vector sub_directories () const; + const std::vector sub_directories () const; /// The path to the root of the session directory. - const path m_root_path; + std::string m_root_path; }; } // namespace ARDOUR