llappviewerlinux.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /**
  2. * @file llappviewerlinux.h
  3. * @brief The LLAppViewerLinux class declaration
  4. *
  5. * $LicenseInfo:firstyear=2007&license=viewergpl$
  6. *
  7. * Copyright (c) 2007-2009, Linden Research, Inc.
  8. * Copyright (c) 2013-2022, Henri Beauchamp.
  9. *
  10. * Second Life Viewer Source Code
  11. * The source code in this file ("Source Code") is provided by Linden Lab
  12. * to you under the terms of the GNU General Public License, version 2.0
  13. * ("GPL"), unless you have obtained a separate licensing agreement
  14. * ("Other License"), formally executed by you and Linden Lab. Terms of
  15. * the GPL can be found in doc/GPL-license.txt in this distribution, or
  16. * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
  17. *
  18. * There are special exceptions to the terms and conditions of the GPL as
  19. * it is applied to this Source Code. View the full text of the exception
  20. * in the file doc/FLOSS-exception.txt in this software distribution, or
  21. * online at
  22. * http://secondlifegrid.net/programs/open_source/licensing/flossexception
  23. *
  24. * By copying, modifying or distributing this software, you acknowledge
  25. * that you have read and understood your obligations described above,
  26. * and agree to abide by those obligations.
  27. *
  28. * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
  29. * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
  30. * COMPLETENESS OR PERFORMANCE.
  31. * $/LicenseInfo$
  32. */
  33. #ifndef LL_LLAPPVIEWERLINUX_H
  34. #define LL_LLAPPVIEWERLINUX_H
  35. #include "llappviewer.h"
  36. class LLCommandLineParser;
  37. class LLAppViewerLinux final : public LLAppViewer
  38. {
  39. protected:
  40. LOG_CLASS(LLAppViewerLinux);
  41. public:
  42. LLAppViewerLinux() = default;
  43. std::string generateSerialNumber() override;
  44. bool setupSLURLHandler();
  45. #if !LL_CALL_SLURL_DISPATCHER_IN_CALLBACK
  46. // Used by the DBus callback, thus static and public.
  47. LL_INLINE static void setReceivedSLURL(std::string slurl)
  48. {
  49. sReceivedSLURL = slurl;
  50. }
  51. #endif
  52. static void pumpGlib();
  53. bool probeVulkan(std::string& version) override;
  54. protected:
  55. bool beingDebugged() override;
  56. // Not needed under Linux
  57. LL_INLINE bool restoreErrorTrap() override { return true; }
  58. void handleSyncCrashTrace() override;
  59. void initLogging() override;
  60. bool initParseCommandLine(LLCommandLineParser& clp) override;
  61. bool initAppMessagesHandler() override;
  62. bool sendURLToOtherInstance(const std::string& url) override;
  63. #if !LL_CALL_SLURL_DISPATCHER_IN_CALLBACK
  64. // Yes, these are non-static methods dealing with static data... But
  65. // LLAppViewerLinux is actually a singleton, so...
  66. LL_INLINE const std::string& getReceivedSLURL() override
  67. {
  68. return sReceivedSLURL;
  69. }
  70. LL_INLINE void clearReceivedSLURL() override { sReceivedSLURL.clear(); }
  71. private:
  72. static std::string sReceivedSLURL;
  73. #endif
  74. };
  75. #endif // LL_LLAPPVIEWERLINUX_H