summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2012-03-12 18:24:06 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2012-03-12 18:24:06 -0400
commit2f4cb7c534852c7cec142d102520b01a4a7b5c0d (patch)
treef254a22cf11dc149a6813b7aa68ed0b72315b2b8 /indra/newview/llvoavatarself.cpp
parentbcc2547911fe6bd3ab433118dcdbfd84b3f024ec (diff)
SH-2970 WIP - send per-appearance-change metrics packet (disabled)
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rwxr-xr-xindra/newview/llvoavatarself.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 27d499b9c4..4e75582a93 100755
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2089,6 +2089,7 @@ const std::string LLVOAvatarSelf::debugDumpAllLocalTextureDataInfo() const
// Dump avatar metrics data.
LLSD LLVOAvatarSelf::metricsData()
{
+ // runway - add region info
LLSD result;
result["id"] = getID();
result["rez_status"] = getRezzedStatus();
@@ -2109,6 +2110,53 @@ LLSD LLVOAvatarSelf::metricsData()
return result;
}
+class ViewerAppearanceChangeMetricsResponder: public LLCurl::Responder
+{
+public:
+ ViewerAppearanceChangeMetricsResponder()
+ {
+ }
+
+ virtual void completed(U32 status,
+ const std::string& reason,
+ const LLSD& content)
+ {
+ if (isGoodStatus(status))
+ {
+ llinfos << "OK" << llendl;
+ result(content);
+ }
+ else
+ {
+ llwarns << "Failed " << status << " reason " << reason << llendl;
+ error(status,reason);
+ }
+ }
+};
+
+void LLVOAvatarSelf::sendAppearanceChangeMetrics()
+{
+ gAgentAvatarp->stopAllPhases();
+
+ LLSD msg = metricsData();
+ msg["message"] = "ViewerAppearanceChangeMetrics";
+
+ llinfos << "message: " << msg << llendl;
+ std::string caps_url;
+ if (getRegion())
+ {
+ // runway - change here to activate.
+ caps_url = "";//getRegion()->getCapability("ViewerMetrics");
+ }
+ if (!caps_url.empty())
+ {
+ LLCurlRequest::headers_t headers;
+ LLHTTPClient::post(caps_url,
+ msg,
+ new ViewerAppearanceChangeMetricsResponder);
+ }
+}
+
const LLUUID& LLVOAvatarSelf::grabBakedTexture(EBakedTextureIndex baked_index) const
{
if (canGrabBakedTexture(baked_index))