allow zero-input (i.e. tone generator) processors to be added
[ardour2.git] / libs / pbd / filesystem_paths.cc
blob7f0ac62d0f85dffdb3d77c0edf9c8f184d995fef
1 /*
2 Copyright (C) 2007 Tim Mayberry
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 #include <glib.h>
21 #include "pbd/filesystem_paths.h"
23 namespace PBD {
25 std::vector<sys::path>
26 system_data_directories ()
28 std::vector<sys::path> tmp;
29 const char * const * dirs;
31 dirs = g_get_system_data_dirs ();
33 if (dirs == NULL) return tmp;
35 for (int i = 0; dirs[i] != NULL; ++i)
37 tmp.push_back(dirs[i]);
40 return tmp;
43 std::vector<sys::path>
44 system_config_directories ()
46 std::vector<sys::path> tmp;
47 const char * const * dirs;
49 dirs = g_get_system_config_dirs ();
51 if (dirs == NULL) return tmp;
53 for (int i = 0; dirs[i] != NULL; ++i)
55 tmp.push_back(dirs[i]);
58 return tmp;
61 } // namespace PBD