Conflicts:
	indra/newview/app_settings/settings.xml
This commit is contained in:
Siana Gearz
2011-04-30 22:02:02 +02:00
62 changed files with 1447 additions and 821 deletions

View File

@@ -9,7 +9,6 @@
<string>settings_rlv.xml</string>
</array>
<key>SpellDownloadURL</key>
<map>
<key>Comment</key>
@@ -55,6 +54,17 @@
<string>English (United States of America)</string>
</map>
<key>ScriptsCanShowUI</key>
<map>
<key>Comment</key>
<string>Allow LSL calls (such as LLMapDestination) to spawn viewer UI</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>FloaterObjectBackuptRect</key>
<map>
<key>Comment</key>

View File

@@ -80,5 +80,93 @@
<real>1.0</real>
</map>
</map>
<key>SGBlockGeneralSpam</key>
<map>
<key>Comment</key>
<string>Enable automatic general spam blocking</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>SGBlockCardSpam</key>
<map>
<key>Comment</key>
<string>Enable automatic calling card spam blocking</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>SGBlockChatSpam</key>
<map>
<key>Comment</key>
<string>Enable automatic chat spam blocking</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>SGBlockDialogSpam</key>
<map>
<key>Comment</key>
<string>Enable automatic dialog spam blocking</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
</map>
<key>SGSpamTime</key>
<map>
<key>Comment</key>
<string>Time of Evalulating spam. (Default: 1.000)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>1.0</real>
</map>
<key>SGSpamCount</key>
<map>
<key>Comment</key>
<string>Number of items spammed per time period in SGSpamTime. (Default: 4)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<real>4</real>
</map>
<key>SGChatSpamTime</key>
<map>
<key>Comment</key>
<string>Time of Evalulating spam. (Default: 1.000)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>F32</string>
<key>Value</key>
<real>1.0</real>
</map>
<key>SGChatSpamCount</key>
<map>
<key>Comment</key>
<string>Number of items spammed per time set in SGSpamTime. (Default: 10)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>U32</string>
<key>Value</key>
<real>10.0</real>
</map>
</map>
</llsd>

View File

@@ -279,7 +279,7 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)
mPostData["name"].asString(),
mPostData["description"].asString(),
LLSaleInfo::DEFAULT,
LLInventoryItem::II_FLAGS_NONE,
LLInventoryItemFlags::II_FLAGS_NONE,
creation_date_now);
gInventory.updateItem(item);
gInventory.notifyObservers();

View File

@@ -144,7 +144,7 @@ LLFloaterScriptQueue* LLFloaterScriptQueue::findInstance(const LLUUID& id)
// worked on.
// NOT static, virtual!
void LLFloaterScriptQueue::inventoryChanged(LLViewerObject* viewer_object,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32,
void* q_id)
{
@@ -353,7 +353,7 @@ LLFloaterCompileQueue::~LLFloaterCompileQueue()
}
void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
InventoryObjectList* inv)
LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
@@ -361,8 +361,8 @@ void LLFloaterCompileQueue::handleInventory(LLViewerObject *viewer_object,
typedef std::multimap<LLUUID, LLPointer<LLInventoryItem> > uuid_item_map;
uuid_item_map asset_item_map;
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
@@ -678,14 +678,14 @@ LLFloaterResetQueue::~LLFloaterResetQueue()
}
void LLFloaterResetQueue::handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv)
LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
LLDynamicArray<const char*> names;
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
@@ -740,14 +740,14 @@ LLFloaterRunQueue::~LLFloaterRunQueue()
}
void LLFloaterRunQueue::handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv)
LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
LLDynamicArray<const char*> names;
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)
@@ -804,14 +804,14 @@ LLFloaterNotRunQueue::~LLFloaterNotRunQueue()
}
void LLFloaterNotRunQueue::handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv)
LLInventoryObject::object_list_t* inv)
{
// find all of the lsl, leaving off duplicates. We'll remove
// all matching asset uuids on compilation success.
LLDynamicArray<const char*> names;
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)

View File

@@ -76,13 +76,13 @@ protected:
// This is the callback method for the viewer object currently
// being worked on.
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* queue);
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv) = 0;
LLInventoryObject::object_list_t* inv) = 0;
static void onCloseBtn(void* user_data);
@@ -149,7 +149,7 @@ protected:
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv);
LLInventoryObject::object_list_t* inv);
// This is the callback for when each script arrives
static void scriptArrived(LLVFS *vfs, const LLUUID& asset_id,
@@ -201,7 +201,7 @@ protected:
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv);
LLInventoryObject::object_list_t* inv);
protected:
};
@@ -225,7 +225,7 @@ protected:
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv);
LLInventoryObject::object_list_t* inv);
protected:
};
@@ -249,7 +249,7 @@ protected:
// This is called by inventoryChanged
virtual void handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv);
LLInventoryObject::object_list_t* inv);
protected:
};

View File

@@ -110,7 +110,7 @@ void LLFloaterBulkPermission::doApply()
// worked on.
// NOT static, virtual!
void LLFloaterBulkPermission::inventoryChanged(LLViewerObject* viewer_object,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32,
void* q_id)
{
@@ -253,12 +253,12 @@ void LLFloaterBulkPermission::doCheckUncheckAll(BOOL check)
}
void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, InventoryObjectList* inv)
void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInventoryObject::object_list_t* inv)
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("queue output");
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
LLAssetType::EType asstype = (*it)->getType();
@@ -292,7 +292,7 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, Invent
if((perm.getMaskNextOwner() != desired_next_owner_perms)
&& (new_item->getType() == LLAssetType::AT_OBJECT))
{
flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM;
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM;
}
// If everyone permissions have changed (and this is an object)
// then set the overwrite everyone permissions flag so they
@@ -300,7 +300,7 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, Invent
if ((perm.getMaskEveryone() != desired_everyone_perms)
&& (new_item->getType() == LLAssetType::AT_OBJECT))
{
flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
}
// If group permissions have changed (and this is an object)
// then set the overwrite group permissions flag so they
@@ -308,7 +308,7 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, Invent
if ((perm.getMaskGroup() != desired_group_perms)
&& (new_item->getType() == LLAssetType::AT_OBJECT))
{
flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
}
// chomp the inventory name so it fits in the scroll window nicely

View File

@@ -62,13 +62,13 @@ private:
// This is the callback method for the viewer object currently
// being worked on.
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* queue);
// This is called by inventoryChanged
void handleInventory(LLViewerObject* viewer_obj,
InventoryObjectList* inv);
LLInventoryObject::object_list_t* inv);
void updateInventory(LLViewerObject* object,

View File

@@ -199,7 +199,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
}
void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* data)
{
@@ -224,8 +224,8 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
return;
}
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it )
{
LLInventoryObject* obj = (LLInventoryObject*)(*it);
@@ -254,7 +254,7 @@ void LLFloaterBuy::inventoryChanged(LLViewerObject* obj,
// Compute icon for this item
BOOL item_is_multi = FALSE;
if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED )
if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED )
{
item_is_multi = TRUE;
}

View File

@@ -63,7 +63,7 @@ protected:
void requestObjectInventories();
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* data);

View File

@@ -145,7 +145,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info)
void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* data)
{
@@ -179,8 +179,8 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
LLInventoryType::EType inv_type;
S32 wearable_count = 0;
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it )
{
@@ -222,7 +222,7 @@ void LLFloaterBuyContents::inventoryChanged(LLViewerObject* obj,
LLSD row;
BOOL item_is_multi = FALSE;
if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED )
if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED )
{
item_is_multi = TRUE;
}

View File

@@ -58,7 +58,7 @@ protected:
void requestObjectInventories();
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* data);

View File

