aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lldelayedgestureerror.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:42 -0500
committerJacek Antonelli2008-08-15 23:45:42 -0500
commitce28e056c20bf2723f565bbf464b87781ec248a2 (patch)
treeef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/lldelayedgestureerror.h
parentSecond Life viewer sources 1.19.1.4b (diff)
downloadmeta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2
meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/lldelayedgestureerror.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/linden/indra/newview/lldelayedgestureerror.h b/linden/indra/newview/lldelayedgestureerror.h
new file mode 100644
index 0000000..9f8e9e0
--- /dev/null
+++ b/linden/indra/newview/lldelayedgestureerror.h
@@ -0,0 +1,82 @@
1/**
2 * @file lldelayedgestureerror.h
3 * @brief Delayed gesture error message -- try to wait until name has been retrieved
4 * @author Dale Glass
5 *
6 * $LicenseInfo:firstyear=2004&license=viewergpl$
7 *
8 * Copyright (c) 2004-2008, Linden Research, Inc.
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 http://secondlifegrid.net/programs/open_source/licensing/flossexception
22 *
23 * By copying, modifying or distributing this software, you acknowledge
24 * that you have read and understood your obligations described above,
25 * and agree to abide by those obligations.
26 *
27 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
28 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
29 * COMPLETENESS OR PERFORMANCE.
30 * $/LicenseInfo$
31 */
32
33
34#ifndef LL_DELAYEDGESTUREERROR_H
35#define LL_DELAYEDGESTUREERROR_H
36
37#include <list>
38#include "lltimer.h"
39
40// TODO: Refactor to be more generic - this may be useful for other delayed notifications in the future
41
42class LLDelayedGestureError
43{
44public:
45 /**
46 * @brief Generates a missing gesture error
47 * @param id UUID of missing gesture
48 * Delays message for up to 5 seconds if UUID can't be immediately converted to a text description
49 */
50 static void gestureMissing(const LLUUID &id);
51
52 /**
53 * @brief Generates a gesture failed to load error
54 * @param id UUID of missing gesture
55 * Delays message for up to 5 seconds if UUID can't be immediately converted to a text description
56 */
57 static void gestureFailedToLoad(const LLUUID &id);
58
59private:
60
61
62 struct LLErrorEntry
63 {
64 LLErrorEntry(const LLString& notify, const LLUUID &item) : mTimer(), mNotifyName(notify), mItemID(item) {}
65
66 LLTimer mTimer;
67 LLString mNotifyName;
68 LLUUID mItemID;
69 };
70
71
72 static bool doDialog(const LLErrorEntry &ent, bool uuid_ok = false);
73 static void enqueue(const LLErrorEntry &ent);
74 static void onIdle(void *userdata);
75
76 typedef std::list<LLErrorEntry> ErrorQueue;
77
78 static ErrorQueue sQueue;
79};
80
81
82#endif