summaryrefslogtreecommitdiff
path: root/indra/newview/llclassifiedinfo.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2007-01-02 08:33:20 +0000
committerJames Cook <james@lindenlab.com>2007-01-02 08:33:20 +0000
commit420b91db29485df39fd6e724e782c449158811cb (patch)
treeb471a94563af914d3ed3edd3e856d21cb1b69945 /indra/newview/llclassifiedinfo.cpp
Print done when done.
Diffstat (limited to 'indra/newview/llclassifiedinfo.cpp')
-rw-r--r--indra/newview/llclassifiedinfo.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/indra/newview/llclassifiedinfo.cpp b/indra/newview/llclassifiedinfo.cpp
new file mode 100644
index 0000000000..768145b63c
--- /dev/null
+++ b/indra/newview/llclassifiedinfo.cpp
@@ -0,0 +1,49 @@
+/**
+ * @file llclassifiedinfo.cpp
+ * @brief LLClassifiedInfo class definition
+ *
+ * Copyright (c) 2005-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+#include "llviewerprecompiledheaders.h"
+#include "llclassifiedinfo.h"
+
+#include "viewer.h" // for gPacificDaylightTime
+#include "lluuid.h"
+
+LLClassifiedInfo::cat_map LLClassifiedInfo::sCategories;
+
+// static
+void LLClassifiedInfo::loadCategories(LLUserAuth::options_t classified_options)
+{
+ LLUserAuth::options_t::iterator resp_it;
+ for (resp_it = classified_options.begin();
+ resp_it != classified_options.end();
+ ++resp_it)
+ {
+ const LLUserAuth::response_t& response = *resp_it;
+
+ LLUserAuth::response_t::const_iterator option_it;
+
+ S32 cat_id = 0;
+ option_it = response.find("category_id");
+ if (option_it != response.end())
+ {
+ cat_id = atoi(option_it->second.c_str());
+ }
+ else
+ {
+ continue;
+ }
+
+ // Add the category id/name pair
+ option_it = response.find("category_name");
+ if (option_it != response.end())
+ {
+ LLClassifiedInfo::sCategories[cat_id] = option_it->second;
+ }
+
+ }
+
+}