@@ -327,7 +327,7 @@ void LLFloaterInspect::refresh()
}
// <edit>
void LLFloaterInspect::inventoryChanged(LLViewerObject* viewer_object,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32,
void* q_id)
{
@@ -335,8 +335,8 @@ void LLFloaterInspect::inventoryChanged(LLViewerObject* viewer_object,
std::vector<LLUUID>::iterator iter = std::find(mQueue.begin(),mQueue.end(),viewer_object->getID());
if (viewer_object && inv && iter != mQueue.end() )
{
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for ( ; it != end; ++it)
{
if((*it)->getType() == LLAssetType::AT_LSL_TEXT)

View File

@@ -66,7 +66,7 @@ protected:
bool mDirty;
// <edit>
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* queue);

View File

@@ -478,9 +478,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
if (item->getType() == LLAssetType::AT_OBJECT)
{
U32 flags = item->getFlags();
slam_perm = flags & LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM;
overwrite_everyone = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
overwrite_group = flags & LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
slam_perm = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM;
overwrite_everyone = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
overwrite_group = flags & LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
}
std::string perm_string;
@@ -805,7 +805,7 @@ void LLFloaterProperties::onCommitPermissions(LLUICtrl* ctrl, void* data)
if((perm.getMaskNextOwner()!=item->getPermissions().getMaskNextOwner())
&& (item->getType() == LLAssetType::AT_OBJECT))
{
flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_PERM;
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM;
}
// If everyone permissions have changed (and this is an object)
// then set the overwrite everyone permissions flag so they
@@ -813,7 +813,7 @@ void LLFloaterProperties::onCommitPermissions(LLUICtrl* ctrl, void* data)
if ((perm.getMaskEveryone()!=item->getPermissions().getMaskEveryone())
&& (item->getType() == LLAssetType::AT_OBJECT))
{
flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
}
// If group permissions have changed (and this is an object)
// then set the overwrite group permissions flag so they
@@ -821,7 +821,7 @@ void LLFloaterProperties::onCommitPermissions(LLUICtrl* ctrl, void* data)
if ((perm.getMaskGroup()!=item->getPermissions().getMaskGroup())
&& (item->getType() == LLAssetType::AT_OBJECT))
{
flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
}
new_item->setFlags(flags);
if(self->mObjectID.isNull())
@@ -939,7 +939,7 @@ void LLFloaterProperties::updateSaleInfo()
if (item->getType() == LLAssetType::AT_OBJECT)
{
U32 flags = new_item->getFlags();
flags |= LLInventoryItem::II_FLAGS_OBJECT_SLAM_SALE;
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_SALE;
new_item->setFlags(flags);
}

View File

@@ -879,13 +879,13 @@ void LLInvFVBridge::changeCategoryParent(LLInventoryModel* model,
}
const char* safe_inv_type_lookup(LLInventoryType::EType inv_type)
const std::string &safe_inv_type_lookup(LLInventoryType::EType inv_type)
{
const char* rv = LLInventoryType::lookup(inv_type);
if(!rv)
const std::string &rv = LLInventoryType::lookup(inv_type);
if(rv.empty())
{
const char* INVALID_TYPE = "<invalid>";
rv = INVALID_TYPE;
static const std::string INVALID_TYPE("<invalid>");
return INVALID_TYPE;
}
return rv;
}
@@ -5452,7 +5452,7 @@ LLUIImagePtr LLLinkItemBridge::getIcon() const
if (LLViewerInventoryItem *item = getItem())
{
U32 attachment_point = (item->getFlags() & 0xff); // low byte of inventory flags
bool is_multi = LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags();
bool is_multi = LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS & item->getFlags();
return get_item_icon(item->getActualType(), item->getInventoryType(), attachment_point, is_multi);
}

View File

@@ -454,7 +454,7 @@ protected:
LLItemBridge(inventory, uuid)
{
mVisited = FALSE;
if (flags & LLInventoryItem::II_FLAGS_LANDMARK_VISITED)
if (flags & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED)
{
mVisited = TRUE;
}
@@ -593,7 +593,7 @@ protected:
{
mAttachPt = (flags & 0xff); // low bye of inventory flags
mIsMultiObject = ( flags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE;
mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? TRUE: FALSE;
}
protected:

View File

@@ -239,7 +239,7 @@ LLInventoryModel::~LLInventoryModel()
// chain up to the category specified by UUID.
BOOL LLInventoryModel::isObjectDescendentOf(const LLUUID& obj_id,
const LLUUID& cat_id,
const BOOL break_on_recursion)
const BOOL break_on_recursion) const
{
LLInventoryObject* obj = getObject(obj_id);
int depthCounter = 0;
@@ -375,7 +375,7 @@ void LLInventoryModel::unlockDirectDescendentArrays(const LLUUID& cat_id)
// specifies 'type' as what it defaults to containing. The category is
// not necessarily only for that type. *NOTE: This will create a new
// inventory category on the fly if one does not exist.
LLUUID LLInventoryModel::findCategoryUUIDForType(LLAssetType::EType t, bool create_folder)
const LLUUID LLInventoryModel::findCategoryUUIDForType(LLAssetType::EType t, bool create_folder)
{
LLUUID rv = findCatUUID(t);
if(rv.isNull() && isInventoryUsable() && create_folder)
@@ -750,7 +750,7 @@ void LLInventoryModel::appendPath(const LLUUID& id, std::string& path)
path.append(temp);
}
bool LLInventoryModel::isInventoryUsable()
bool LLInventoryModel::isInventoryUsable() const
{
bool result = false;
if(gAgent.getInventoryRootID().notNull() && mIsAgentInvUsable)
@@ -1230,7 +1230,7 @@ void LLInventoryModel::removeObserver(LLInventoryObserver* observer)
mObservers.erase(observer);
}
BOOL LLInventoryModel::containsObserver(LLInventoryObserver* observer)
BOOL LLInventoryModel::containsObserver(LLInventoryObserver* observer) const
{
return mObservers.find(observer) != mObservers.end();
}
@@ -1381,14 +1381,14 @@ void LLInventoryModel::fetchInventoryResponder::error(U32 status, const std::str
gInventory.notifyObservers("fetchinventory");
}
void LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id)
bool LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id) const
{
LLViewerInventoryCategory* cat = getCategory(folder_id);
if(!cat)
{
llwarns << "Asked to fetch descendents of non-existent folder: "
<< folder_id << llendl;
return;
return false;
}
//S32 known_descendents = 0;
///cat_array_t* categories = get_ptr_in_map(mParentChildCategoryTree, folder_id);
@@ -1401,10 +1401,7 @@ void LLInventoryModel::fetchDescendentsOf(const LLUUID& folder_id)
//{
// known_descendents += items->count();
//}
if(!cat->fetchDescendents())
{
//llinfos << "Not fetching descendents" << llendl;
}
return cat->fetchDescendents();
}
//Initialize statics.
@@ -1999,7 +1996,7 @@ void LLInventoryModel::empty()
//mInventory.clear();
}
void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update)
void LLInventoryModel::accountForUpdate(const LLCategoryUpdate& update) const
{
LLViewerInventoryCategory* cat = getCategory(update.mCategoryID);
if(cat)
@@ -3799,11 +3796,11 @@ void LLInventoryModel::processMoveInventoryItem(LLMessageSystem* msg, void**)
}
// *NOTE: DEBUG functionality
void LLInventoryModel::dumpInventory()
void LLInventoryModel::dumpInventory() const
{
LL_DEBUGS("Inventory") << "\nBegin Inventory Dump\n**********************:" << LL_ENDL;
LL_DEBUGS("Inventory") << "mCategroy[] contains " << mCategoryMap.size() << " items." << LL_ENDL;
for(cat_map_t::iterator cit = mCategoryMap.begin(); cit != mCategoryMap.end(); ++cit)
for(cat_map_t::const_iterator cit = mCategoryMap.begin(); cit != mCategoryMap.end(); ++cit)
{
LLViewerInventoryCategory* cat = cit->second;
if(cat)
@@ -3818,7 +3815,7 @@ void LLInventoryModel::dumpInventory()
}
}
LL_DEBUGS("Inventory") << "mItemMap[] contains " << mItemMap.size() << " items." << LL_ENDL;
for(item_map_t::iterator iit = mItemMap.begin(); iit != mItemMap.end(); ++iit)
for(item_map_t::const_iterator iit = mItemMap.begin(); iit != mItemMap.end(); ++iit)
{
LLViewerInventoryItem* item = iit->second;
if(item)

View File

@@ -72,18 +72,6 @@ public:
virtual void changed(U32 mask) = 0;
std::string mMessageName; // used by Agent Inventory Service only. [DEV-20328]
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLInventoryModel
//
// This class represents a collection of inventory, and provides
// efficient ways to access that information. This class could in
// theory be used for any place where you need inventory, though it
// optimizes for time efficiency - not space efficiency, probably
// making it inappropriate for use on tasks.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryObject;
class LLInventoryItem;
class LLInventoryCategory;
@@ -94,159 +82,255 @@ class LLViewerInventoryCategory;
class LLMessageSystem;
class LLInventoryCollectFunctor;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// LLInventoryModel
//
// Represents a collection of inventory, and provides efficient ways to access
// that information.
// NOTE: This class could in theory be used for any place where you need
// inventory, though it optimizes for time efficiency - not space efficiency,
// probably making it inappropriate for use on tasks.
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class LLInventoryModel
{
public:
typedef enum e_has_children
enum EHasChildren
{
CHILDREN_NO,
CHILDREN_YES,
CHILDREN_MAYBE
}EHasChildren;
};
// These are used a lot...
typedef LLDynamicArray<LLPointer<LLViewerInventoryCategory> > cat_array_t;
typedef LLDynamicArray<LLPointer<LLViewerInventoryItem> > item_array_t;
// construction & destruction
LLInventoryModel();
~LLInventoryModel();
typedef std::set<LLUUID> changed_items_t;
class fetchInventoryResponder: public LLHTTPClient::Responder
class fetchInventoryResponder : public LLHTTPClient::Responder
{
public:
fetchInventoryResponder(const LLSD& request_sd) : mRequestSD(request_sd) {};
void result(const LLSD& content);
void error(U32 status, const std::string& reason);
public:
typedef std::vector<LLViewerInventoryCategory*> folder_ref_t;
protected:
LLSD mRequestSD;
};
//
// Accessors
//
/********************************************************************************
** **
** INITIALIZATION/SETUP
**/
// This is a convenience function to check if one object has a
// parent chain up to the category specified by UUID.
BOOL isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id, const BOOL break_on_recursion=FALSE);
//--------------------------------------------------------------------
// Constructors / Destructors
//--------------------------------------------------------------------
public:
LLInventoryModel();
~LLInventoryModel();
//<edit>
//protected:
//</edit>
void empty(); // empty the entire contents
// Get the object by id. Returns NULL if not found.
// * WARNING: use the pointer returned for read operations - do
// not modify the object values in place or you will break stuff.
LLInventoryObject* getObject(const LLUUID& id) const;
//--------------------------------------------------------------------
// Initialization
//--------------------------------------------------------------------
public:
// The inventory model usage is sensitive to the initial construction of the model
bool isInventoryUsable() const;
private:
bool mIsAgentInvUsable; // used to handle an invalid inventory state
// Get the item by id. Returns NULL if not found.
// * WARNING: use the pointer for read operations - use the
// updateItem() method to actually modify values.
LLViewerInventoryItem* getItem(const LLUUID& id) const;
//--------------------------------------------------------------------
// Structure
//--------------------------------------------------------------------
public:
// Methods to load up inventory skeleton & meat. These are used
// during authentication. Returns true if everything parsed.
bool loadSkeleton(const LLSD& options, const LLUUID& owner_id);
void buildParentChildMap(); // brute force method to rebuild the entire parent-child relations
// Call on logout to save a terse representation.
void cache(const LLUUID& parent_folder_id, const LLUUID& agent_id);
private:
// Information for tracking the actual inventory. We index this
// information in a lot of different ways so we can access
// the inventory using several different identifiers.
// mInventory member data is the 'master' list of inventory, and
// mCategoryMap and mItemMap store uuid->object mappings.
typedef std::map<LLUUID, LLPointer<LLViewerInventoryCategory> > cat_map_t;
typedef std::map<LLUUID, LLPointer<LLViewerInventoryItem> > item_map_t;
cat_map_t mCategoryMap;
item_map_t mItemMap;
// This last set of indices is used to map parents to children.
typedef std::map<LLUUID, cat_array_t*> parent_cat_map_t;
typedef std::map<LLUUID, item_array_t*> parent_item_map_t;
parent_cat_map_t mParentChildCategoryTree;
parent_item_map_t mParentChildItemTree;
// Get the category by id. Returns NULL if not found.
// * WARNING: use the pointer for read operations - use the
// updateCategory() method to actually modify values.
LLViewerInventoryCategory* getCategory(const LLUUID& id) const;
//--------------------------------------------------------------------
// Login
//--------------------------------------------------------------------
const static S32 sCurrentInvCacheVersion; // expected inventory cache version
// Return the number of items or categories
S32 getItemCount() const;
S32 getCategoryCount() const;
/** Initialization/Setup
** **
*******************************************************************************/
/********************************************************************************
** **
** ACCESSORS
**/
//--------------------------------------------------------------------
// Descendents
//--------------------------------------------------------------------
public:
// Make sure we have the descendents in the structure. Returns true
// if a fetch was performed.
bool fetchDescendentsOf(const LLUUID& folder_id) const;
// Return the direct descendents of the id provided.Set passed
// in values to NULL if the call fails.
// *WARNING: The array provided points straight into the guts of
// this object, and should only be used for read operations, since
// modifications may invalidate the internal state of the
// inventory.
// NOTE: The array provided points straight into the guts of
// this object, and should only be used for read operations, since
// modifications may invalidate the internal state of the inventory.
void getDirectDescendentsOf(const LLUUID& cat_id,
cat_array_t*& categories,
item_array_t*& items) const;
// SJB: Added version to lock the arrays to catch potential logic bugs
void lockDirectDescendentArrays(const LLUUID& cat_id,
cat_array_t*& categories,
item_array_t*& items);
void unlockDirectDescendentArrays(const LLUUID& cat_id);
// Starting with the object specified, add it's descendents to the
// Starting with the object specified, add its descendents to the
// array provided, but do not add the inventory object specified
// by id. There is no guaranteed order. Neither array will be
// erased before adding objects to it. Do not store a copy of the
// pointers collected - use them, and collect them again later if
// you need to reference the same objects.
enum { EXCLUDE_TRASH = FALSE, INCLUDE_TRASH = TRUE };
// by id. There is no guaranteed order.
// NOTE: Neither array will be erased before adding objects to it.
// Do not store a copy of the pointers collected - use them, and
// collect them again later if you need to reference the same objects.
enum {
EXCLUDE_TRASH = FALSE,
INCLUDE_TRASH = TRUE
};
void collectDescendents(const LLUUID& id,
cat_array_t& categories,
item_array_t& items,
BOOL include_trash);
void collectDescendentsIf(const LLUUID& id,
cat_array_t& categories,
item_array_t& items,
BOOL include_trash,
LLInventoryCollectFunctor& add,
BOOL follow_folder_links = FALSE);
// Collect all items in inventory that are linked to item_id.
// Assumes item_id is itself not a linked item.
item_array_t collectLinkedItems(const LLUUID& item_id,
const LLUUID& start_folder_id = LLUUID::null);
// Get the inventoryID that this item points to, else just return item_id
// Check if one object has a parent chain up to the category specified by UUID.
BOOL isObjectDescendentOf(const LLUUID& obj_id, const LLUUID& cat_id, const BOOL break_on_recursion=FALSE) const;
//--------------------------------------------------------------------
// Find
//--------------------------------------------------------------------
public:
// Returns the uuid of the category that specifies 'type' as what it
// defaults to containing. The category is not necessarily only for that type.
// NOTE: If create_folder is true, this will create a new inventory category
// on the fly if one does not exist. *NOTE: if find_in_library is true it
// will search in the user's library folder instead of "My Inventory"
const LLUUID findCategoryUUIDForType(LLAssetType::EType preferred_type,
bool create_folder = true
/*,bool find_in_library = false*/);
// Get whatever special folder this object is a child of, if any.
const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const;
// Get the object by id. Returns NULL if not found.
// NOTE: Use the pointer returned for read operations - do
// not modify the object values in place or you will break stuff.
LLInventoryObject* getObject(const LLUUID& id) const;
// Get the item by id. Returns NULL if not found.
// NOTE: Use the pointer for read operations - use the
// updateItem() method to actually modify values.
LLViewerInventoryItem* getItem(const LLUUID& id) const;
// Get the category by id. Returns NULL if not found.
// NOTE: Use the pointer for read operations - use the
// updateCategory() method to actually modify values.
LLViewerInventoryCategory* getCategory(const LLUUID& id) const;
// Get the inventoryID or item that this item points to, else just return object_id
const LLUUID& getLinkedItemID(const LLUUID& object_id) const;
LLViewerInventoryItem* getLinkedItem(const LLUUID& object_id) const;
LLUUID findCategoryByName(std::string name);
private:
mutable LLPointer<LLViewerInventoryItem> mLastItem; // cache recent lookups
// This method will return false if this inventory model is in an usabel state.
// The inventory model usage is sensitive to the initial construction of the
// model.
bool isInventoryUsable();
//--------------------------------------------------------------------
// Count
//--------------------------------------------------------------------
public:
// Return the number of items or categories
S32 getItemCount() const;
S32 getCategoryCount() const;
//
// Mutators
//
/** Accessors
** **
*******************************************************************************/
// Calling this method with an inventory item will either change
// an existing item with a matching item_id, or will add the item
/********************************************************************************
** **
** MUTATORS
**/
public:
// Change an existing item with a matching item_id or add the item
// to the current inventory. Returns the change mask generated by
// the update. No notifcation will be sent to observers. This
// the update. No notification will be sent to observers. This
// method will only generate network traffic if the item had to be
// reparented.
// *NOTE: In usage, you will want to perform cache accounting
// operations in LLInventoryModel::accountForUpdate() or
// LLViewerInventoryItem::updateServer() before calling this
// method.
// NOTE: In usage, you will want to perform cache accounting
// operations in LLInventoryModel::accountForUpdate() or
// LLViewerInventoryItem::updateServer() before calling this method.
U32 updateItem(const LLViewerInventoryItem* item);
// Calling this method with an inventory category will either
// change an existing item with the matching id, or it will add
// Change an existing item with the matching id or add
// the category. No notifcation will be sent to observers. This
// method will only generate network traffic if the item had to be
// reparented.
// *NOTE: In usage, you will want to perform cache accounting
// operations in LLInventoryModel::accountForUpdate() or
// LLViewerInventoryCategory::updateServer() before calling this
// method.
// NOTE: In usage, you will want to perform cache accounting
// operations in accountForUpdate() or LLViewerInventoryCategory::
// updateServer() before calling this method.
void updateCategory(const LLViewerInventoryCategory* cat);
// This method will move the specified object id to the specified
// category, update the internal structures. No cache accounting,
// Move the specified object id to the specified category and
// update the internal structures. No cache accounting,
// observer notification, or server update is performed.
void moveObject(const LLUUID& object_id, const LLUUID& cat_id);
// delete a particular inventory object by ID. This will purge one
// object from the internal data structures maintaining a
// cosistent internal state. No cache accounting, observer
//--------------------------------------------------------------------
// Delete
//--------------------------------------------------------------------
public:
// Delete a particular inventory object by ID. Will purge one
// object from the internal data structures, maintaining a
// consistent internal state. No cache accounting, observer
// notification, or server update is performed.
void deleteObject(const LLUUID& id);
// Delete a particular inventory object by ID, and delete it from
// the server. Also updates linked items.
void purgeObject(const LLUUID& id);
// This is a method which collects the descendents of the id
// Collects and purges the descendants of the id
// provided. If the category is not found, no action is
// taken. This method goes through the long winded process of
// removing server representation of folders and items while doing
// cache accounting in a fairly efficient manner. This method does
// not notify observers (though maybe it shouldd...)
// not notify observers (though maybe it should...)
void purgeDescendentsOf(const LLUUID& id);
// This method optimally removes the referenced categories and
@@ -256,51 +340,15 @@ public:
void deleteFromServer(LLDynamicArray<LLUUID>& category_ids,
LLDynamicArray<LLUUID>& item_ids);
// Add/remove an observer. If the observer is destroyed, be sure
// to remove it.
void addObserver(LLInventoryObserver* observer);
void removeObserver(LLInventoryObserver* observer);
BOOL containsObserver(LLInventoryObserver* observer);
//
// Misc Methods
//
// findCategoryUUIDForType() returns the uuid of the category that
// specifies 'type' as what it defaults to containing. The
// category is not necessarily only for that type. *NOTE: This
// will create a new inventory category on the fly if one does not
// exist.
// SDK: Added flag to specify whether the folder should be created if not found. This fixes the horrible
// multiple trash can bug.
LLUUID findCategoryUUIDForType(LLAssetType::EType preferred_type, bool create_folder = true);
// Get whatever special folder this object is a child of, if any.
const LLViewerInventoryCategory *getFirstNondefaultParent(const LLUUID& obj_id) const;
// Call this method when it's time to update everyone on a new
// state, by default, the inventory model will not update
// observers automatically.
// The optional argument 'service_name' is used by Agent Inventory Service [DEV-20328]
void notifyObservers(const std::string service_name="");
// This allows outsiders to tell the inventory if something has
// been changed 'under the hood', but outside the control of the
// inventory. For example, if we grant someone modify permissions,
// then that changes the data structures for LLAvatarTracker, but
// potentially affects inventory observers. This API makes sure
// that the next notify will include that notification.
void addChangedMask(U32 mask, const LLUUID& referent);
const std::set<LLUUID>& getChangedIDs() { return mChangedItemIDs; }
// This method to prepares a set of mock inventory which provides
// minimal functionality before the actual arrival of inventory.
//void mock(const LLUUID& root_id);
// make sure we have the descendents in the structure.
void fetchDescendentsOf(const LLUUID& folder_id);
// Add categories to a list to be fetched in bulk.
static void bulkFetch(std::string url);
@@ -308,27 +356,27 @@ public:
// call this method to request the inventory.
//void requestFromServer(const LLUUID& agent_id);
// call this method on logout to save a terse representation
void cache(const LLUUID& parent_folder_id, const LLUUID& agent_id);
// Generates a string containing the path to the item specified by
// item_id.
void appendPath(const LLUUID& id, std::string& path);
// message handling functionality
static void registerCallbacks(LLMessageSystem* msg);
// Convenience function to create a new category. You could call
// updateCatgory() with a newly generated UUID category, but this
// version will take care of details like what the name should be
// based on preferred type. Returns the UUID of the new
// category. If you want to use the default name based on type,
// pass in a NULL to the 'name parameter.
//--------------------------------------------------------------------
// Creation
//--------------------------------------------------------------------
public:
// Returns the UUID of the new category. If you want to use the default
// name based on type, pass in a NULL to the 'name' parameter.
LLUUID createNewCategory(const LLUUID& parent_id,
LLAssetType::EType preferred_type,
const std::string& name);
LLUUID findCategoryByName(std::string name);
// Internal methods that add inventory and make sure that all of
// the internal data structures are consistent. These methods
// should be passed pointers of newly created objects, and the
// instance will take over the memory management from there.
void addCategory(LLViewerInventoryCategory* category);
void addItem(LLViewerInventoryItem* item);
// methods to load up inventory skeleton & meat. These are used
// during authentication. return true if everything parsed.
@@ -339,19 +387,19 @@ public:
//... we do inventory queries on should be examined, and the usage of
//... the skeleton in querying the wearables needs to be examined as well.
bool loadSkeleton(const options_t& options, const LLUUID& owner_id);
bool loadSkeleton(const LLSD& options, const LLUUID& owner_id);
bool loadMeat(const options_t& options, const LLUUID& owner_id);
// This is a brute force method to rebuild the entire parent-child
// relations.
void buildParentChildMap();
/** Mutators
** **
*******************************************************************************/
//
// Category accounting.
//
/********************************************************************************
** **
** CATEGORY ACCOUNTING
**/
// This structure represents the number of items added or removed
// from a category.
public:
// Represents the number of items added or removed from a category.
struct LLCategoryUpdate
{
LLCategoryUpdate() : mDescendentDelta(0) {}
@@ -363,8 +411,7 @@ public:
};
typedef std::vector<LLCategoryUpdate> update_list_t;
// This structure eixts to make it easier to account for deltas in
// a map.
// This exists to make it easier to account for deltas in a map.
struct LLInitializedS32
{
LLInitializedS32() : mValue(0) {}
@@ -375,21 +422,59 @@ public:
};
typedef std::map<LLUUID, LLInitializedS32> update_map_t;
// Call these methods when there are category updates, but call
// them *before* the actual update so the method can do descendent
// accounting correctly.
void accountForUpdate(const LLCategoryUpdate& update);
// Call when there are category updates. Call them *before* the
// actual update so the method can do descendent accounting correctly.
void accountForUpdate(const LLCategoryUpdate& update) const;
void accountForUpdate(const update_list_t& updates);
void accountForUpdate(const update_map_t& updates);
// Return child status of category children. yes/no/maybe
// Return (yes/no/maybe) child status of category children.
EHasChildren categoryHasChildren(const LLUUID& cat_id) const;
// returns true iff category version is known and theoretical
// Returns true iff category version is known and theoretical
// descendents == actual descendents.
bool isCategoryComplete(const LLUUID& cat_id) const;
/** Category Accounting
** **
*******************************************************************************/
// start and stop background breadth-first fetching of inventory contents
/********************************************************************************
** **
** NOTIFICATIONS
**/
public:
// Call to explicitly update everyone on a new state. The optional argument
// 'service_name' is used by Agent Inventory Service [DEV-20328]
void notifyObservers(const std::string service_name="");
// Allows outsiders to tell the inventory if something has
// been changed 'under the hood', but outside the control of the
// inventory. The next notify will include that notification.
void addChangedMask(U32 mask, const LLUUID& referent);
const changed_items_t& getChangedIDs() const { return mChangedItemIDs; }
protected:
// Updates all linked items pointing to this id.
void addChangedMaskForLinks(const LLUUID& object_id, U32 mask);
private:
// Variables used to track what has changed since the last notify.
U32 mModifyMask;
changed_items_t mChangedItemIDs;
//--------------------------------------------------------------------
// Observers
//--------------------------------------------------------------------
public:
// If the observer is destroyed, be sure to remove it.
void addObserver(LLInventoryObserver* observer);
void removeObserver(LLInventoryObserver* observer);
BOOL containsObserver(LLInventoryObserver* observer) const;
private:
typedef std::set<LLInventoryObserver*> observer_list_t;
observer_list_t mObservers;
public:
// this gets triggered when performing a filter-search
static void startBackgroundFetch(const LLUUID& cat_id = LLUUID::null); // start fetch process
static void findLostItems();
@@ -404,20 +489,12 @@ protected:
// should be passed pointers of newly created objects, and the
// instance will take over the memory management from there.
// <edit>
public:
// </edit>
void addCategory(LLViewerInventoryCategory* category);
void addItem(LLViewerInventoryItem* item);
// <edit>
//protected:
// </edit>
// Internal method which looks for a category with the specified
// preferred type. Returns LLUUID::null if not found
LLUUID findCatUUID(LLAssetType::EType preferred_type);
// Empty the entire contents
void empty();
// Given the current state of the inventory items, figure out the
// clone information. *FIX: This is sub-optimal, since we can
@@ -427,8 +504,27 @@ public:
// file import/export.
// <edit>
/** Notifications
** **
*******************************************************************************/
/********************************************************************************
** **
** MISCELLANEOUS
**/
//--------------------------------------------------------------------
// Callbacks
//--------------------------------------------------------------------
public:
// </edit>
static void registerCallbacks(LLMessageSystem* msg);
//--------------------------------------------------------------------
// File I/O
//--------------------------------------------------------------------
protected:
friend class LLLocalInventory;
static bool loadFromFile(const std::string& filename,
cat_array_t& categories,
item_array_t& items,
@@ -436,65 +532,37 @@ public:
static bool saveToFile(const std::string& filename,
const cat_array_t& categories,
const item_array_t& items);
// <edit>
protected:
// </edit>
// message handling functionality
//static void processUseCachedInventory(LLMessageSystem* msg, void**);
//--------------------------------------------------------------------
// Message handling functionality
//--------------------------------------------------------------------
public:
static void processUpdateCreateInventoryItem(LLMessageSystem* msg, void**);
static void processRemoveInventoryItem(LLMessageSystem* msg, void**);
static void processUpdateInventoryFolder(LLMessageSystem* msg, void**);
static void processRemoveInventoryFolder(LLMessageSystem* msg, void**);
//static void processExchangeCallingcard(LLMessageSystem* msg, void**);
//static void processAddCallingcard(LLMessageSystem* msg, void**);
//static void processDeclineCallingcard(LLMessageSystem* msg, void**);
static void processSaveAssetIntoInventory(LLMessageSystem* msg, void**);
static void processBulkUpdateInventory(LLMessageSystem* msg, void**);
static void processInventoryDescendents(LLMessageSystem* msg, void**);
static void processMoveInventoryItem(LLMessageSystem* msg, void**);
static void processFetchInventoryReply(LLMessageSystem* msg, void**);
protected:
bool messageUpdateCore(LLMessageSystem* msg, bool do_accounting);
// Updates all linked items pointing to this id.
void addChangedMaskForLinks(const LLUUID& object_id, U32 mask);
//--------------------------------------------------------------------
// Locks
//--------------------------------------------------------------------
public:
void lockDirectDescendentArrays(const LLUUID& cat_id,
cat_array_t*& categories,
item_array_t*& items);
void unlockDirectDescendentArrays(const LLUUID& cat_id);
protected:
cat_array_t* getUnlockedCatArray(const LLUUID& id);
item_array_t* getUnlockedItemArray(const LLUUID& id);
protected:
// Varaibles used to track what has changed since the last notify.
U32 mModifyMask;
typedef std::set<LLUUID> changed_items_t;
changed_items_t mChangedItemIDs;
// Information for tracking the actual inventory. We index this
// information in a lot of different ways so we can access
// the inventory using several different identifiers.
// mInventory member data is the 'master' list of inventory, and
// mCategoryMap and mItemMap store uuid->object mappings.
typedef std::map<LLUUID, LLPointer<LLViewerInventoryCategory> > cat_map_t;
typedef std::map<LLUUID, LLPointer<LLViewerInventoryItem> > item_map_t;
//inv_map_t mInventory;
cat_map_t mCategoryMap;
item_map_t mItemMap;
private:
std::map<LLUUID, bool> mCategoryLock;
std::map<LLUUID, bool> mItemLock;
// cache recent lookups
mutable LLPointer<LLViewerInventoryItem> mLastItem;
// This last set of indices is used to map parents to children.
typedef std::map<LLUUID, cat_array_t*> parent_cat_map_t;
typedef std::map<LLUUID, item_array_t*> parent_item_map_t;
parent_cat_map_t mParentChildCategoryTree;
parent_item_map_t mParentChildItemTree;
typedef std::set<LLInventoryObserver*> observer_list_t;
observer_list_t mObservers;
// completing the fetch once per session should be sufficient
static BOOL sBackgroundFetchActive;
@@ -505,20 +573,19 @@ protected:
static F32 sMaxTimeBetweenFetches;
static S16 sBulkFetchCount;
// This flag is used to handle an invalid inventory state.
bool mIsAgentInvUsable;
private:
const static S32 sCurrentInvCacheVersion; // expected inventory cache version
public:
// *NOTE: DEBUG functionality
void dumpInventory();
void dumpInventory() const;
static bool isBulkFetchProcessingComplete();
static void stopBackgroundFetch(); // stop fetch process
static BOOL sFullFetchStarted;
static BOOL sAllFoldersFetched;
/** Miscellaneous
** **
*******************************************************************************/
};
// a special inventory model for the agent

View File

@@ -1474,7 +1474,7 @@ std::string get_item_icon_name(LLAssetType::EType asset_type,
{
idx = BODYPART_ICON_NAME;
}
switch(LLInventoryItem::II_FLAGS_WEARABLES_MASK & attachment_point)
switch(LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK & attachment_point)
{
case WT_SHAPE:
idx = BODYPART_SHAPE_ICON_NAME;

View File

@@ -212,7 +212,7 @@ void LLPanelContents::onClickNewScript(void *userdata)
std::string("New Script"),
desc,
LLSaleInfo::DEFAULT,
LLViewerInventoryItem::II_FLAGS_NONE,
LLInventoryItemFlags::II_FLAGS_NONE,
time_corrected());
object->saveScript(new_item, TRUE, true);

View File

@@ -305,7 +305,7 @@ void LLPanelGroupNotices::setItem(LLPointer<LLInventoryItem> inv_item)
mInventoryItem = inv_item;
BOOL item_is_multi = FALSE;
if ( inv_item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
if ( inv_item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
{
item_is_multi = TRUE;
};

View File

@@ -353,7 +353,7 @@ time_t LLTaskInvFVBridge::getCreationDate() const
LLUIImagePtr LLTaskInvFVBridge::getIcon() const
{
BOOL item_is_multi = FALSE;
if ( mFlags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
{
item_is_multi = TRUE;
}
@@ -1372,7 +1372,7 @@ LLTaskObjectBridge::LLTaskObjectBridge(
LLUIImagePtr LLTaskObjectBridge::getIcon() const
{
BOOL item_is_multi = FALSE;
if ( mFlags & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
if ( mFlags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS )
{
item_is_multi = TRUE;
}
@@ -1787,7 +1787,7 @@ void LLPanelInventory::reset()
}
void LLPanelInventory::inventoryChanged(LLViewerObject* object,
InventoryObjectList* inventory,
LLInventoryObject::object_list_t* inventory,
S32 serial_num,
void* data)
{
@@ -1810,8 +1810,8 @@ void LLPanelInventory::inventoryChanged(LLViewerObject* object,
LLFloaterProperties* floater = NULL;
LLDynamicArray<LLFloaterProperties*> refresh;
InventoryObjectList::const_iterator it = inventory->begin();
InventoryObjectList::const_iterator end = inventory->end();
LLInventoryObject::object_list_t::const_iterator it = inventory->begin();
LLInventoryObject::object_list_t::const_iterator end = inventory->end();
for( ; it != end; ++it)
{
floater = LLFloaterProperties::find((*it)->getUUID(),
@@ -1927,7 +1927,7 @@ void LLPanelInventory::createFolderViews(LLInventoryObject* inventory_root, Inve
typedef std::pair<LLInventoryObject*, LLFolderViewFolder*> obj_folder_pair;
void LLPanelInventory::createViewsForCategory(InventoryObjectList* inventory,
void LLPanelInventory::createViewsForCategory(LLInventoryObject::object_list_t* inventory,
LLInventoryObject* parent,
LLFolderViewFolder* folder)
{

View File

@@ -78,12 +78,12 @@ protected:
protected:
void reset();
/*virtual*/ void inventoryChanged(LLViewerObject* object,
InventoryObjectList* inventory,
LLInventoryObject::object_list_t* inventory,
S32 serial_num,
void* user_data);
void updateInventory();
void createFolderViews(LLInventoryObject* inventory_root, InventoryObjectList& contents);
void createViewsForCategory(InventoryObjectList* inventory,
void createViewsForCategory(LLInventoryObject::object_list_t* inventory,
LLInventoryObject* parent,
LLFolderViewFolder* folder);

View File

@@ -1686,38 +1686,38 @@ void LLPreviewLSL::reshape(S32 width, S32 height, BOOL called_from_parent)
gSavedSettings.setRect("PreviewScriptRect", getRect());
}
}
// <edit>
// virtual
BOOL LLPreviewLSL::canSaveAs() const
{
return TRUE;
}
// virtual
void LLPreviewLSL::saveAs()
{
std::string default_filename("untitled.lsl");
const LLInventoryItem *item = getItem();
if(item)
{
default_filename = LLDir::getScrubbedFileName(item->getName());
}
LLFilePicker& file_picker = LLFilePicker::instance();
if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_LSL, default_filename ) )
{
// User canceled or we failed to acquire save file.
return;
}
// remember the user-approved/edited file name.
std::string filename = file_picker.getFirstFile();
std::string utf8text = mScriptEd->mEditor->getText();
LLFILE* fp = LLFile::fopen(filename, "wb");
fputs(utf8text.c_str(), fp);
fclose(fp);
fp = NULL;
}
// <edit>
// virtual
BOOL LLPreviewLSL::canSaveAs() const
{
return TRUE;
}
// virtual
void LLPreviewLSL::saveAs()
{
std::string default_filename("untitled.lsl");
const LLInventoryItem *item = getItem();
if(item)
{
default_filename = LLDir::getScrubbedFileName(item->getName());
}
LLFilePicker& file_picker = LLFilePicker::instance();
if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_LSL, default_filename ) )
{
// User canceled or we failed to acquire save file.
return;
}
// remember the user-approved/edited file name.
std::string filename = file_picker.getFirstFile();
std::string utf8text = mScriptEd->mEditor->getText();
LLFILE* fp = LLFile::fopen(filename, "wb");
fputs(utf8text.c_str(), fp);
fclose(fp);
fp = NULL;
}
// </edit>
/// ---------------------------------------------------------------------------
/// LLLiveLSLEditor
@@ -1962,7 +1962,7 @@ void LLLiveLSLEditor::loadAsset(BOOL is_new)
DEFAULT_SCRIPT_NAME,
DEFAULT_SCRIPT_DESC,
LLSaleInfo::DEFAULT,
LLInventoryItem::II_FLAGS_NONE,
LLInventoryItemFlags::II_FLAGS_NONE,
time_corrected());
mAssetStatus = PREVIEW_ASSET_LOADED;
}
@@ -2637,36 +2637,36 @@ BOOL LLLiveLSLEditor::monoChecked() const
return FALSE;
}
// <edit>
// virtual
BOOL LLLiveLSLEditor::canSaveAs() const
{
return TRUE;
}
// virtual
void LLLiveLSLEditor::saveAs()
{
std::string default_filename("untitled.lsl");
const LLInventoryItem *item = getItem();
if(item)
{
default_filename = LLDir::getScrubbedFileName(item->getName());
}
LLFilePicker& file_picker = LLFilePicker::instance();
if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_LSL, default_filename ) )
{
// User canceled or we failed to acquire save file.
return;
}
// remember the user-approved/edited file name.
std::string filename = file_picker.getFirstFile();
std::string utf8text = mScriptEd->mEditor->getText();
LLFILE* fp = LLFile::fopen(filename, "wb");
fputs(utf8text.c_str(), fp);
fclose(fp);
fp = NULL;
}
// <edit>
// virtual
BOOL LLLiveLSLEditor::canSaveAs() const
{
return TRUE;
}
// virtual
void LLLiveLSLEditor::saveAs()
{
std::string default_filename("untitled.lsl");
const LLInventoryItem *item = getItem();
if(item)
{
default_filename = LLDir::getScrubbedFileName(item->getName());
}
LLFilePicker& file_picker = LLFilePicker::instance();
if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_LSL, default_filename ) )
{
// User canceled or we failed to acquire save file.
return;
}
// remember the user-approved/edited file name.
std::string filename = file_picker.getFirstFile();
std::string utf8text = mScriptEd->mEditor->getText();
LLFILE* fp = LLFile::fopen(filename, "wb");
fputs(utf8text.c_str(), fp);
fclose(fp);
fp = NULL;
}
// </edit>

View File

@@ -752,10 +752,10 @@ void LLTracker::setLandmarkVisited()
LLInventoryItem* i = gInventory.getItem( mTrackedLandmarkItemID );
LLViewerInventoryItem* item = (LLViewerInventoryItem*)i;
if ( item
&& !(item->getFlags()&LLInventoryItem::II_FLAGS_LANDMARK_VISITED))
&& !(item->getFlags()&LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED))
{
U32 flags = item->getFlags();
flags |= LLInventoryItem::II_FLAGS_LANDMARK_VISITED;
flags |= LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED;
item->setFlags(flags);
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("ChangeInventoryItemFlags");
@@ -808,7 +808,7 @@ void LLTracker::cacheLandmarkPosition()
mLandmarkHasBeenVisited = FALSE;
LLInventoryItem* item = gInventory.getItem(mTrackedLandmarkItemID);
if ( item
&& item->getFlags()&LLInventoryItem::II_FLAGS_LANDMARK_VISITED)
&& item->getFlags()&LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED)
{
mLandmarkHasBeenVisited = TRUE;
}

View File

@@ -324,8 +324,8 @@ bool LLViewerInventoryItem::exportFileLocal(LLFILE* fp) const
fprintf(fp, "\t\tparent_id\t%s\n", uuid_str.c_str());
mPermissions.exportFile(fp);
fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType));
const char* inv_type_str = LLInventoryType::lookup(mInventoryType);
if(inv_type_str) fprintf(fp, "\t\tinv_type\t%s\n", inv_type_str);
const std::string& inv_type_str = LLInventoryType::lookup(mInventoryType);
if(!inv_type_str.empty()) fprintf(fp, "\t\tinv_type\t%s\n", inv_type_str.c_str());
fprintf(fp, "\t\tname\t%s|\n", mName.c_str());
fprintf(fp, "\t\tcreation_date\t%d\n", (S32) mCreationDate);
fprintf(fp,"\t}\n");
@@ -372,7 +372,7 @@ EWearableType LLViewerInventoryItem::getWearableType() const
{
return WT_INVALID;
}
return EWearableType(getFlags() & II_FLAGS_WEARABLES_MASK);
return EWearableType(getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK);
}
// [/RLVa:KB]

