gAgent.set/getInventoryRootID() changed to gInventory.set/getRootFolderID()

This commit is contained in:
Shyotl
2011-10-12 02:29:12 -05:00
parent cfd154d46d
commit 36e0f667d5
22 changed files with 121 additions and 104 deletions

View File

@@ -67,7 +67,7 @@ AIInventoryFetchDescendentsObserver::AIInventoryFetchDescendentsObserver(AIState
void AIFetchInventoryFolder::fetch(std::string const& foldername, bool create, bool fetch_contents)
{
fetch(gAgent.getInventoryRootID(), foldername, create, fetch_contents);
fetch(gInventory.getRootFolderID(), foldername, create, fetch_contents);
}
char const* AIFetchInventoryFolder::state_str_impl(state_type run_state) const
@@ -103,7 +103,7 @@ void AIFetchInventoryFolder::multiplex_impl(void)
// If LLInventoryModel_mIsAgentInvUsable_true then this should be and stay true forever.
llassert(gInventory.isInventoryUsable());
if (mParentFolder.isNull())
mParentFolder = gAgent.getInventoryRootID();
mParentFolder = gInventory.getRootFolderID();
if (mFolderUUID.isNull() || !gInventory.getCategory(mFolderUUID)) // Is the UUID unknown, or doesn't exist?
{
// Set this to null here in case we abort.
@@ -116,7 +116,7 @@ void AIFetchInventoryFolder::multiplex_impl(void)
break;
}
// Check if the parent exists.
if (mParentFolder != gAgent.getInventoryRootID() && !gInventory.getCategory(mParentFolder))
if (mParentFolder != gInventory.getRootFolderID() && !gInventory.getCategory(mParentFolder))
{
llwarns << "Unknown parent folder ID " << mParentFolder << llendl;
abort();

View File

@@ -71,7 +71,7 @@ class AIFetchInventoryFolder : public AIStateMachine {
* is set, you will also be able to scan over the contents of the folder
* upon successful finish.
*
* @param parentUUID The UUID of the parent. Passing gAgent.getInventoryRootID(), or a null ID, will assume a root folder.
* @param parentUUID The UUID of the parent. Passing gInventory.getRootFolderID(), or a null ID, will assume a root folder.
* @param foldername The name of the folder.
* @param create if set, create the folder if it doesn't exists yet.
* @param fetch_contents if set, fetch the contents before finishing.