diff options
Diffstat (limited to 'indra/newview/llappviewer.h')
-rw-r--r-- | indra/newview/llappviewer.h | 94 |
1 files changed, 48 insertions, 46 deletions
diff --git a/indra/newview/llappviewer.h b/indra/newview/llappviewer.h index 75033698b6..c5cac6827c 100644 --- a/indra/newview/llappviewer.h +++ b/indra/newview/llappviewer.h @@ -2,46 +2,46 @@ * @file llappviewer.h * @brief The LLAppViewer class declaration * - * $LicenseInfo:firstyear=2007&license=viewergpl$ - * - * Copyright (c) 2007-2009, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2007&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ #ifndef LL_LLAPPVIEWER_H #define LL_LLAPPVIEWER_H +#include "llallocator.h" #include "llcontrol.h" +#include "llsys.h" // for LLOSInfo +#include "lltimer.h" +class LLCommandLineParser; +class LLFrameTimer; +class LLPumpIO; class LLTextureCache; -class LLWorkerThread; +class LLImageDecodeThread; class LLTextureFetch; class LLWatchdogTimeout; class LLCommandLineParser; -class LLAllocator; +struct apr_dso_handle_t; class LLAppViewer : public LLApp { @@ -86,16 +86,17 @@ public: virtual bool restoreErrorTrap() = 0; // Require platform specific override to reset error handling mechanism. // return false if the error trap needed restoration. virtual void handleCrashReporting(bool reportFreeze = false) = 0; // What to do with crash report? - 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. static void handleViewerCrash(); // Hey! The viewer crashed. Do this, soon. - static void handleSyncViewerCrash(); // Hey! The viewer crashed. Do this right NOW in the context of the crashing thread. void checkForCrash(); // Thread accessors static LLTextureCache* getTextureCache() { return sTextureCache; } - static LLWorkerThread* getImageDecodeThread() { return sImageDecodeThread; } + static LLImageDecodeThread* getImageDecodeThread() { return sImageDecodeThread; } static LLTextureFetch* getTextureFetch() { return sTextureFetch; } + static U32 getTextureCacheVersion() ; + static U32 getObjectCacheVersion() ; + const std::string& getSerialNumber() { return mSerialNumber; } bool getPurgeCache() const { return mPurgeCache; } @@ -119,7 +120,7 @@ public: virtual void forceErrorLLError(); virtual void forceErrorBreakpoint(); virtual void forceErrorBadMemoryAccess(); - virtual void forceErrorInifiniteLoop(); + virtual void forceErrorInfiniteLoop(); virtual void forceErrorSoftwareException(); virtual void forceErrorDriverCrash(); @@ -156,6 +157,17 @@ public: LLAllocator & getAllocator() { return mAlloc; } + // On LoginCompleted callback + typedef boost::signals2::signal<void (void)> login_completed_signal_t; + login_completed_signal_t mOnLoginCompleted; + boost::signals2::connection setOnLoginCompletedCallback( const login_completed_signal_t::slot_type& cb ) { return mOnLoginCompleted.connect(cb); } + + void purgeCache(); // Clear the local cache. + + // mute/unmute the system's master audio + virtual void setMasterSystemAudioMute(bool mute); + virtual bool getMasterSystemAudioMute(); + protected: virtual bool initWindow(); // Initialize the viewer's window. virtual bool initLogging(); // Initialize log files, logging system, return false on failure. @@ -174,10 +186,9 @@ private: bool initThreads(); // Initialize viewer threads, return false on failure. bool initConfiguration(); // Initialize settings from the command line/config file. - void initGridChoice(); bool initCache(); // Initialize local client cache. - void purgeCache(); // Clear the local cache. + // We have switched locations of both Mac and Windows cache, make sure // files migrate and old cache is cleared out. @@ -198,6 +209,8 @@ private: void sendLogoutRequest(); void disconnectViewer(); + void loadEventHostModule(S32 listen_port); + // *FIX: the app viewer class should be some sort of singleton, no? // Perhaps its child class is the singleton and this should be an abstract base. static LLAppViewer* sInstance; @@ -216,7 +229,7 @@ private: // Thread objects. static LLTextureCache* sTextureCache; - static LLWorkerThread* sImageDecodeThread; + static LLImageDecodeThread* sImageDecodeThread; static LLTextureFetch* sTextureFetch; S32 mNumSessions; @@ -243,6 +256,8 @@ private: LLAllocator mAlloc; + std::set<struct apr_dso_handle_t*> mPlugins; + public: //some information for updater typedef struct @@ -251,6 +266,8 @@ public: std::ostringstream mParams; }LLUpdaterInfo ; static LLUpdaterInfo *sUpdaterInfo ; + + void launchUpdater(); }; // consts from viewer.h @@ -262,14 +279,8 @@ const S32 AGENT_UPDATES_PER_SECOND = 10; // "// llstartup" indicates that llstartup is the only client for this global. extern LLSD gDebugInfo; - -extern BOOL gAllowTapTapHoldRun; extern BOOL gShowObjectUpdates; -extern BOOL gAcceptTOS; -extern BOOL gAcceptCriticalMessage; - - typedef enum { LAST_EXEC_NORMAL = 0, @@ -287,10 +298,6 @@ extern U32 gForegroundFrameCount; extern LLPumpIO* gServicePump; -// Is the Pacific time zone (aka server time zone) -// currently in daylight savings time? -extern BOOL gPacificDaylightTime; - extern U64 gFrameTime; // The timestamp of the most-recently-processed frame extern F32 gFrameTimeSeconds; // Loses msec precision after ~4.5 hours... extern F32 gFrameIntervalSeconds; // Elapsed time between current and previous gFrameTimeSeconds @@ -308,14 +315,8 @@ extern LLTimer gLogoutTimer; extern F32 gSimLastTime; extern F32 gSimFrames; -extern LLUUID gInventoryLibraryOwner; -extern LLUUID gInventoryLibraryRoot; - extern BOOL gDisconnected; -// Map scale in pixels per region -extern F32 gMapScale; - extern LLFrameTimer gRestoreGLTimer; extern BOOL gRestoreGL; extern BOOL gUseWireframe; @@ -323,6 +324,7 @@ extern BOOL gUseWireframe; // VFS globals - gVFS is for general use // gStaticVFS is read-only and is shipped w/ the viewer // it has pre-cache data like the UI .TGAs +class LLVFS; extern LLVFS *gStaticVFS; extern LLMemoryInfo gSysMemory; |