Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
24 
25 #include <string>
26 #include <vector>
27 #include <map>
28 
30 
31 namespace ARDOUR {
32 
34 {
35 public:
36 
40  SessionDirectory (const std::string& session_path);
41 
45  SessionDirectory& operator= (const std::string& path);
46 
50  const std::string root_path() const { return m_root_path; }
51 
61  const std::string sound_path () const;
62 
72  const std::string sound_path_2X () const;
73 
79  const std::string midi_path () const;
80 
85  const std::string peak_path () const;
86 
91  const std::string video_path () const;
92 
98  const std::string dead_path () const;
99 
104  const std::string export_path () const;
105 
110  const std::string backup_path () const;
111 
116  bool is_valid () const;
117 
126  bool create ();
127 
133  const std::string sources_root() const;
134 
140  const std::string sources_root_2X() const;
141 
142 private:
143 
148  const std::string old_sound_path () const;
149 
153  const std::vector<std::string> sub_directories () const;
154 
156  std::string m_root_path;
157 
158  static std::map<std::string,std::string> root_cache;
159 };
160 
161 } // namespace ARDOUR
162 
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