4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 * The Original Code is Copyright (C) 2009 Blender Foundation.
21 * All rights reserved.
24 * Contributor(s): Blender Foundation
26 * ***** END GPL LICENSE BLOCK *****
29 /** \file ghost/GHOST_ISystemPaths.h
33 #ifndef _GHOST_ISYSTEMPATHS_H_
34 #define _GHOST_ISYSTEMPATHS_H_
36 #include "GHOST_Types.h"
38 class GHOST_ISystemPaths
42 * Creates the one and only system.
43 * @return An indication of success.
45 static GHOST_TSuccess create();
48 * Disposes the one and only system.
49 * @return An indication of success.
51 static GHOST_TSuccess dispose();
54 * Returns a pointer to the one and only system (nil if it hasn't been created).
55 * @return A pointer to the system.
57 static GHOST_ISystemPaths* get();
62 * Protected default constructor to force use of static createSystem member.
64 GHOST_ISystemPaths() {}
68 * Protected default constructor to force use of static dispose member.
70 virtual ~GHOST_ISystemPaths() {}
74 * Determine the base dir in which shared resources are located. It will first try to use
75 * "unpack and run" path, then look for properly installed path, not including versioning.
76 * @return Unsigned char string pointing to system dir (eg /usr/share/blender/).
78 virtual const GHOST_TUns8* getSystemDir() const = 0;
81 * Determine the base dir in which user configuration is stored, not including versioning.
82 * If needed, it will create the base directory.
83 * @return Unsigned char string pointing to user dir (eg ~/.blender/).
85 virtual const GHOST_TUns8* getUserDir() const = 0;
88 * Determine the directory of the current binary
89 * @return Unsigned char string pointing to the binary dir
91 virtual const GHOST_TUns8* getBinaryDir() const = 0;
94 * Add the file to the operating system most recently used files
96 virtual void addToSystemRecentFiles(const char* filename) const = 0;
99 /** The one and only system paths*/
100 static GHOST_ISystemPaths* m_systemPaths;