00001 00034 #ifndef LL_DELAYEDGESTUREERROR_H 00035 #define LL_DELAYEDGESTUREERROR_H 00036 00037 #include <list> 00038 #include "lltimer.h" 00039 00040 // TODO: Refactor to be more generic - this may be useful for other delayed notifications in the future 00041 00042 class LLDelayedGestureError 00043 { 00044 public: 00050 static void gestureMissing(const LLUUID &id); 00051 00057 static void gestureFailedToLoad(const LLUUID &id); 00058 00059 private: 00060 00061 00062 struct LLErrorEntry 00063 { 00064 LLErrorEntry(const LLString& notify, const LLUUID &item) : mTimer(), mNotifyName(notify), mItemID(item) {} 00065 00066 LLTimer mTimer; 00067 LLString mNotifyName; 00068 LLUUID mItemID; 00069 }; 00070 00071 00072 static bool doDialog(const LLErrorEntry &ent, bool uuid_ok = false); 00073 static void enqueue(const LLErrorEntry &ent); 00074 static void onIdle(void *userdata); 00075 00076 typedef std::list<LLErrorEntry> ErrorQueue; 00077 00078 static ErrorQueue sQueue; 00079 }; 00080 00081 00082 #endif