llclassifiedstatsresponder.cpp

Go to the documentation of this file.
00001 
00022 #include "llviewerprecompiledheaders.h"
00023 
00024 #include "llagent.h"
00025 #include "llclassifiedstatsresponder.h"
00026 
00027 #include "llpanelclassified.h"
00028 #include "llpanel.h"
00029 #include "llhttpclient.h"
00030 #include "llsdserialize.h"
00031 #include "llviewerregion.h"
00032 #include "llview.h"
00033 #include "message.h"
00034 
00035 LLClassifiedStatsResponder::LLClassifiedStatsResponder(LLViewHandle classified_panel_handle, LLUUID classified_id)
00036 : mClassifiedPanelHandle(classified_panel_handle),
00037 mClassifiedID(classified_id)
00038 {
00039 }
00040 /*virtual*/
00041 void LLClassifiedStatsResponder::result(const LLSD& content)
00042 {
00043         S32 teleport = content["teleport_clicks"].asInteger();
00044         S32 map = content["map_clicks"].asInteger();
00045         S32 profile = content["profile_clicks"].asInteger();
00046         S32 search_teleport = content["search_teleport_clicks"].asInteger();
00047         S32 search_map = content["search_map_clicks"].asInteger();
00048         S32 search_profile = content["search_profile_clicks"].asInteger();
00049 
00050         LLPanelClassified* classified_panelp = (LLPanelClassified*)LLPanel::getPanelByHandle(mClassifiedPanelHandle);
00051 
00052         if(classified_panelp)
00053         {
00054                 classified_panelp->setClickThrough(mClassifiedID, 
00055                                                                                         teleport + search_teleport, 
00056                                                                                         map + search_map,
00057                                                                                         profile + search_profile,
00058                                                                                         true);
00059         }
00060 
00061 }
00062 
00063 /*virtual*/
00064 void LLClassifiedStatsResponder::error(U32 status, const std::string& reason)
00065 {
00066         llinfos << "LLClassifiedStatsResponder::error("
00067                 << status << ": " << reason << ")" << llendl;
00068 }
00069 
00070 

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