summaryrefslogtreecommitdiff
path: root/indra/llui/llnotificationslistener.cpp
blob: d2d83bd6e3d051f8d545478e8855ec403c00f1eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/**
 * @file   llnotificationslistener.cpp
 * @author Brad Kittenbrink
 * @date   2009-07-08
 * @brief  Implementation for llnotificationslistener.
 * 
 * $LicenseInfo:firstyear=2009&license=viewergpl$
 * Copyright (c) 2009, Linden Research, Inc.
 * $/LicenseInfo$
 */

#include "linden_common.h"

#include "llnotificationslistener.h"

#include "llnotifications.h"

LLNotificationsListener::LLNotificationsListener(LLNotifications & notifications) :
    LLDispatchListener("LLNotifications", "op"),
    mNotifications(notifications)
{
    add("requestAdd", &LLNotificationsListener::requestAdd);
}

void LLNotificationsListener::requestAdd(const LLSD& event_data) const
{
    mNotifications.add(event_data["name"], event_data["substitutions"], event_data["payload"]);
}