aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llvfs/lldir.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llvfs/lldir.h')
-rw-r--r--linden/indra/llvfs/lldir.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/linden/indra/llvfs/lldir.h b/linden/indra/llvfs/lldir.h
index c8eeaa2..8734c44 100644
--- a/linden/indra/llvfs/lldir.h
+++ b/linden/indra/llvfs/lldir.h
@@ -32,6 +32,7 @@
32#ifndef LL_LLDIR_H 32#ifndef LL_LLDIR_H
33#define LL_LLDIR_H 33#define LL_LLDIR_H
34 34
35// these numbers *may* get serialized, so we need to be explicit
35typedef enum ELLPath 36typedef enum ELLPath
36{ 37{
37 LL_PATH_NONE = 0, 38 LL_PATH_NONE = 0,
@@ -49,8 +50,8 @@ typedef enum ELLPath
49 LL_PATH_CHAT_LOGS = 12, 50 LL_PATH_CHAT_LOGS = 12,
50 LL_PATH_PER_ACCOUNT_CHAT_LOGS = 13, 51 LL_PATH_PER_ACCOUNT_CHAT_LOGS = 13,
51 LL_PATH_MOZILLA_PROFILE = 14, 52 LL_PATH_MOZILLA_PROFILE = 14,
52 LL_PATH_HTML = 15, 53// LL_PATH_HTML = 15,
53 LL_PATH_COUNT = 16 54 LL_PATH_LAST = 16
54} ELLPath; 55} ELLPath;
55 56
56 57
@@ -69,9 +70,9 @@ class LLDir
69 virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap) = 0; 70 virtual BOOL getNextFileInDir(const std::string &dirname, const std::string &mask, std::string &fname, BOOL wrap) = 0;
70 virtual void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) = 0; 71 virtual void getRandomFileInDir(const std::string &dirname, const std::string &mask, std::string &fname) = 0;
71 virtual std::string getCurPath() = 0; 72 virtual std::string getCurPath() = 0;
72 virtual BOOL fileExists(const std::string &filename) = 0; 73 virtual BOOL fileExists(const std::string &filename) const = 0;
73 74
74 const std::string findFile(const std::string &filename, const std::string searchPath1 = "", const std::string searchPath2 = "", const std::string searchPath3 = ""); 75 const std::string findFile(const std::string &filename, const std::string searchPath1 = "", const std::string searchPath2 = "", const std::string searchPath3 = "") const;
75 const std::string &getExecutablePathAndName() const; // Full pathname of the executable 76 const std::string &getExecutablePathAndName() const; // Full pathname of the executable
76 const std::string &getAppName() const; // install directory under progams/ ie "SecondLife" 77 const std::string &getAppName() const; // install directory under progams/ ie "SecondLife"
77 const std::string &getExecutableDir() const; // Directory where the executable is located 78 const std::string &getExecutableDir() const; // Directory where the executable is located
@@ -88,10 +89,21 @@ class LLDir
88 const std::string &getCAFile() const; // File containing TLS certificate authorities 89 const std::string &getCAFile() const; // File containing TLS certificate authorities
89 const std::string &getDirDelimiter() const; // directory separator for platform (ie. '\' or '/' or ':') 90 const std::string &getDirDelimiter() const; // directory separator for platform (ie. '\' or '/' or ':')
90 const std::string &getSkinDir() const; // User-specified skin folder. 91 const std::string &getSkinDir() const; // User-specified skin folder.
92 const std::string &getUserSkinDir() const; // User-specified skin folder with user modifications. e.g. c:\documents and settings\username\application data\second life\skins\curskin
93 const std::string &getDefaultSkinDir() const; // folder for default skin. e.g. c:\program files\second life\skins\default
94 const std::string getSkinBaseDir() const; // folder that contains all installed skins (not user modifications). e.g. c:\program files\second life\skins
91 95
92 // Expanded filename 96 // Expanded filename
93 std::string getExpandedFilename(ELLPath location, const std::string &filename) const; 97 std::string getExpandedFilename(ELLPath location, const std::string &filename) const;
94 std::string getExpandedFilename(ELLPath location, const std::string &subdir, const std::string &filename) const; 98 std::string getExpandedFilename(ELLPath location, const std::string &subdir, const std::string &filename) const;
99 std::string getExpandedFilename(ELLPath location, const std::string &subdir1, const std::string &subdir2, const std::string &filename) const;
100
101 // these methods search the various skin paths for the specified file in the following order:
102 // getUserSkinDir(), getSkinDir(), getDefaultSkinDir()
103 std::string findSkinnedFilename(const std::string &filename) const;
104 std::string findSkinnedFilename(const std::string &subdir, const std::string &filename) const;
105 std::string findSkinnedFilename(const std::string &subdir1, const std::string &subdir2, const std::string &filename) const;
106
95 107
96 // random filename in common temporary directory 108 // random filename in common temporary directory
97 std::string getTempFilename() const; 109 std::string getTempFilename() const;
@@ -120,7 +132,9 @@ protected:
120 std::string mTempDir; 132 std::string mTempDir;
121 std::string mCacheDir; 133 std::string mCacheDir;
122 std::string mDirDelimiter; 134 std::string mDirDelimiter;
123 std::string mSkinDir; // Location for u ser-specified skin info. 135 std::string mSkinDir; // Location for current skin info.
136 std::string mDefaultSkinDir; // Location for default skin info.
137 std::string mUserSkinDir; // Location for user-modified skin info.
124}; 138};
125 139
126void dir_exists_or_crash(const std::string &dir_name); 140void dir_exists_or_crash(const std::string &dir_name);