llclassifiedinfo.cpp

Go to the documentation of this file.
00001 
00032 #include "llviewerprecompiledheaders.h"
00033 #include "llclassifiedinfo.h"
00034 
00035 #include "viewer.h"     // for gPacificDaylightTime
00036 #include "lluuid.h"
00037 
00038 LLClassifiedInfo::cat_map LLClassifiedInfo::sCategories;
00039 
00040 // static
00041 void LLClassifiedInfo::loadCategories(LLUserAuth::options_t classified_options)
00042 {
00043         LLUserAuth::options_t::iterator resp_it;
00044         for (resp_it = classified_options.begin(); 
00045                  resp_it != classified_options.end(); 
00046                  ++resp_it)
00047         {
00048                 const LLUserAuth::response_t& response = *resp_it;
00049 
00050                 LLUserAuth::response_t::const_iterator option_it;
00051 
00052                 S32 cat_id = 0;
00053                 option_it = response.find("category_id");
00054                 if (option_it != response.end())
00055                 {
00056                         cat_id = atoi(option_it->second.c_str());
00057                 }
00058                 else
00059                 {
00060                         continue;
00061                 }
00062 
00063                 // Add the category id/name pair
00064                 option_it = response.find("category_name");
00065                 if (option_it != response.end())
00066                 {
00067                         LLClassifiedInfo::sCategories[cat_id] = option_it->second;
00068                 }
00069 
00070         }
00071 
00072 }

Generated on Thu Jul 1 06:08:22 2010 for Second Life Viewer by  doxygen 1.4.7