View File

@@ -8467,7 +8467,7 @@ void handle_grab_texture(void* data)
name,
LLStringUtil::null,
LLSaleInfo::DEFAULT,
LLInventoryItem::II_FLAGS_NONE,
LLInventoryItemFlags::II_FLAGS_NONE,
creation_date_now);
item->updateServer(TRUE);

View File

@@ -232,6 +232,75 @@ const BOOL SCRIPT_QUESTION_IS_CAUTION[SCRIPT_PERMISSION_EOF] =
FALSE // ControlYourCamera
};
template <typename T>
class SH_SpamHandler
{
public:
SH_SpamHandler(const char *pToggleCtrl, const char *pDurCtrl, const char *pFreqCtrl) :
mDuration(pDurCtrl, 1.f),
mFrequency(pFreqCtrl, 5),
mEnabled(false)
{
gSavedSettings.getControl(pToggleCtrl)->getSignal()->connect(boost::bind(&SH_SpamHandler::CtrlToggle, this, _1));
CtrlToggle(gSavedSettings.getBOOL(pToggleCtrl));
}
bool CtrlToggle(const LLSD& newvalue)
{
bool on = newvalue.asBoolean();
if(on == mEnabled)
return true;
mEnabled = on;
mTimer.stop();
mActiveList.clear();
mBlockedList.clear();
return true;
}
bool isBlocked(const T &owner, const LLUUID &source_id, const char *pNotification, LLSD &args=LLSD())
{
if(!mEnabled || isAgent(owner))
return false;
if(mBlockedList.find(owner) != mBlockedList.end())
return true;
if(mTimer.getStarted() && mTimer.getElapsedTimeF32() < mDuration)
{
std::map<const T,U32>::iterator it = mActiveList.insert(std::pair<const T, U32>(owner,0)).first;
if(++(it->second)>=mFrequency)
{
mBlockedList.insert(owner);
if(pNotification)
{
args["OWNER"] = owner;
args["SOURCE"] = source_id;
LLNotifications::getInstance()->add(pNotification,args);
}
return true;
}
}
else
{
mActiveList.clear();
mTimer.start();
}
return false;
}
private:
//Owner is either a key, or a name. Do not look up perms since object may be unknown.
bool isAgent(const T &owner) const;
bool mEnabled;
LLFrameTimer mTimer;
const LLCachedControl<F32> mDuration;
const LLCachedControl<U32> mFrequency;
std::map<const T,U32> mActiveList;
std::set<const T> mBlockedList;
};
template<> bool SH_SpamHandler<LLUUID>::isAgent(const LLUUID &owner) const { return gAgent.getID() == owner; }
template<> bool SH_SpamHandler<std::string>::isAgent(const std::string &owner) const
{
std::string str;
gAgent.getName(str);
return str == owner;
}
bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
@@ -1631,6 +1700,21 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
chat.mFromID = from_id;
chat.mFromName = name;
chat.mSourceType = (from_id.isNull() || (name == std::string(SYSTEM_FROM))) ? CHAT_SOURCE_SYSTEM : CHAT_SOURCE_AGENT;
if(chat.mSourceType == CHAT_SOURCE_AGENT)
{
LLSD args;
args["FULL_NAME"] = name;
static SH_SpamHandler<LLUUID> avatar_spam_check("SGBlockGeneralSpam","SGSpamTime","SGSpamCount");
static SH_SpamHandler<LLUUID> object_spam_check("SGBlockGeneralSpam","SGSpamTime","SGSpamCount");
if(d==IM_FROM_TASK||d==IM_GOTO_URL||d==IM_FROM_TASK_AS_ALERT||d==IM_TASK_INVENTORY_OFFERED||d==IM_TASK_INVENTORY_ACCEPTED||d==IM_TASK_INVENTORY_DECLINED)
{
if(object_spam_check.isBlocked(from_id,session_id,"BlockedGeneralObjects"),args)
return;
}
else if(avatar_spam_check.isBlocked(from_id,from_id,"BlockedGeneralAvatar"),args)
return;
}
LLViewerObject *source = gObjectList.findObject(session_id); //Session ID is probably the wrong thing.
if (source)
@@ -2812,6 +2896,9 @@ void process_offer_callingcard(LLMessageSystem* msg, void**)
}
else
{
static SH_SpamHandler<LLUUID> spam_check("SGBlockCardSpam","SHSpamTime","SGSpamCount");
if(spam_check.isBlocked(source_id,source_id,"BlockedCards",args))
return;
LLNotifications::instance().add("OfferCallingCard", args, payload);
}
}
@@ -2985,6 +3072,14 @@ void process_chat_from_simulator(LLMessageSystem *msg, void **user_data)
// </edit>
if (chatter)
{
LLSD args;
args["FULL_NAME"] = from_name;
static SH_SpamHandler<LLUUID> avatar_spam_check("SGBlockChatSpam","SGChatSpamTime","SGChatSpamCount");
static SH_SpamHandler<LLUUID> object_spam_check("SGBlockChatSpam","SGChatSpamTime","SGChatSpamCount");
if( (chatter->isAvatar() && avatar_spam_check.isBlocked(from_id,from_id,"BlockedChatterAvatar",args)) ||
(!chatter->isAvatar() && object_spam_check.isBlocked(owner_id,from_id,"BlockedChatterObjects",args)) )
return;
chat.mPosAgent = chatter->getPositionAgent();
// Make swirly things only for talking objects. (not script debug messages, though)
@@ -5835,7 +5930,7 @@ void process_derez_container(LLMessageSystem *msg, void**)
}
void container_inventory_arrived(LLViewerObject* object,
InventoryObjectList* inventory,
LLInventoryObject::object_list_t* inventory,
S32 serial_num,
void* data)
{
@@ -5855,8 +5950,8 @@ void container_inventory_arrived(LLViewerObject* object,
LLAssetType::AT_NONE,
std::string("Acquired Items")); //TODO: Translate
InventoryObjectList::const_iterator it = inventory->begin();
InventoryObjectList::const_iterator end = inventory->end();
LLInventoryObject::object_list_t::const_iterator it = inventory->begin();
LLInventoryObject::object_list_t::const_iterator end = inventory->end();
for ( ; it != end; ++it)
{
if ((*it)->getType() != LLAssetType::AT_CATEGORY &&
@@ -6366,17 +6461,22 @@ static LLNotificationFunctorRegistration callback_script_dialog_reg_2("ScriptDia
void process_script_dialog(LLMessageSystem* msg, void**)
{
S32 i;
LLSD payload;
LLUUID object_id;
msg->getUUID("Data", "ObjectID", object_id);
if (LLMuteList::getInstance()->isMuted(object_id))
{
return;
}
std::string message;
std::string first_name;
std::string last_name;
std::string title;
LLUUID object_id;
S32 chat_channel;
msg->getUUID("Data", "ObjectID", object_id);
msg->getString("Data", "FirstName", first_name);
msg->getString("Data", "LastName", last_name);
msg->getString("Data", "ObjectName", title);
@@ -6437,6 +6537,10 @@ void process_script_dialog(LLMessageSystem* msg, void**)
args["FIRST"] = first_name;
args["LAST"] = last_name;
static SH_SpamHandler<std::string> spam_check("SGBlockDialogSpam","SGSpamTime","SGSpamCount");
if(spam_check.isBlocked(first_name + " " + last_name,object_id,"BlockedDialogs",args))
return;
if (is_text_box)
{
args["DEFAULT"] = default_text;
@@ -6601,6 +6705,8 @@ void process_initiate_download(LLMessageSystem* msg, void**)
void process_script_teleport_request(LLMessageSystem* msg, void**)
{
if (!gSavedSettings.getBOOL("ScriptsCanShowUI")) return;
std::string object_name;
std::string sim_name;
LLVector3 pos;

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 )

View File

@@ -86,7 +86,7 @@ typedef enum e_object_update_type
// callback typedef for inventory
typedef void (*inventory_callback)(LLViewerObject*,
InventoryObjectList*,
LLInventoryObject::object_list_t*,
S32 serial_num,
void*);
@@ -622,7 +622,7 @@ protected:
F32 mPixelArea; // Apparent area in pixels
// This is the object's inventory from the viewer's perspective.
InventoryObjectList* mInventory;
LLInventoryObject::object_list_t* mInventory;
class LLInventoryCallbackInfo
{
public:

View File

@@ -147,7 +147,7 @@ public:
mPostData["name"].asString(),
mPostData["description"].asString(),
LLSaleInfo::DEFAULT,
LLInventoryItem::II_FLAGS_NONE,
LLInventoryItemFlags::II_FLAGS_NONE,
creation_date_now);
gInventory.updateItem(item);
gInventory.notifyObservers();

View File

@@ -417,7 +417,7 @@ void LLEmbeddedItems::bindEmbeddedChars( const LLFontGL* font ) const
break;
case LLAssetType::AT_SOUND: img_name = "inv_item_sound.tga"; break;
case LLAssetType::AT_LANDMARK:
if (item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED)
if (item->getFlags() & LLInventoryItemFlags::II_FLAGS_LANDMARK_VISITED)
{
img_name = "inv_item_landmark_visited.tga";
}
@@ -428,7 +428,7 @@ void LLEmbeddedItems::bindEmbeddedChars( const LLFontGL* font ) const
break;
case LLAssetType::AT_CLOTHING: img_name = "inv_item_clothing.tga"; break;
case LLAssetType::AT_OBJECT:
if (item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
if (item->getFlags() & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS)
{
img_name = "inv_item_object_multi.tga";
}

View File

@@ -42,7 +42,7 @@ class LLVOInventoryListener
{
public:
virtual void inventoryChanged(LLViewerObject* object,
InventoryObjectList* inventory,
LLInventoryObject::object_list_t* inventory,
S32 serial_num,
void* user_data) = 0;

View File

@@ -835,7 +835,7 @@ bool RlvHandler::redirectChatOrEmote(const std::string& strUTF8Text) const
case LLAssetType::AT_CLOTHING:
{
// NOTE: without its asset we don't know what type the wearable is so we need to look at the item's flags instead
EWearableType wtType = (EWearableType)(pItem->getFlags() & LLInventoryItem::II_FLAGS_WEARABLES_MASK);
EWearableType wtType = (EWearableType)(pItem->getFlags() & LLInventoryItemFlags::II_FLAGS_WEARABLES_MASK);
LLViewerInventoryCategory* pFolder;
if ( (!isWearable(wtType)) ||
( (gAgent.getWearable(wtType)) && (!isRemovable(wtType)) ) ||

View File

@@ -357,7 +357,7 @@ void ScriptCounter::completechk()
}
void ScriptCounter::inventoryChanged(LLViewerObject* obj,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* user_data)
{
@@ -371,8 +371,8 @@ void ScriptCounter::inventoryChanged(LLViewerObject* obj,
{
if(inv)
{
InventoryObjectList::const_iterator it = inv->begin();
InventoryObjectList::const_iterator end = inv->end();
LLInventoryObject::object_list_t::const_iterator it = inv->begin();
LLInventoryObject::object_list_t::const_iterator end = inv->end();
for( ; it != end; ++it)
{
LLInventoryObject* asset = (*it);

View File

@@ -48,7 +48,7 @@ public:
static void processObjectPropertiesFamily(LLMessageSystem* msg, void** user_data);
static void processObjectProperties(LLMessageSystem* msg, void** user_data);
void inventoryChanged(LLViewerObject* obj,
InventoryObjectList* inv,
LLInventoryObject::object_list_t* inv,
S32 serial_num,
void* data);

View File

@@ -653,7 +653,7 @@ Only large parcels can be listed in search.
Adult
</combo_item>
<combo_item name="Arts&amp;Culture" value="arts">
Arts &amp; Culture
Arts and Culture
</combo_item>
<combo_item name="Business" value="store">
Business
@@ -671,7 +671,7 @@ Only large parcels can be listed in search.
Newcomer Friendly
</combo_item>
<combo_item name="Parks&amp;Nature" value="park">
Parks &amp; Nature
Parks and Nature
</combo_item>
<combo_item name="Residential" value="home">
Residential
@@ -682,6 +682,9 @@ Only large parcels can be listed in search.
<combo_item name="Other" value="other">
Other
</combo_item>
<combo_item name="Rental" value="rental">
Rental
</combo_item>
</combo_box>
<!-- The following combo box is identical to the previous one, except for the
fact that the Adult item is missing. This seems to be the only way to safely
@@ -697,7 +700,7 @@ Only large parcels can be listed in search.
Linden Location
</combo_item>
<combo_item name="Arts&amp;Culture" value="arts">
Arts &amp; Culture
Arts and Culture
</combo_item>
<combo_item name="Business" value="store">
Business
@@ -715,7 +718,7 @@ Only large parcels can be listed in search.
Newcomer Friendly
</combo_item>
<combo_item name="Parks&amp;Nature" value="park">
Parks &amp; Nature
Parks and Nature
</combo_item>
<combo_item name="Residential" value="home">
Residential
@@ -726,6 +729,9 @@ Only large parcels can be listed in search.
<combo_item name="Other" value="other">
Other
</combo_item>
<combo_item name="Rental" value="rental">
Rental
</combo_item>
</combo_box>
<button bottom="-140" enabled="true" follows="left|top" font="SansSerif"
halign="center" height="18" label="?" label_selected="?" left="400"

View File

@@ -477,7 +477,7 @@ To buy direct, visit the land and click on the place name in the title bar.
Linden Location
</combo_item>
<combo_item name="Arts&amp;Culture" value="arts">
Arts &amp; Culture
Arts and Culture
</combo_item>
<combo_item name="Business" value="store">
Business
@@ -495,7 +495,7 @@ To buy direct, visit the land and click on the place name in the title bar.
Newcomer Friendly
</combo_item>
<combo_item name="Parks&amp;Nature" value="park">
Parks &amp; Nature
Parks and Nature
</combo_item>
<combo_item name="Residential" value="home">
Residential
@@ -506,6 +506,9 @@ To buy direct, visit the land and click on the place name in the title bar.
<combo_item name="Other" value="other">
Other
</combo_item>
<combo_item name="Rental" value="rental">
Rental
</combo_item>
</combo_box>
<!-- This is used only during the AO transition and can be deleted once the AO transition is
complete. It is identical to the combo box above except that it has the Adult category.
@@ -522,7 +525,7 @@ To buy direct, visit the land and click on the place name in the title bar.
Adult
</combo_item>
<combo_item name="Arts&amp;Culture" value="arts">
Arts &amp; Culture
Arts and Culture
</combo_item>
<combo_item name="Business" value="store">
Business
@@ -540,7 +543,7 @@ To buy direct, visit the land and click on the place name in the title bar.
Newcomer Friendly
</combo_item>
<combo_item name="Parks&amp;Nature" value="park">
Parks &amp; Nature
Parks and Nature
</combo_item>
<combo_item name="Residential" value="home">
Residential
@@ -551,6 +554,9 @@ To buy direct, visit the land and click on the place name in the title bar.
<combo_item name="Other" value="other">
Other
</combo_item>
<combo_item name="Rental" value="rental">
Rental
</combo_item>
</combo_box>
<button bottom="-48" follows="right|top" font="SansSerif" halign="center" height="20"
label="Search" label_selected="Search" left="121" mouse_opaque="true"

View File

@@ -419,7 +419,7 @@ To buy direct, visit the land and click on the place name in the title bar.
Official Location
</combo_item>
<combo_item name="Arts&amp;Culture" value="arts">
Arts &amp; Culture
Artsand Culture
</combo_item>
<combo_item name="Business" value="store">
Business
@@ -437,7 +437,7 @@ To buy direct, visit the land and click on the place name in the title bar.
Newcomer Friendly
</combo_item>
<combo_item name="Parks&amp;Nature" value="park">
Parks &amp; Nature
Parks and Nature
</combo_item>
<combo_item name="Residential" value="home">
Residential
@@ -448,6 +448,9 @@ To buy direct, visit the land and click on the place name in the title bar.
<combo_item name="Other" value="other">
Other
</combo_item>
<combo_item name="Rental" value="rental">
Rental
</combo_item>
</combo_box>
<!-- This is used only during the AO transition and can be deleted once the AO transition is
complete. It is identical to the combo box above except that it has the Adult category.
@@ -464,7 +467,7 @@ To buy direct, visit the land and click on the place name in the title bar.
Adult
</combo_item>
<combo_item name="Arts&amp;Culture" value="arts">
Arts &amp; Culture
Arts and Culture
</combo_item>
<combo_item name="Business" value="store">
Business
@@ -482,7 +485,7 @@ To buy direct, visit the land and click on the place name in the title bar.
Newcomer Friendly
</combo_item>
<combo_item name="Parks&amp;Nature" value="park">
Parks &amp; Nature
Parks and Nature
</combo_item>
<combo_item name="Residential" value="home">
Residential
@@ -493,6 +496,9 @@ To buy direct, visit the land and click on the place name in the title bar.
<combo_item name="Other" value="other">
Other
</combo_item>
<combo_item name="Rental" value="rental">
Rental
</combo_item>
</combo_box>
<button bottom="-48" follows="right|top" font="SansSerif" halign="center" height="20"
label="Search" label_selected="Search" left="121" mouse_opaque="true"

View File

@@ -535,7 +535,7 @@ To buy direct, visit the land and click on the place name in the title bar.
Official Location
</combo_item>
<combo_item name="Arts&amp;Culture" value="arts">
Arts &amp; Culture
Arts and Culture
</combo_item>
<combo_item name="Business" value="store">
Business
@@ -553,7 +553,7 @@ To buy direct, visit the land and click on the place name in the title bar.
Newcomer Friendly
</combo_item>
<combo_item name="Parks&amp;Nature" value="park">
Parks &amp; Nature
Parks and Nature
</combo_item>
<combo_item name="Residential" value="home">
Residential
@@ -564,6 +564,9 @@ To buy direct, visit the land and click on the place name in the title bar.
<combo_item name="Other" value="other">
Other
</combo_item>
<combo_item name="Rental" value="rental">
Rental
</combo_item>
</combo_box>
<!-- This is used only during the AO transition and can be deleted once the AO transition is
complete. It is identical to the combo box above except that it has the Adult category.
@@ -580,7 +583,7 @@ To buy direct, visit the land and click on the place name in the title bar.
Adult
</combo_item>
<combo_item name="Arts&amp;Culture" value="arts">
Arts &amp; Culture
Arts and Culture
</combo_item>
<combo_item name="Business" value="store">
Business
@@ -598,7 +601,7 @@ To buy direct, visit the land and click on the place name in the title bar.
Newcomer Friendly
</combo_item>
<combo_item name="Parks&amp;Nature" value="park">
Parks &amp; Nature
Parks and Nature
</combo_item>
<combo_item name="Residential" value="home">
Residential
@@ -609,6 +612,9 @@ To buy direct, visit the land and click on the place name in the title bar.
<combo_item name="Other" value="other">
Other
</combo_item>
<combo_item name="Rental" value="rental">
Rental
</combo_item>
</combo_box>
<button bottom="-48" follows="right|top" font="SansSerif" halign="center" height="20"
label="Search" label_selected="Search" left="121" mouse_opaque="true"

View File

@@ -6933,6 +6933,12 @@ No
For instructions, make a new template in the AO. Use the toolbar to toggle the AO on/off.
</notification>
<notification icon="notifytip.tga" name="BlockedCards" type="notifytip">Blocked calling cards from [FIRST] [LAST] ([SOURCE])</notification>
<notification icon="notifytip.tga" name="BlockedDialogs" type="notifytip">Blocking all dialogs from [FIRST] [LAST]'s objects. (Origin: [SOURCE])</notification>
<notification icon="notifytip.tga" name="BlockedGeneralAvatar" type="notifytip">Blocked spam from avatar [FULL_NAME] ([SOURCE])</notification>
<notification icon="notifytip.tga" name="BlockedGeneralObjects" type="notifytip">Blocked spam from objects owned by [OWNER] ([SOURCE])</notification>
<notification icon="notifytip.tga" name="BlockedChatterAvatar" type="notifytip">Blocked chat-spam from avatar [FULL_NAME] ([SOURCE])</notification>
<notification icon="notifytip.tga" name="BlockedChatterObjects" type="notifytip">Blocked chat-spam from objects owned by [OWNER] ([SOURCE])</notification>
</notifications>