summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-06-05 15:13:48 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-06-05 15:13:48 -0400
commitf7c9739fd9bb4355765ecff4b92e879b38302e49 (patch)
treecf56bff8f717753c212a4d1e2777fca8839231c9 /indra/newview/llviewerinventory.cpp
parent63940048eff9c9a1929574ba7581f4c835af35d3 (diff)
SH-3635 WIP - COF slammer works in AISv3 regions. Extensive rework of onAISUpdateReceived.
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rwxr-xr-xindra/newview/llviewerinventory.cpp32
1 files changed, 30 insertions, 2 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index db8671d51b..0608c46051 100755
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -493,6 +493,34 @@ private:
LLSD mUpdates;
};
+class SlamFolderCommand: public AISCommand
+{
+public:
+ SlamFolderCommand(const LLUUID& folder_id, const LLSD& contents, LLPointer<LLInventoryCallback> callback):
+ mContents(contents),
+ AISCommand(callback)
+ {
+ std::string cap;
+ if (!getCap(cap))
+ {
+ llwarns << "No cap found" << llendl;
+ return;
+ }
+ LLUUID tid;
+ tid.generate();
+ std::string url = cap + std::string("/category/") + folder_id.asString() + "/links?tid=" + tid.asString();
+ llinfos << url << llendl;
+ LLCurl::ResponderPtr responder = this;
+ LLSD headers;
+ headers["Content-Type"] = "application/llsd+xml";
+ F32 timeout = HTTP_REQUEST_EXPIRY_SECS;
+ command_func_type cmd = boost::bind(&LLHTTPClient::put, url, mContents, responder, headers, timeout);
+ setCommandFunc(cmd);
+ }
+private:
+ LLSD mContents;
+};
+
///----------------------------------------------------------------------------
/// Class LLViewerInventoryItem
///----------------------------------------------------------------------------
@@ -1835,8 +1863,8 @@ void slam_inventory_folder(const LLUUID& folder_id,
std::string cap;
if (AISCommand::getCap(cap))
{
- //LLPointer<AISCommand> cmd_ptr = new SlamFolderCommand(folder_id, contents, cb);
- //cmd_ptr->run_command();
+ LLPointer<AISCommand> cmd_ptr = new SlamFolderCommand(folder_id, contents, cb);
+ cmd_ptr->run_command();
}
else // no cap
{