llclassifiedinfo.cpp

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

Generated on Fri May 16 08:33:16 2008 for SecondLife by  doxygen 1.5.5