diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2014-03-28 10:30:03 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2014-03-28 10:30:03 -0400 |
commit | ba892274b393550be3cc7a25ff0e8f86cc1344a9 (patch) | |
tree | 1b4db1b8b2470ecd438be38dbef30dafbf72adb4 /indra/llui/llnotifications.h | |
parent | 0fddf9656b5ff704859f590eac9df522cbe39ef0 (diff) |
DRTVWR-363: Fix LLNotificationsListener::listChannels() channel walk.
LLNotifications::ChannelMap went away when LLNotificationChannel became an
LLInstanceTracker subclass. Iterate the universe of channels using
LLNotificationChannel::beginInstances(), endInstances() instead.
More troubling is that LLNotificationChannel::getParentChannelName() went away
too. When LLNotificationChannel acquired a Params block and corresponding
constructor, it acquired the ability to listen on multiple upstream sources.
That meant that a single mParent string became inapplicable, and its access
method was removed. (Curiously, mParent was not itself removed, but it was
left unused.) Change mParent to mParents, a vector<string>, built by
connectToChannel(). Introduce getParents(), an accessor returning an
iterator_range over that vector.
Change LLNotificationsListener::listChannels() to collect a "parents" key in
the map returned for each channel, and -- for backwards compatibility --
capture the first entry in the "parents" array as "parent".
Diffstat (limited to 'indra/llui/llnotifications.h')
-rwxr-xr-x | indra/llui/llnotifications.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 6ac4a98806..39426d9a89 100755 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -88,6 +88,7 @@ #include <boost/enable_shared_from_this.hpp> #include <boost/type_traits.hpp> #include <boost/signals2.hpp> +#include <boost/range.hpp> #include "llevents.h" #include "llfunctorregistry.h" @@ -839,6 +840,11 @@ public: typedef LLNotificationSet::iterator Iterator; std::string getName() const { return mName; } + typedef std::vector<std::string>::const_iterator parents_iter; + boost::iterator_range<parents_iter> getParents() const + { + return boost::iterator_range<parents_iter>(mParents); + } void connectToChannel(const std::string& channel_name); @@ -853,7 +859,7 @@ public: private: std::string mName; - std::string mParent; + std::vector<std::string> mParents; }; // An interface class to provide a clean linker seam to the LLNotifications class. |