summaryrefslogtreecommitdiff
path: root/indra/newview/llappearancemgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llappearancemgr.cpp')
-rwxr-xr-xindra/newview/llappearancemgr.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index ff420a3600..2883886fa1 100755
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -63,6 +63,17 @@
#pragma warning (disable:4702)
#endif
+#if 1
+// *TODO$: LLInventoryCallback should be deprecated to conform to the new boost::bind/coroutine model.
+// temp code in transition
+void doAppearanceCb(LLPointer<LLInventoryCallback> cb, LLUUID id)
+{
+ if (cb.notNull())
+ cb->fire(id);
+}
+#endif
+
+
std::string self_av_string()
{
// On logout gAgentAvatarp can already be invalid
@@ -2457,8 +2468,7 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool
<< " )" << LL_ENDL;
// If we are copying from library, attempt to use AIS to copy the category.
- bool ais_ran=false;
- if (copy && AISCommand::isAPIAvailable())
+ if (copy && AISAPI::isAvailable())
{
LLUUID parent_id;
parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CLOTHING);
@@ -2470,11 +2480,11 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool
LLPointer<LLInventoryCallback> copy_cb = new LLWearCategoryAfterCopy(append);
LLPointer<LLInventoryCallback> track_cb = new LLTrackPhaseWrapper(
std::string("wear_inventory_category_callback"), copy_cb);
- LLPointer<AISCommand> cmd_ptr = new CopyLibraryCategoryCommand(category->getUUID(), parent_id, track_cb);
- ais_ran=cmd_ptr->run_command();
- }
- if (!ais_ran)
+ AISAPI::completion_t cr = boost::bind(&doAppearanceCb, track_cb, _1);
+ AISAPI::CopyLibraryCategory(category->getUUID(), parent_id, cr);
+ }
+ else
{
selfStartPhase("wear_inventory_category_fetch");
callAfterCategoryFetch(category->getUUID(),boost::bind(&LLAppearanceMgr::wearCategoryFinal,
@@ -3602,7 +3612,7 @@ void LLAppearanceMgr::makeNewOutfitLinks(const std::string& new_folder_name, boo
// First, make a folder in the My Outfits directory.
const LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MY_OUTFITS);
- if (AISCommand::isAPIAvailable())
+ if (AISAPI::isAvailable())
{
// cap-based category creation was buggy until recently. use
// existence of AIS as an indicator the fix is present. Does