summaryrefslogtreecommitdiff
path: root/indra/newview/llversioninfo.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2019-05-30 16:35:45 -0400
committerNat Goodspeed <nat@lindenlab.com>2020-03-25 16:01:31 -0400
commit378e4fae94c9c16b0b9070d7c7d3f63cba8aee94 (patch)
tree6985c0526397c17282a56dd31100bdfb6898f708 /indra/newview/llversioninfo.h
parent8bb8d7e5b7433ada8eef068016054d4eb2c645b8 (diff)
SL-11216: Introduce LLVersionInfo::getReleaseNotes() method.
The default string returned by getReleaseNotes() is empty. It must be set by posting the relevant release-notes URL string to a new LLEventMailDrop instance named "relnotes". Add unique_ptr<LLEventMailDrop> and unique_ptr<LLStoreListener<std::string>> to LLVersionInfo -- using unique_ptr to leave those classes opaque to header-file consumers. Introduce an out-of-line destructor to handle the unique_ptr<opaque> idiom. Initialize the LLEventMailDrop with the desired name; initialize the LLStoreListener with that LLEventMailDrop and the data member returned by getReleaseNotes().
Diffstat (limited to 'indra/newview/llversioninfo.h')
-rw-r--r--indra/newview/llversioninfo.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h
index 7857468697..02ff0c094a 100644
--- a/indra/newview/llversioninfo.h
+++ b/indra/newview/llversioninfo.h
@@ -28,9 +28,14 @@
#ifndef LL_LLVERSIONINFO_H
#define LL_LLVERSIONINFO_H
-#include <string>
#include "stdtypes.h"
#include "llsingleton.h"
+#include <string>
+#include <memory>
+
+class LLEventMailDrop;
+template <typename T>
+class LLStoreListener;
///
/// This API provides version information for the viewer. This
@@ -44,6 +49,8 @@ class LLVersionInfo: public LLSingleton<LLVersionInfo>
LLSINGLETON(LLVersionInfo);
void initSingleton();
public:
+ ~LLVersionInfo();
+
/// return the major version number as an integer
S32 getMajor();
@@ -87,6 +94,10 @@ public:
} ViewerMaturity;
ViewerMaturity getViewerMaturity();
+ /// get the release-notes URL, once it becomes available -- until then,
+ /// return empty string
+ std::string getReleaseNotes();
+
private:
std::string version;
std::string short_version;
@@ -98,6 +109,14 @@ private:
// This will get reset too.
std::string mVersionChannel;
std::string build_configuration;
+ std::string mReleaseNotes;
+ // Store unique_ptrs to the next couple things so we don't have to explain
+ // to every consumer of this header file all the details of each.
+ // mPump is the LLEventMailDrop on which we listen for SLVersionChecker to
+ // post the release-notes URL from the Viewer Version Manager.
+ std::unique_ptr<LLEventMailDrop> mPump;
+ // mStore is an adapter that stores the release-notes URL in mReleaseNotes.
+ std::unique_ptr<LLStoreListener<std::string>> mStore;
};
#endif