diff options
Diffstat (limited to 'linden/indra/newview/llappviewer.h')
-rw-r--r-- | linden/indra/newview/llappviewer.h | 78 |
1 files changed, 34 insertions, 44 deletions
diff --git a/linden/indra/newview/llappviewer.h b/linden/indra/newview/llappviewer.h index 88f3fdd..b3f3681 100644 --- a/linden/indra/newview/llappviewer.h +++ b/linden/indra/newview/llappviewer.h | |||
@@ -36,15 +36,21 @@ class LLTextureCache; | |||
36 | class LLWorkerThread; | 36 | class LLWorkerThread; |
37 | class LLTextureFetch; | 37 | class LLTextureFetch; |
38 | 38 | ||
39 | class LLCommandLineParser; | ||
40 | |||
39 | class LLAppViewer : public LLApp | 41 | class LLAppViewer : public LLApp |
40 | { | 42 | { |
41 | public: | 43 | public: |
42 | LLAppViewer(); | 44 | LLAppViewer(); |
43 | virtual ~LLAppViewer(); | 45 | virtual ~LLAppViewer(); |
44 | 46 | ||
45 | // *NOTE:Mani - Don't use this! | 47 | /** |
46 | // Having | 48 | * @brief Access to the LLAppViewer singleton. |
47 | static LLAppViewer* instance() {return sInstance; } | 49 | * |
50 | * The LLAppViewer singleton is created in main()/WinMain(). | ||
51 | * So don't use it in pre-entry (static initialization) code. | ||
52 | */ | ||
53 | static LLAppViewer* instance() {return sInstance; } | ||
48 | 54 | ||
49 | // | 55 | // |
50 | // Main application logic | 56 | // Main application logic |
@@ -64,10 +70,6 @@ public: | |||
64 | bool quitRequested() { return mQuitRequested; } | 70 | bool quitRequested() { return mQuitRequested; } |
65 | bool logoutRequestSent() { return mLogoutRequestSent; } | 71 | bool logoutRequestSent() { return mLogoutRequestSent; } |
66 | 72 | ||
67 | // *FIX: This is meant to stay only until the command line issues are hashed out with repect to LLApp::parseCommandLine | ||
68 | // This version stores the argc and argv for later usage, make sure the params passed in last as long as this class. | ||
69 | bool tempStoreCommandOptions(int argc, char** argv); | ||
70 | |||
71 | void closeDebug(); | 73 | void closeDebug(); |
72 | 74 | ||
73 | const LLOSInfo& getOSInfo() const { return mSysOSInfo; } | 75 | const LLOSInfo& getOSInfo() const { return mSysOSInfo; } |
@@ -78,7 +80,9 @@ public: | |||
78 | S32 getCrashBehavior() const { return mCrashBehavior; } | 80 | S32 getCrashBehavior() const { return mCrashBehavior; } |
79 | void setCrashBehavior(S32 cb); | 81 | void setCrashBehavior(S32 cb); |
80 | virtual void handleCrashReporting() = 0; // What to do with crash report? | 82 | virtual void handleCrashReporting() = 0; // What to do with crash report? |
81 | static void handleViewerCrash(); // Hey! The viewer crashed. Do this. | 83 | virtual void handleSyncCrashTrace() = 0; // any low-level crash-prep that has to happen in the context of the crashing thread before the crash report is delivered. |
84 | static void handleViewerCrash(); // Hey! The viewer crashed. Do this, soon. | ||
85 | static void handleSyncViewerCrash(); // Hey! The viewer crashed. Do this right NOW in the context of the crashing thread. | ||
82 | 86 | ||
83 | // Thread accessors | 87 | // Thread accessors |
84 | static LLTextureCache* getTextureCache() { return sTextureCache; } | 88 | static LLTextureCache* getTextureCache() { return sTextureCache; } |
@@ -87,9 +91,6 @@ public: | |||
87 | 91 | ||
88 | const std::string& getSerialNumber() { return mSerialNumber; } | 92 | const std::string& getSerialNumber() { return mSerialNumber; } |
89 | 93 | ||
90 | // *FIX:Mani purgeCache was made public for parse_args(). | ||
91 | // If that beast is gone, make it private. | ||
92 | void purgeCache(); // Clear the local cache. | ||
93 | bool getPurgeCache() const { return mPurgeCache; } | 94 | bool getPurgeCache() const { return mPurgeCache; } |
94 | 95 | ||
95 | const LLString& getSecondLifeTitle() const; // The Second Life title. | 96 | const LLString& getSecondLifeTitle() const; // The Second Life title. |
@@ -101,8 +102,6 @@ public: | |||
101 | const std::vector<std::string>& getLoginURIs() const; | 102 | const std::vector<std::string>& getLoginURIs() const; |
102 | const std::string& getHelperURI() const; | 103 | const std::string& getHelperURI() const; |
103 | void resetURIs() const; | 104 | void resetURIs() const; |
104 | void setLoginPage(const std::string& login_page); | ||
105 | const std::string& getLoginPage(); | ||
106 | 105 | ||
107 | void forceDisconnect(const LLString& msg); // Force disconnection, with a message to the user. | 106 | void forceDisconnect(const LLString& msg); // Force disconnection, with a message to the user. |
108 | void badNetworkHandler(); // Cause a crash state due to bad network packet. | 107 | void badNetworkHandler(); // Cause a crash state due to bad network packet. |
@@ -125,23 +124,39 @@ public: | |||
125 | virtual void forceErrorInifiniteLoop(); | 124 | virtual void forceErrorInifiniteLoop(); |
126 | virtual void forceErrorSoftwareException(); | 125 | virtual void forceErrorSoftwareException(); |
127 | 126 | ||
127 | // *NOTE: There are currently 3 settings files: | ||
128 | // "Global", "PerAccount" and "CrashSettings" | ||
129 | // The list is found in app_settings/settings_files.xml | ||
130 | // but since they are used explicitly in code, | ||
131 | // the follow consts should also do the trick. | ||
132 | static const std::string sGlobalSettingsName; | ||
133 | static const std::string sPerAccountSettingsName; | ||
134 | static const std::string sCrashSettingsName; | ||
135 | |||
136 | void loadSettingsFromDirectory(ELLPath path_index); | ||
137 | |||
138 | std::string getSettingsFileName(const std::string& file); | ||
139 | |||
140 | |||
128 | protected: | 141 | protected: |
129 | virtual bool initWindow(); // Initialize the viewer's window. | 142 | virtual bool initWindow(); // Initialize the viewer's window. |
130 | virtual bool initLogging(); // Initialize log files, logging system, return false on failure. | 143 | virtual bool initLogging(); // Initialize log files, logging system, return false on failure. |
144 | virtual void initConsole() {}; // Initialize OS level debugging console. | ||
131 | virtual bool initHardwareTest() { return true; } // A false result indicates the app should quit. | 145 | virtual bool initHardwareTest() { return true; } // A false result indicates the app should quit. |
146 | |||
147 | virtual bool initParseCommandLine(LLCommandLineParser& clp) | ||
148 | { return true; } // Allow platforms to specify the command line args. | ||
132 | 149 | ||
133 | virtual std::string generateSerialNumber() = 0; // Platforms specific classes generate this. | 150 | virtual std::string generateSerialNumber() = 0; // Platforms specific classes generate this. |
134 | 151 | ||
135 | 152 | ||
136 | private: | 153 | private: |
137 | 154 | ||
138 | bool initEarlyConfiguration(); // Initialize setting needed by crash reporting. | ||
139 | bool initThreads(); // Initialize viewer threads, return false on failure. | 155 | bool initThreads(); // Initialize viewer threads, return false on failure. |
140 | bool initConfiguration(); // Initialize settings from the command line/config file. | 156 | bool initConfiguration(); // Initialize settings from the command line/config file. |
141 | 157 | ||
142 | bool initCache(); // Initialize local client cache. | 158 | bool initCache(); // Initialize local client cache. |
143 | 159 | void purgeCache(); // Clear the local cache. | |
144 | bool doConfigFromCommandLine(); // calls parse args. | ||
145 | 160 | ||
146 | void cleanupSavedSettings(); // Sets some config data to current or default values during cleanup. | 161 | void cleanupSavedSettings(); // Sets some config data to current or default values during cleanup. |
147 | void removeCacheFiles(const char *filemask); // Deletes cached files the match the given wildcard. | 162 | void removeCacheFiles(const char *filemask); // Deletes cached files the match the given wildcard. |
@@ -190,6 +205,8 @@ private: | |||
190 | 205 | ||
191 | bool mQuitRequested; // User wants to quit, may have modified documents open. | 206 | bool mQuitRequested; // User wants to quit, may have modified documents open. |
192 | bool mLogoutRequestSent; // Disconnect message sent to simulator, no longer safe to send messages to the sim. | 207 | bool mLogoutRequestSent; // Disconnect message sent to simulator, no longer safe to send messages to the sim. |
208 | S32 mYieldTime; | ||
209 | LLSD mSettingsFileList; | ||
193 | }; | 210 | }; |
194 | 211 | ||
195 | // consts from viewer.h | 212 | // consts from viewer.h |
@@ -200,35 +217,18 @@ const S32 AGENT_UPDATES_PER_SECOND = 10; | |||
200 | // | 217 | // |
201 | // "// llstartup" indicates that llstartup is the only client for this global. | 218 | // "// llstartup" indicates that llstartup is the only client for this global. |
202 | 219 | ||
203 | extern bool gVerifySSLCert; // parse_args setting used by llxmlrpctransaction.cpp | ||
204 | extern BOOL gHandleKeysAsync; // gSavedSettings used by llviewerdisplay.cpp & llviewermenu.cpp | 220 | extern BOOL gHandleKeysAsync; // gSavedSettings used by llviewerdisplay.cpp & llviewermenu.cpp |
205 | extern BOOL gProbeHardware; | ||
206 | extern LLString gDisabledMessage; // llstartup | 221 | extern LLString gDisabledMessage; // llstartup |
207 | extern BOOL gHideLinks; // used by llpanellogin, lllfloaterbuycurrency, llstartup | 222 | extern BOOL gHideLinks; // used by llpanellogin, lllfloaterbuycurrency, llstartup |
208 | extern LLSD gDebugInfo; | 223 | extern LLSD gDebugInfo; |
209 | 224 | ||
210 | extern BOOL gAllowIdleAFK; | 225 | extern BOOL gAllowIdleAFK; |
211 | extern F32 gAFKTimeout; | 226 | extern BOOL gAllowTapTapHoldRun; |
212 | extern BOOL gShowObjectUpdates; | 227 | extern BOOL gShowObjectUpdates; |
213 | 228 | ||
214 | extern BOOL gLogMessages; // llstartup | ||
215 | extern std::string gChannelName; | ||
216 | extern BOOL gUseAudio; // llstartup | ||
217 | |||
218 | extern LLString gCmdLineFirstName; // llstartup | ||
219 | extern LLString gCmdLineLastName; | ||
220 | extern LLString gCmdLinePassword; | ||
221 | |||
222 | extern BOOL gAutoLogin; // llstartup | ||
223 | extern const char* DEFAULT_SETTINGS_FILE; // llstartup | ||
224 | |||
225 | extern BOOL gRequestInventoryLibrary; // llstartup | ||
226 | extern BOOL gGodConnect; // llstartup | ||
227 | |||
228 | extern BOOL gAcceptTOS; | 229 | extern BOOL gAcceptTOS; |
229 | extern BOOL gAcceptCriticalMessage; | 230 | extern BOOL gAcceptCriticalMessage; |
230 | 231 | ||
231 | extern LLUUID gViewerDigest; // MD5 digest of the viewer's executable file. | ||
232 | 232 | ||
233 | typedef enum | 233 | typedef enum |
234 | { | 234 | { |
@@ -271,7 +271,6 @@ extern LLUUID gInventoryLibraryOwner; | |||
271 | extern LLUUID gInventoryLibraryRoot; | 271 | extern LLUUID gInventoryLibraryRoot; |
272 | 272 | ||
273 | extern BOOL gDisconnected; | 273 | extern BOOL gDisconnected; |
274 | extern BOOL gDisableVoice; | ||
275 | 274 | ||
276 | // Map scale in pixels per region | 275 | // Map scale in pixels per region |
277 | extern F32 gMapScale; | 276 | extern F32 gMapScale; |
@@ -281,9 +280,6 @@ extern LLFrameTimer gRestoreGLTimer; | |||
281 | extern BOOL gRestoreGL; | 280 | extern BOOL gRestoreGL; |
282 | extern BOOL gUseWireframe; | 281 | extern BOOL gUseWireframe; |
283 | 282 | ||
284 | extern F32 gMouseSensitivity; | ||
285 | extern BOOL gInvertMouse; | ||
286 | |||
287 | // VFS globals - gVFS is for general use | 283 | // VFS globals - gVFS is for general use |
288 | // gStaticVFS is read-only and is shipped w/ the viewer | 284 | // gStaticVFS is read-only and is shipped w/ the viewer |
289 | // it has pre-cache data like the UI .TGAs | 285 | // it has pre-cache data like the UI .TGAs |
@@ -291,9 +287,6 @@ extern LLVFS *gStaticVFS; | |||
291 | 287 | ||
292 | extern LLMemoryInfo gSysMemory; | 288 | extern LLMemoryInfo gSysMemory; |
293 | 289 | ||
294 | extern bool gPreloadImages; | ||
295 | extern bool gPreloadSounds; | ||
296 | |||
297 | extern LLString gLastVersionChannel; | 290 | extern LLString gLastVersionChannel; |
298 | 291 | ||
299 | extern LLVector3 gWindVec; | 292 | extern LLVector3 gWindVec; |
@@ -304,10 +297,7 @@ extern BOOL gPrintMessagesThisFrame; | |||
304 | extern LLUUID gSunTextureID; | 297 | extern LLUUID gSunTextureID; |
305 | extern LLUUID gMoonTextureID; | 298 | extern LLUUID gMoonTextureID; |
306 | 299 | ||
307 | extern BOOL gUseConsole; | ||
308 | |||
309 | extern BOOL gRandomizeFramerate; | 300 | extern BOOL gRandomizeFramerate; |
310 | extern BOOL gPeriodicSlowFrame; | 301 | extern BOOL gPeriodicSlowFrame; |
311 | 302 | ||
312 | extern BOOL gQAMode; | ||
313 | #endif // LL_LLAPPVIEWER_H | 303 | #endif // LL_LLAPPVIEWER_H |