Updated llinventory to something closer to V2's implementation. Mostly just restructuring.

Most the changes are due to InventoryObjectList* changing to LLInventoryObject::object_list_t*, LLInventoryItem::II_FLAGS* changing to LLInventoryItemFlags::II_FLAGS* and also const'ing.
Certain perms for certain asset types(callcard&landmarks) have been laxed, as per LL's V2.
LLInventoryType now does lookups mostly though new lldictionary class.
LLLandmark using boost for callbacks, instead of custom class structure.
This commit is contained in:
Shyotl
2011-04-28 01:43:44 -05:00
parent 722a1dda04
commit 332cfdb532
52 changed files with 1178 additions and 786 deletions

View File

@@ -2221,8 +2221,8 @@ void LLViewerObject::deleteInventoryItem(const LLUUID& item_id)
{
if(mInventory)
{
InventoryObjectList::iterator it = mInventory->begin();
InventoryObjectList::iterator end = mInventory->end();
LLInventoryObject::object_list_t::iterator it = mInventory->begin();
LLInventoryObject::object_list_t::iterator end = mInventory->end();
for( ; it != end; ++it )
{
if((*it)->getUUID() == item_id)
@@ -2532,7 +2532,7 @@ void LLViewerObject::processTaskInv(LLMessageSystem* msg, void** user_data)
}
else
{
object->mInventory = new InventoryObjectList();
object->mInventory = new LLInventoryObject::object_list_t();
}
LLPointer<LLInventoryObject> obj;
obj = new LLInventoryObject(object->mID, LLUUID::null,
@@ -2588,7 +2588,7 @@ void LLViewerObject::loadTaskInvFile(const std::string& filename)
}
else
{
mInventory = new InventoryObjectList;
mInventory = new LLInventoryObject::object_list_t;
}
while(ifs.good())
{
@@ -2725,8 +2725,8 @@ LLInventoryObject* LLViewerObject::getInventoryObject(const LLUUID& item_id)
LLInventoryObject* rv = NULL;
if(mInventory)
{
InventoryObjectList::iterator it = mInventory->begin();
InventoryObjectList::iterator end = mInventory->end();
LLInventoryObject::object_list_t::iterator it = mInventory->begin();
LLInventoryObject::object_list_t::iterator end = mInventory->end();
for ( ; it != end; ++it)
{
if((*it)->getUUID() == item_id)
@@ -2739,12 +2739,12 @@ LLInventoryObject* LLViewerObject::getInventoryObject(const LLUUID& item_id)
return rv;
}
void LLViewerObject::getInventoryContents(InventoryObjectList& objects)
void LLViewerObject::getInventoryContents(LLInventoryObject::object_list_t& objects)
{
if(mInventory)
{
InventoryObjectList::iterator it = mInventory->begin();
InventoryObjectList::iterator end = mInventory->end();
LLInventoryObject::object_list_t::iterator it = mInventory->begin();
LLInventoryObject::object_list_t::iterator end = mInventory->end();
for( ; it != end; ++it)
{
if ((*it)->getType() != LLAssetType::AT_CATEGORY)
@@ -2774,8 +2774,8 @@ LLViewerInventoryItem* LLViewerObject::getInventoryItemByAsset(const LLUUID& ass
{
LLViewerInventoryItem* item = NULL;
InventoryObjectList::iterator it = mInventory->begin();
InventoryObjectList::iterator end = mInventory->end();
LLInventoryObject::object_list_t::iterator it = mInventory->begin();
LLInventoryObject::object_list_t::iterator end = mInventory->end();
for( ; it != end; ++it)
{
LLInventoryObject* obj = *it;
@@ -4138,8 +4138,8 @@ S32 LLViewerObject::countInventoryContents(LLAssetType::EType type)
S32 count = 0;
if( mInventory )
{
InventoryObjectList::const_iterator it = mInventory->begin();
InventoryObjectList::const_iterator end = mInventory->end();
LLInventoryObject::object_list_t::const_iterator it = mInventory->begin();
LLInventoryObject::object_list_t::const_iterator end = mInventory->end();
for( ; it != end ; ++it )
{
if( (*it)->getType() == type )