Ardour  8.12
session_directory.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007-2009 David Robillard <d@drobilla.net>
3  * Copyright (C) 2007-2012 Tim Mayberry <mojofunk@gmail.com>
4  * Copyright (C) 2008-2013 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
6  * Copyright (C) 2013-2015 Robin Gareus <robin@gareus.org>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program; if not, write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #ifndef __ardour_session_directory_h__
24 #define __ardour_session_directory_h__
25 
26 #include <string>
27 #include <vector>
28 #include <map>
29 
31 
32 namespace ARDOUR {
33 
35 {
36 public:
37 
41  SessionDirectory (const std::string& session_path);
42 
46  SessionDirectory& operator= (const std::string& path);
47 
51  const std::string root_path() const { return m_root_path; }
52 
62  const std::string sound_path () const;
63 
73  const std::string sound_path_2X () const;
74 
80  const std::string midi_path () const;
81 
86  const std::string peak_path () const;
87 
92  const std::string video_path () const;
93 
99  const std::string dead_path () const;
100 
105  const std::string export_path () const;
106 
111  const std::string backup_path () const;
112 
117  bool is_valid () const;
118 
127  bool create ();
128 
134  const std::string sources_root() const;
135 
141  const std::string sources_root_2X() const;
142 
143 private:
144 
149  const std::string old_sound_path () const;
150 
154  const std::vector<std::string> sub_directories () const;
155 
157  std::string m_root_path;
158 
159  static std::map<std::string,std::string> root_cache;
160 };
161 
162 } // namespace ARDOUR
163 
164 #endif
const std::string peak_path() const
const std::string root_path() const
const std::string sources_root_2X() const
const std::string sound_path() const
const std::string export_path() const
const std::string backup_path() const
std::string m_root_path
The path to the root of the session directory.
SessionDirectory(const std::string &session_path)
static std::map< std::string, std::string > root_cache
const std::vector< std::string > sub_directories() const
const std::string sources_root() const
const std::string sound_path_2X() const
const std::string old_sound_path() const
const std::string dead_path() const
const std::string midi_path() const
const std::string video_path() const
#define LIBARDOUR_API