PageRenderTime 26ms CodeModel.GetById 20ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/llui/llnotificationsutil.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 66 lines | 26 code | 13 blank | 27 comment | 0 complexity | 888d6fa111ae9aca4042be6926fcff35 MD5 | raw file
 1/**
 2 * @file llnotificationsutil.h
 3 *
 4 * $LicenseInfo:firstyear=2008&license=viewerlgpl$
 5 * Second Life Viewer Source Code
 6 * Copyright (C) 2010, Linden Research, Inc.
 7 * 
 8 * This library is free software; you can redistribute it and/or
 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation;
11 * version 2.1 of the License only.
12 * 
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16 * Lesser General Public License for more details.
17 * 
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 * 
22 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
23 * $/LicenseInfo$
24 */
25#ifndef LLNOTIFICATIONSUTIL_H
26#define LLNOTIFICATIONSUTIL_H
27
28// The vast majority of clients of the notifications system just want to add 
29// a notification to the screen, so define this lightweight public interface
30// to avoid including the heavyweight llnotifications.h
31
32#include "llnotificationptr.h"
33
34#include <boost/function.hpp>
35
36class LLSD;
37
38namespace LLNotificationsUtil
39{
40	LLNotificationPtr add(const std::string& name);
41	
42	LLNotificationPtr add(const std::string& name, 
43						  const LLSD& substitutions);
44	
45	LLNotificationPtr add(const std::string& name, 
46						  const LLSD& substitutions, 
47						  const LLSD& payload);
48	
49	LLNotificationPtr add(const std::string& name, 
50						  const LLSD& substitutions, 
51						  const LLSD& payload, 
52						  const std::string& functor_name);
53
54	LLNotificationPtr add(const std::string& name, 
55						  const LLSD& substitutions, 
56						  const LLSD& payload, 
57						  boost::function<void (const LLSD&, const LLSD&)> functor);
58	
59	S32 getSelectedOption(const LLSD& notification, const LLSD& response);
60
61	void cancel(LLNotificationPtr pNotif);
62
63	LLNotificationPtr find(LLUUID uuid);
64}
65
66#endif