summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelclassified.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-05-14 15:47:36 -0700
committerRider Linden <rider@lindenlab.com>2015-05-14 15:47:36 -0700
commit21701459ee26e821931d6bebf975df59b35d8fd9 (patch)
tree809f5ad8949ae051a94a02a4efb1d2aee20753e8 /indra/newview/llpanelclassified.cpp
parent9ec050a0673c28b25eeb28ae7926ff1070cbb4c3 (diff)
Converted the Server release notes URL,
classified and click tracker, Avatar hover height Pass the http_results on successfull call back style completion as well.
Diffstat (limited to 'indra/newview/llpanelclassified.cpp')
-rwxr-xr-xindra/newview/llpanelclassified.cpp41
1 files changed, 24 insertions, 17 deletions
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 878f1af9ef..2689420c00 100755
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -41,7 +41,6 @@
#include "llagent.h"
#include "llclassifiedflags.h"
-#include "llclassifiedstatsresponder.h"
#include "llcommandhandler.h" // for classified HTML detail page click tracking
#include "lliconctrl.h"
#include "lllineeditor.h"
@@ -57,6 +56,7 @@
#include "llscrollcontainer.h"
#include "llstatusbar.h"
#include "llviewertexture.h"
+#include "llcorehttputil.h"
const S32 MINIMUM_PRICE_FOR_LISTING = 50; // L$
@@ -91,19 +91,6 @@ public:
};
static LLDispatchClassifiedClickThrough sClassifiedClickThrough;
-// Just to debug errors. Can be thrown away later.
-class LLClassifiedClickMessageResponder : public LLHTTPClient::Responder
-{
- LOG_CLASS(LLClassifiedClickMessageResponder);
-
-protected:
- // If we get back an error (not found, etc...), handle it here
- virtual void httpFailure()
- {
- LL_WARNS() << "Sending click message failed " << dumpResponse() << LL_ENDL;
- }
-};
-
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
@@ -229,8 +216,10 @@ void LLPanelClassifiedInfo::onOpen(const LLSD& key)
{
LL_INFOS() << "Classified stat request via capability" << LL_ENDL;
LLSD body;
- body["classified_id"] = getClassifiedId();
- LLHTTPClient::post(url, body, new LLClassifiedStatsResponder(getClassifiedId()));
+ LLUUID classifiedId = getClassifiedId();
+ body["classified_id"] = classifiedId;
+ LLCoreHttpUtil::HttpCoroutineAdapter::callbackHttpPost(url, body,
+ boost::bind(&LLPanelClassifiedInfo::handleSearchStatResponse, classifiedId, _1));
}
// Update classified click stats.
@@ -240,6 +229,23 @@ void LLPanelClassifiedInfo::onOpen(const LLSD& key)
setInfoLoaded(false);
}
+/*static*/
+void LLPanelClassifiedInfo::handleSearchStatResponse(LLUUID classifiedId, LLSD result)
+{
+ S32 teleport = result["teleport_clicks"].asInteger();
+ S32 map = result["map_clicks"].asInteger();
+ S32 profile = result["profile_clicks"].asInteger();
+ S32 search_teleport = result["search_teleport_clicks"].asInteger();
+ S32 search_map = result["search_map_clicks"].asInteger();
+ S32 search_profile = result["search_profile_clicks"].asInteger();
+
+ LLPanelClassifiedInfo::setClickThrough(classifiedId,
+ teleport + search_teleport,
+ map + search_map,
+ profile + search_profile,
+ true);
+}
+
void LLPanelClassifiedInfo::processProperties(void* data, EAvatarProcessorType type)
{
if(APT_CLASSIFIED_INFO == type)
@@ -548,7 +554,8 @@ void LLPanelClassifiedInfo::sendClickMessage(
std::string url = gAgent.getRegion()->getCapability("SearchStatTracking");
LL_INFOS() << "Sending click msg via capability (url=" << url << ")" << LL_ENDL;
LL_INFOS() << "body: [" << body << "]" << LL_ENDL;
- LLHTTPClient::post(url, body, new LLClassifiedClickMessageResponder());
+ LLCoreHttpUtil::HttpCoroutineAdapter::messageHttpPost(url, body,
+ "SearchStatTracking Click report sent.", "SearchStatTracking Click report NOT sent.");
}
void LLPanelClassifiedInfo::sendClickMessage(const std::string& type)