summaryrefslogtreecommitdiff
path: root/indra/newview/llurlwhitelist.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llurlwhitelist.h')
-rw-r--r--indra/newview/llurlwhitelist.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/indra/newview/llurlwhitelist.h b/indra/newview/llurlwhitelist.h
new file mode 100644
index 0000000000..e0d1f64ddb
--- /dev/null
+++ b/indra/newview/llurlwhitelist.h
@@ -0,0 +1,48 @@
+/**
+ * @file llurlwhitelist.h
+ * @author Callum Prentice
+ * @brief maintains a "white list" of acceptable URLS that are stored on disk
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+#ifndef LL_LLURLWHITELIST_H
+#define LL_LLURLWHITELIST_H
+
+#include <list>
+
+class LLUrlWhiteList
+{
+ public:
+ virtual ~LLUrlWhiteList ();
+
+ static void initClass();
+ static void cleanupClass();
+ static LLUrlWhiteList* getInstance ();
+
+ bool load ();
+ bool save ();
+
+ bool clear ();
+ bool addItem ( const LLString& itemIn, bool saveAfterAdd );
+
+ bool containsMatch ( const LLString& patternIn );
+
+ bool getFirst ( LLString& valueOut );
+ bool getNext ( LLString& valueOut );
+
+ private:
+ LLUrlWhiteList ();
+ static LLUrlWhiteList* sInstance;
+
+ typedef std::list < LLString > LLStringList;
+ typedef std::list < LLString >::iterator LLStringListIter;
+
+ bool mLoaded;
+ const LLString mFilename;
+ LLStringList mUrlList;
+ LLStringListIter mUrlListIter;
+};
+
+#endif // LL_LLURLWHITELIST_H