Merge branch 'master' of https://github.com/Shyotl/SingularityViewer
Conflicts: indra/newview/app_settings/settings.xml
This commit is contained in:
@@ -27,6 +27,7 @@ set(llcommon_SOURCE_FILES
|
||||
llcriticaldamp.cpp
|
||||
llcursortypes.cpp
|
||||
lldate.cpp
|
||||
lldictionary.cpp
|
||||
llerror.cpp
|
||||
llerrorthread.cpp
|
||||
llevent.cpp
|
||||
@@ -106,6 +107,7 @@ set(llcommon_HEADER_FILES
|
||||
lldate.h
|
||||
lldefs.h
|
||||
lldepthstack.h
|
||||
lldictionary.h
|
||||
lldlinked.h
|
||||
lldqueueptr.h
|
||||
llendianswizzle.h
|
||||
|
||||
54
indra/llcommon/lldictionary.cpp
Normal file
54
indra/llcommon/lldictionary.cpp
Normal file
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* @file lldictionary.cpp
|
||||
* @brief Lldictionary class header file
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2010, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlife.com/developers/opensource/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlife.com/developers/opensource/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "lldictionary.h"
|
||||
|
||||
#include "llstring.h"
|
||||
|
||||
// Define in .cpp file to prevent header include of llstring.h
|
||||
LLDictionaryEntry::LLDictionaryEntry(const std::string &name)
|
||||
: mName(name)
|
||||
{
|
||||
mNameCapitalized = mName;
|
||||
LLStringUtil::replaceChar(mNameCapitalized, '-', ' ');
|
||||
LLStringUtil::replaceChar(mNameCapitalized, '_', ' ');
|
||||
for (U32 i=0; i < mNameCapitalized.size(); i++)
|
||||
{
|
||||
if (i == 0 || mNameCapitalized[i-1] == ' ') // don't change ordering of this statement or crash
|
||||
{
|
||||
mNameCapitalized[i] = toupper(mNameCapitalized[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
103
indra/llcommon/lldictionary.h
Normal file
103
indra/llcommon/lldictionary.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/**
|
||||
* @file lldictionary.h
|
||||
* @brief Lldictionary class header file
|
||||
*
|
||||
* $LicenseInfo:firstyear=2002&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2002-2010, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlife.com/developers/opensource/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlife.com/developers/opensource/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LL_LLDICTIONARY_H
|
||||
#define LL_LLDICTIONARY_H
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
struct LL_COMMON_API LLDictionaryEntry
|
||||
{
|
||||
LLDictionaryEntry(const std::string &name);
|
||||
virtual ~LLDictionaryEntry() {}
|
||||
const std::string mName;
|
||||
std::string mNameCapitalized;
|
||||
};
|
||||
|
||||
template <class Index, class Entry>
|
||||
class LLDictionary : public std::map<Index, Entry *>
|
||||
{
|
||||
public:
|
||||
typedef std::map<Index, Entry *> map_t;
|
||||
typedef typename map_t::iterator iterator_t;
|
||||
typedef typename map_t::const_iterator const_iterator_t;
|
||||
|
||||
LLDictionary() {}
|
||||
virtual ~LLDictionary()
|
||||
{
|
||||
for (iterator_t iter = map_t::begin(); iter != map_t::end(); ++iter)
|
||||
delete (iter->second);
|
||||
}
|
||||
|
||||
const Entry *lookup(Index index) const
|
||||
{
|
||||
const_iterator_t dictionary_iter = map_t::find(index);
|
||||
if (dictionary_iter == map_t::end()) return NULL;
|
||||
return dictionary_iter->second;
|
||||
}
|
||||
const Index lookup(const std::string &name) const
|
||||
{
|
||||
for (const_iterator_t dictionary_iter = map_t::begin();
|
||||
dictionary_iter != map_t::end();
|
||||
dictionary_iter++)
|
||||
{
|
||||
const Entry *entry = dictionary_iter->second;
|
||||
if (entry->mName == name)
|
||||
{
|
||||
return dictionary_iter->first;
|
||||
}
|
||||
}
|
||||
return notFound();
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual Index notFound() const
|
||||
{
|
||||
// default is to assert
|
||||
// don't assert -- makes it impossible to work on mesh-development and viewer-development simultaneously
|
||||
// -- davep 2010.10.29
|
||||
//llassert(false);
|
||||
return Index(-1);
|
||||
}
|
||||
void addEntry(Index index, Entry *entry)
|
||||
{
|
||||
if (lookup(index))
|
||||
{
|
||||
llerrs << "Dictionary entry already added (attempted to add duplicate entry)" << llendl;
|
||||
}
|
||||
(*this)[index] = entry;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // LL_LLDICTIONARY_H
|
||||
@@ -19,6 +19,7 @@ set(llinventory_SOURCE_FILES
|
||||
llcategory.cpp
|
||||
lleconomy.cpp
|
||||
llinventory.cpp
|
||||
llinventorydefines.cpp
|
||||
llinventorytype.cpp
|
||||
lllandmark.cpp
|
||||
llnotecard.cpp
|
||||
@@ -35,6 +36,7 @@ set(llinventory_HEADER_FILES
|
||||
llcategory.h
|
||||
lleconomy.h
|
||||
llinventory.h
|
||||
llinventorydefines.h
|
||||
llinventorytype.h
|
||||
lllandmark.h
|
||||
llnotecard.h
|
||||
|
||||
@@ -64,34 +64,27 @@ static const std::string INV_CREATION_DATE_LABEL("created_at");
|
||||
// key used by agent-inventory-service
|
||||
static const std::string INV_ASSET_TYPE_LABEL_WS("type_default");
|
||||
static const std::string INV_FOLDER_ID_LABEL_WS("category_id");
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Local function declarations, constants, enums, and typedefs
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
const U8 TASK_INVENTORY_ITEM_KEY = 0;
|
||||
const U8 TASK_INVENTORY_ASSET_KEY = 1;
|
||||
|
||||
const LLUUID MAGIC_ID("3c115e51-04f4-523c-9fa6-98aff1034730");
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLInventoryObject
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLInventoryObject::LLInventoryObject(
|
||||
const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
LLAssetType::EType type,
|
||||
const std::string& name) :
|
||||
LLInventoryObject::LLInventoryObject(const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
LLAssetType::EType type,
|
||||
const std::string& name) :
|
||||
mUUID(uuid),
|
||||
mParentUUID(parent_uuid),
|
||||
mType(type),
|
||||
mName(name)
|
||||
{
|
||||
LLStringUtil::replaceNonstandardASCII(mName, ' ');
|
||||
LLStringUtil::replaceChar(mName, '|', ' ');
|
||||
LLStringUtil::trim(mName);
|
||||
LLStringUtil::truncate(mName, DB_INV_ITEM_NAME_STR_LEN);
|
||||
correctInventoryName(mName);
|
||||
}
|
||||
|
||||
LLInventoryObject::LLInventoryObject() :
|
||||
@@ -99,7 +92,7 @@ LLInventoryObject::LLInventoryObject() :
|
||||
{
|
||||
}
|
||||
|
||||
LLInventoryObject::~LLInventoryObject( void )
|
||||
LLInventoryObject::~LLInventoryObject()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -158,12 +151,8 @@ void LLInventoryObject::setUUID(const LLUUID& new_uuid)
|
||||
void LLInventoryObject::rename(const std::string& n)
|
||||
{
|
||||
std::string new_name(n);
|
||||
LLStringUtil::replaceNonstandardASCII(new_name, ' ');
|
||||
LLStringUtil::replaceChar(new_name, '|', ' ');
|
||||
LLStringUtil::trim(new_name);
|
||||
LLStringUtil::truncate(new_name, DB_INV_ITEM_NAME_STR_LEN);
|
||||
|
||||
if( new_name != mName )
|
||||
correctInventoryName(new_name);
|
||||
if( !new_name.empty() && new_name != mName )
|
||||
{
|
||||
mName = new_name;
|
||||
}
|
||||
@@ -224,10 +213,7 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
|
||||
" %254s %254[^|]",
|
||||
keyword, valuestr);
|
||||
mName.assign(valuestr);
|
||||
LLStringUtil::replaceNonstandardASCII(mName, ' ');
|
||||
LLStringUtil::replaceChar(mName, '|', ' ');
|
||||
LLStringUtil::trim(mName);
|
||||
LLStringUtil::truncate(mName, DB_INV_ITEM_NAME_STR_LEN);
|
||||
correctInventoryName(mName);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -287,23 +273,31 @@ void LLInventoryObject::updateServer(BOOL) const
|
||||
llwarns << "LLInventoryObject::updateServer() called. Doesn't do anything." << llendl;
|
||||
}
|
||||
|
||||
inline
|
||||
void LLInventoryObject::correctInventoryName(std::string& name)
|
||||
{
|
||||
LLStringUtil::replaceNonstandardASCII(name, ' ');
|
||||
LLStringUtil::replaceChar(name, '|', ' ');
|
||||
LLStringUtil::trim(name);
|
||||
LLStringUtil::truncate(name, DB_INV_ITEM_NAME_STR_LEN);
|
||||
}
|
||||
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLInventoryItem
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLInventoryItem::LLInventoryItem(
|
||||
const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
const LLPermissions& permissions,
|
||||
const LLUUID& asset_uuid,
|
||||
LLAssetType::EType type,
|
||||
LLInventoryType::EType inv_type,
|
||||
const std::string& name,
|
||||
const std::string& desc,
|
||||
const LLSaleInfo& sale_info,
|
||||
U32 flags,
|
||||
S32 creation_date_utc) :
|
||||
LLInventoryItem::LLInventoryItem(const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
const LLPermissions& permissions,
|
||||
const LLUUID& asset_uuid,
|
||||
LLAssetType::EType type,
|
||||
LLInventoryType::EType inv_type,
|
||||
const std::string& name,
|
||||
const std::string& desc,
|
||||
const LLSaleInfo& sale_info,
|
||||
U32 flags,
|
||||
S32 creation_date_utc) :
|
||||
LLInventoryObject(uuid, parent_uuid, type, name),
|
||||
mPermissions(permissions),
|
||||
mAssetUUID(asset_uuid),
|
||||
@@ -315,6 +309,7 @@ LLInventoryItem::LLInventoryItem(
|
||||
{
|
||||
LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
|
||||
LLStringUtil::replaceChar(mDescription, '|', ' ');
|
||||
mPermissions.initMasks(inv_type);
|
||||
}
|
||||
|
||||
LLInventoryItem::LLInventoryItem() :
|
||||
@@ -446,6 +441,9 @@ void LLInventoryItem::setDescription(const std::string& d)
|
||||
void LLInventoryItem::setPermissions(const LLPermissions& perm)
|
||||
{
|
||||
mPermissions = perm;
|
||||
|
||||
// Override permissions to unrestricted if this is a landmark
|
||||
mPermissions.initMasks(mInventoryType);
|
||||
}
|
||||
|
||||
void LLInventoryItem::setInventoryType(LLInventoryType::EType inv_type)
|
||||
@@ -463,6 +461,46 @@ void LLInventoryItem::setCreationDate(time_t creation_date_utc)
|
||||
mCreationDate = creation_date_utc;
|
||||
}
|
||||
|
||||
// Currently only used in the Viewer to handle calling cards
|
||||
// where the creator is actually used to store the target.
|
||||
void LLInventoryItem::setCreator(const LLUUID& creator)
|
||||
{
|
||||
mPermissions.setCreator(creator);
|
||||
}
|
||||
|
||||
void LLInventoryItem::accumulatePermissionSlamBits(const LLInventoryItem& old_item)
|
||||
{
|
||||
// Remove any pre-existing II_FLAGS_PERM_OVERWRITE_MASK flags
|
||||
// because we now detect when they should be set.
|
||||
setFlags( old_item.getFlags() | (getFlags() & ~(LLInventoryItemFlags::II_FLAGS_PERM_OVERWRITE_MASK)) );
|
||||
|
||||
// Enforce the PERM_OVERWRITE flags for any masks that are different
|
||||
// but only for AT_OBJECT's since that is the only asset type that can
|
||||
// exist in-world (instead of only in-inventory or in-object-contents).
|
||||
if (LLAssetType::AT_OBJECT == getType())
|
||||
{
|
||||
LLPermissions old_permissions = old_item.getPermissions();
|
||||
U32 flags_to_be_set = 0;
|
||||
if(old_permissions.getMaskNextOwner() != getPermissions().getMaskNextOwner())
|
||||
{
|
||||
flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_PERM;
|
||||
}
|
||||
if(old_permissions.getMaskEveryone() != getPermissions().getMaskEveryone())
|
||||
{
|
||||
flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
|
||||
}
|
||||
if(old_permissions.getMaskGroup() != getPermissions().getMaskGroup())
|
||||
{
|
||||
flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
|
||||
}
|
||||
LLSaleInfo old_sale_info = old_item.getSaleInfo();
|
||||
if(old_sale_info != getSaleInfo())
|
||||
{
|
||||
flags_to_be_set |= LLInventoryItemFlags::II_FLAGS_OBJECT_SLAM_SALE;
|
||||
}
|
||||
setFlags(getFlags() | flags_to_be_set);
|
||||
}
|
||||
}
|
||||
|
||||
const LLSaleInfo& LLInventoryItem::getSaleInfo() const
|
||||
{
|
||||
@@ -517,6 +555,7 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
|
||||
mType = static_cast<LLAssetType::EType>(type);
|
||||
msg->getS8(block, "InvType", type, block_num);
|
||||
mInventoryType = static_cast<LLInventoryType::EType>(type);
|
||||
mPermissions.initMasks(mInventoryType);
|
||||
|
||||
msg->getU32Fast(block, _PREHASH_Flags, mFlags, block_num);
|
||||
|
||||
@@ -707,6 +746,9 @@ BOOL LLInventoryItem::importFile(LLFILE* fp)
|
||||
lldebugs << "Resetting inventory type for " << mUUID << llendl;
|
||||
mInventoryType = LLInventoryType::defaultForAssetType(mType);
|
||||
}
|
||||
|
||||
mPermissions.initMasks(mInventoryType);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -746,8 +788,8 @@ BOOL LLInventoryItem::exportFile(LLFILE* fp, BOOL include_asset_key) const
|
||||
fprintf(fp, "\t\tasset_id\t%s\n", uuid_str.c_str());
|
||||
}
|
||||
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\tflags\t%08x\n", mFlags);
|
||||
mSaleInfo.exportFile(fp);
|
||||
fprintf(fp, "\t\tname\t%s|\n", mName.c_str());
|
||||
@@ -910,6 +952,9 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
|
||||
lldebugs << "Resetting inventory type for " << mUUID << llendl;
|
||||
mInventoryType = LLInventoryType::defaultForAssetType(mType);
|
||||
}
|
||||
|
||||
mPermissions.initMasks(mInventoryType);
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
@@ -949,8 +994,8 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
|
||||
output_stream << "\t\tasset_id\t" << uuid_str << "\n";
|
||||
}
|
||||
output_stream << "\t\ttype\t" << LLAssetType::lookup(mType) << "\n";
|
||||
const char* inv_type_str = LLInventoryType::lookup(mInventoryType);
|
||||
if(inv_type_str)
|
||||
const std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
|
||||
if(!inv_type_str.empty())
|
||||
output_stream << "\t\tinv_type\t" << inv_type_str << "\n";
|
||||
std::string buffer;
|
||||
buffer = llformat( "\t\tflags\t%08x\n", mFlags);
|
||||
@@ -966,6 +1011,12 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
|
||||
LLSD LLInventoryItem::asLLSD() const
|
||||
{
|
||||
LLSD sd = LLSD();
|
||||
asLLSD(sd);
|
||||
return sd;
|
||||
}
|
||||
|
||||
void LLInventoryItem::asLLSD( LLSD& sd ) const
|
||||
{
|
||||
sd[INV_ITEM_ID_LABEL] = mUUID;
|
||||
sd[INV_PARENT_ID_LABEL] = mParentUUID;
|
||||
sd[INV_PERMISSIONS_LABEL] = ll_create_sd_from_permissions(mPermissions);
|
||||
@@ -986,8 +1037,8 @@ LLSD LLInventoryItem::asLLSD() const
|
||||
}
|
||||
sd[INV_ASSET_TYPE_LABEL] = LLAssetType::lookup(mType);
|
||||
sd[INV_INVENTORY_TYPE_LABEL] = mInventoryType;
|
||||
const char* inv_type_str = LLInventoryType::lookup(mInventoryType);
|
||||
if(inv_type_str)
|
||||
const std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
|
||||
if(!inv_type_str.empty())
|
||||
{
|
||||
sd[INV_INVENTORY_TYPE_LABEL] = inv_type_str;
|
||||
}
|
||||
@@ -997,11 +1048,9 @@ LLSD LLInventoryItem::asLLSD() const
|
||||
sd[INV_NAME_LABEL] = mName;
|
||||
sd[INV_DESC_LABEL] = mDescription;
|
||||
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
|
||||
|
||||
return sd;
|
||||
}
|
||||
|
||||
bool LLInventoryItem::fromLLSD(LLSD& sd)
|
||||
bool LLInventoryItem::fromLLSD(const LLSD& sd)
|
||||
{
|
||||
mInventoryType = LLInventoryType::IT_NONE;
|
||||
mAssetUUID.setNull();
|
||||
@@ -1128,6 +1177,8 @@ bool LLInventoryItem::fromLLSD(LLSD& sd)
|
||||
mInventoryType = LLInventoryType::defaultForAssetType(mType);
|
||||
}
|
||||
|
||||
mPermissions.initMasks(mInventoryType);
|
||||
|
||||
return true;
|
||||
fail:
|
||||
return false;
|
||||
@@ -1294,23 +1345,19 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size)
|
||||
// Early exit on an empty binary bucket.
|
||||
if (bin_bucket_size <= 1) return;
|
||||
|
||||
// Convert the bin_bucket into a string.
|
||||
char* item_buffer = new char[bin_bucket_size+1];
|
||||
if ((item_buffer != NULL) && (bin_bucket != NULL))
|
||||
if (NULL == bin_bucket)
|
||||
{
|
||||
memcpy(item_buffer, bin_bucket, bin_bucket_size); /* Flawfinder: ignore */
|
||||
}
|
||||
else
|
||||
{
|
||||
llerrs << "unpackBinaryBucket failed. item_buffer or bin_bucket is Null." << llendl;
|
||||
delete[] item_buffer;
|
||||
llerrs << "unpackBinaryBucket failed. bin_bucket is NULL." << llendl;
|
||||
return;
|
||||
}
|
||||
item_buffer[bin_bucket_size] = '\0';
|
||||
std::string str(item_buffer);
|
||||
|
||||
lldebugs << "item buffer: " << item_buffer << llendl;
|
||||
delete[] item_buffer;
|
||||
// Convert the bin_bucket into a string.
|
||||
std::vector<char> item_buffer(bin_bucket_size+1);
|
||||
memcpy(&item_buffer[0], bin_bucket, bin_bucket_size); /* Flawfinder: ignore */
|
||||
item_buffer[bin_bucket_size] = '\0';
|
||||
std::string str(&item_buffer[0]);
|
||||
|
||||
lldebugs << "item buffer: " << str << llendl;
|
||||
|
||||
// Tokenize the string.
|
||||
typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
|
||||
@@ -1385,11 +1432,10 @@ BOOL item_date_sort( LLInventoryItem* a, LLInventoryItem* b )
|
||||
/// Class LLInventoryCategory
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
LLInventoryCategory::LLInventoryCategory(
|
||||
const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
LLAssetType::EType preferred_type,
|
||||
const std::string& name) :
|
||||
LLInventoryCategory::LLInventoryCategory(const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
LLAssetType::EType preferred_type,
|
||||
const std::string& name) :
|
||||
LLInventoryObject(uuid, parent_uuid, LLAssetType::AT_CATEGORY, name),
|
||||
mPreferredType(preferred_type)
|
||||
{
|
||||
@@ -1451,7 +1497,7 @@ void LLInventoryCategory::packMessage(LLMessageSystem* msg) const
|
||||
msg->addStringFast(_PREHASH_Name, mName);
|
||||
}
|
||||
|
||||
bool LLInventoryCategory::fromLLSD(LLSD& sd)
|
||||
bool LLInventoryCategory::fromLLSD(const LLSD& sd)
|
||||
{
|
||||
std::string w;
|
||||
|
||||
|
||||
@@ -33,180 +33,107 @@
|
||||
#ifndef LL_LLINVENTORY_H
|
||||
#define LL_LLINVENTORY_H
|
||||
|
||||
#include <functional>
|
||||
|
||||
#include "llassetstorage.h"
|
||||
#include "lldarray.h"
|
||||
#include "llinventorytype.h"
|
||||
#include "llinventorydefines.h"
|
||||
#include "llmemtype.h"
|
||||
#include "llpermissions.h"
|
||||
#include "llsaleinfo.h"
|
||||
#include "llsd.h"
|
||||
#include "lluuid.h"
|
||||
#include "llxmlnode.h"
|
||||
|
||||
// consts for Key field in the task inventory update message
|
||||
extern const U8 TASK_INVENTORY_ITEM_KEY;
|
||||
extern const U8 TASK_INVENTORY_ASSET_KEY;
|
||||
|
||||
// anonymous enumeration to specify a max inventory buffer size for
|
||||
// use in packBinaryBucket()
|
||||
enum
|
||||
{
|
||||
MAX_INVENTORY_BUFFER_SIZE = 1024
|
||||
};
|
||||
|
||||
|
||||
class LLMessageSystem;
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Class LLInventoryObject
|
||||
//
|
||||
// This is the base class for inventory objects that handles the
|
||||
// common code between items and categories. The 'mParentUUID' member
|
||||
// means the parent category since all inventory objects except each
|
||||
// user's root category are in some category. Each user's root
|
||||
// category will have mParentUUID==LLUUID::null.
|
||||
// Base class for anything in the user's inventory. Handles the common code
|
||||
// between items and categories.
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
class LLMessageSystem;
|
||||
|
||||
class LLInventoryObject : public LLRefCount
|
||||
{
|
||||
protected:
|
||||
LLUUID mUUID;
|
||||
LLUUID mParentUUID;
|
||||
LLAssetType::EType mType;
|
||||
std::string mName;
|
||||
public:
|
||||
typedef std::list<LLPointer<LLInventoryObject> > object_list_t;
|
||||
|
||||
protected:
|
||||
virtual ~LLInventoryObject( void );
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
|
||||
LLInventoryObject(const LLUUID& uuid, const LLUUID& parent_uuid,
|
||||
LLAssetType::EType type, const std::string& name);
|
||||
LLInventoryObject();
|
||||
LLInventoryObject(const LLUUID& uuid,
|
||||
const LLUUID& parent_uuid,
|
||||
LLAssetType::EType type,
|
||||
const std::string& name);
|
||||
void copyObject(const LLInventoryObject* other); // LLRefCount requires custom copy
|
||||
protected:
|
||||
virtual ~LLInventoryObject();
|
||||
|
||||
// accessors
|
||||
virtual const LLUUID& getUUID() const;
|
||||
//--------------------------------------------------------------------
|
||||
// Accessors
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
virtual const LLUUID& getUUID() const; // inventoryID that this item points to
|
||||
virtual const LLUUID& getLinkedUUID() const; // inventoryID that this item points to, else this item's inventoryID
|
||||
const LLUUID& getParentUUID() const;
|
||||
virtual const LLUUID& getLinkedUUID() const; // get the inventoryID that this item points to, else this item's inventoryID
|
||||
virtual const std::string& getName() const;
|
||||
virtual LLAssetType::EType getType() const;
|
||||
LLAssetType::EType getActualType() const; // bypasses indirection for linked items
|
||||
BOOL getIsLinkType() const;
|
||||
// mutators - will not call updateServer();
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Mutators
|
||||
// Will not call updateServer
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
void setUUID(const LLUUID& new_uuid);
|
||||
virtual void rename(const std::string& new_name);
|
||||
void setParent(const LLUUID& new_parent);
|
||||
void setType(LLAssetType::EType type);
|
||||
|
||||
// file support - implemented here so that a minimal information
|
||||
// set can be transmitted between simulator and viewer.
|
||||
// virtual BOOL importFile(LLFILE* fp);
|
||||
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
|
||||
private:
|
||||
// in place correction for inventory name string
|
||||
void correctInventoryName(std::string& name);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// File Support
|
||||
// Implemented here so that a minimal information set can be transmitted
|
||||
// between simulator and viewer.
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
// virtual BOOL importFile(LLFILE* fp);
|
||||
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
|
||||
virtual BOOL importLegacyStream(std::istream& input_stream);
|
||||
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
|
||||
|
||||
// virtual methods
|
||||
virtual void removeFromServer();
|
||||
virtual void updateParentOnServer(BOOL) const;
|
||||
virtual void updateServer(BOOL) const;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Member Variables
|
||||
//--------------------------------------------------------------------
|
||||
protected:
|
||||
LLUUID mUUID;
|
||||
LLUUID mParentUUID; // Parent category. Root categories have LLUUID::NULL.
|
||||
LLAssetType::EType mType;
|
||||
std::string mName;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// Class LLInventoryItem
|
||||
//
|
||||
// An inventory item represents something that the current user has in
|
||||
// their inventory.
|
||||
// An item in the current user's inventory.
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
class LLInventoryItem : public LLInventoryObject
|
||||
{
|
||||
public:
|
||||
typedef LLDynamicArray<LLPointer<LLInventoryItem> > item_array_t;
|
||||
|
||||
protected:
|
||||
LLPermissions mPermissions;
|
||||
LLUUID mAssetUUID;
|
||||
std::string mDescription;
|
||||
LLSaleInfo mSaleInfo;
|
||||
LLInventoryType::EType mInventoryType;
|
||||
U32 mFlags;
|
||||
time_t mCreationDate; // seconds from 1/1/1970, UTC
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Anonymous enumeration for specifying the inventory item flags.
|
||||
*/
|
||||
enum
|
||||
{
|
||||
// The shared flags at the top are shared among all inventory
|
||||
// types. After that section, all values of flags are type
|
||||
// dependent. The shared flags will start at 2^30 and work
|
||||
// down while item type specific flags will start at 2^0 and
|
||||
// work up.
|
||||
II_FLAGS_NONE = 0,
|
||||
|
||||
|
||||
//
|
||||
// Shared flags
|
||||
//
|
||||
//
|
||||
|
||||
// This value means that the asset has only one reference in
|
||||
// the system. If the inventory item is deleted, or the asset
|
||||
// id updated, then we can remove the old reference.
|
||||
II_FLAGS_SHARED_SINGLE_REFERENCE = 0x40000000,
|
||||
|
||||
|
||||
//
|
||||
// Landmark flags
|
||||
//
|
||||
II_FLAGS_LANDMARK_VISITED = 1,
|
||||
|
||||
//
|
||||
// Object flags
|
||||
//
|
||||
|
||||
// flag to indicate that object permissions should have next
|
||||
// owner perm be more restrictive on rez. We bump this into
|
||||
// the second byte of the flags since the low byte is used to
|
||||
// track attachment points.
|
||||
II_FLAGS_OBJECT_SLAM_PERM = 0x100,
|
||||
|
||||
// flag to indicate that the object sale information has been changed.
|
||||
II_FLAGS_OBJECT_SLAM_SALE = 0x1000,
|
||||
|
||||
// These flags specify which permissions masks to overwrite
|
||||
// upon rez. Normally, if no permissions slam (above) or
|
||||
// overwrite flags are set, the asset's permissions are
|
||||
// used and the inventory's permissions are ignored. If
|
||||
// any of these flags are set, the inventory's permissions
|
||||
// take precedence.
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_BASE = 0x010000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER = 0x020000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP = 0x040000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE = 0x080000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER = 0x100000,
|
||||
|
||||
// flag to indicate whether an object that is returned is composed
|
||||
// of muiltiple items or not.
|
||||
II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS = 0x200000,
|
||||
|
||||
//
|
||||
// wearables use the low order byte of flags to store the
|
||||
// EWearableType enumeration found in newview/llwearable.h
|
||||
//
|
||||
II_FLAGS_WEARABLES_MASK = 0xff,
|
||||
};
|
||||
|
||||
protected:
|
||||
~LLInventoryItem(); // ref counted
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
|
||||
LLInventoryItem(const LLUUID& uuid,
|
||||
@@ -226,13 +153,19 @@ public:
|
||||
// is prohibited
|
||||
LLInventoryItem(const LLInventoryItem* other);
|
||||
virtual void copyItem(const LLInventoryItem* other); // LLRefCount requires custom copy
|
||||
|
||||
// As a constructor alternative, the clone() method works like a
|
||||
void generateUUID() { mUUID.generate(); }
|
||||
|
||||
// As a constructor alternative, the clone() method works like a
|
||||
// copy constructor, but gens a new UUID.
|
||||
// It is up to the caller to delete (unref) the item.
|
||||
virtual void cloneItem(LLPointer<LLInventoryItem>& newitem) const;
|
||||
protected:
|
||||
~LLInventoryItem(); // ref counted
|
||||
|
||||
// accessors
|
||||
//--------------------------------------------------------------------
|
||||
// Accessors
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
virtual const LLUUID& getLinkedUUID() const;
|
||||
virtual const LLPermissions& getPermissions() const;
|
||||
virtual const LLUUID& getCreatorUUID() const;
|
||||
@@ -244,8 +177,12 @@ public:
|
||||
virtual time_t getCreationDate() const;
|
||||
virtual U32 getCRC32() const; // really more of a checksum.
|
||||
|
||||
// mutators - will not call updateServer(), and will never fail
|
||||
// (though it may correct to sane values)
|
||||
//--------------------------------------------------------------------
|
||||
// Mutators
|
||||
// Will not call updateServer and will never fail
|
||||
// (though it may correct to sane values)
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
void setAssetUUID(const LLUUID& asset_id);
|
||||
void setDescription(const std::string& new_desc);
|
||||
void setSaleInfo(const LLSaleInfo& sale_info);
|
||||
@@ -253,34 +190,56 @@ public:
|
||||
void setInventoryType(LLInventoryType::EType inv_type);
|
||||
void setFlags(U32 flags);
|
||||
void setCreationDate(time_t creation_date_utc);
|
||||
void setCreator(const LLUUID& creator); // only used for calling cards
|
||||
|
||||
// Put this inventory item onto the current outgoing mesage. It
|
||||
// assumes you have already called nextBlock().
|
||||
// Check for changes in permissions masks and sale info
|
||||
// and set the corresponding bits in mFlags.
|
||||
void accumulatePermissionSlamBits(const LLInventoryItem& old_item);
|
||||
|
||||
// Put this inventory item onto the current outgoing mesage.
|
||||
// Assumes you have already called nextBlock().
|
||||
virtual void packMessage(LLMessageSystem* msg) const;
|
||||
|
||||
// unpack returns TRUE if the inventory item came through the
|
||||
// network ok. It uses a simple crc check which is defeatable, but
|
||||
// we want to detect network mangling somehow.
|
||||
virtual BOOL unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
|
||||
// file support
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// File Support
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
virtual BOOL importFile(LLFILE* fp);
|
||||
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
|
||||
|
||||
virtual BOOL importLegacyStream(std::istream& input_stream);
|
||||
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
|
||||
|
||||
virtual LLXMLNode *exportFileXML(BOOL include_asset_key = TRUE) const;
|
||||
BOOL importXML(LLXMLNode* node);
|
||||
|
||||
// helper functions
|
||||
//--------------------------------------------------------------------
|
||||
// Helper Functions
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
// Pack all information needed to reconstruct this item into the given binary bucket.
|
||||
|
||||
// pack all information needed to reconstruct this item into the given binary bucket.
|
||||
// perm_override is optional
|
||||
S32 packBinaryBucket(U8* bin_bucket, LLPermissions* perm_override = NULL) const;
|
||||
void unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size);
|
||||
LLSD asLLSD() const;
|
||||
bool fromLLSD(LLSD& sd);
|
||||
void asLLSD( LLSD& sd ) const;
|
||||
bool fromLLSD(const LLSD& sd);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Member Variables
|
||||
//--------------------------------------------------------------------
|
||||
protected:
|
||||
LLPermissions mPermissions;
|
||||
LLUUID mAssetUUID;
|
||||
std::string mDescription;
|
||||
LLSaleInfo mSaleInfo;
|
||||
LLInventoryType::EType mInventoryType;
|
||||
U32 mFlags;
|
||||
time_t mCreationDate; // seconds from 1/1/1970, UTC
|
||||
};
|
||||
|
||||
BOOL item_dictionary_sort(LLInventoryItem* a,LLInventoryItem* b);
|
||||
@@ -300,9 +259,9 @@ class LLInventoryCategory : public LLInventoryObject
|
||||
public:
|
||||
typedef LLDynamicArray<LLPointer<LLInventoryCategory> > cat_array_t;
|
||||
|
||||
protected:
|
||||
~LLInventoryCategory();
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
|
||||
LLInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid,
|
||||
@@ -311,29 +270,39 @@ public:
|
||||
LLInventoryCategory();
|
||||
LLInventoryCategory(const LLInventoryCategory* other);
|
||||
void copyCategory(const LLInventoryCategory* other); // LLRefCount requires custom copy
|
||||
protected:
|
||||
~LLInventoryCategory();
|
||||
|
||||
// accessors and mutators
|
||||
//--------------------------------------------------------------------
|
||||
// Accessors And Mutators
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
LLAssetType::EType getPreferredType() const;
|
||||
void setPreferredType(LLAssetType::EType type);
|
||||
// For messaging system support
|
||||
LLSD asLLSD() const;
|
||||
bool fromLLSD(const LLSD& sd);
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Messaging
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
virtual void packMessage(LLMessageSystem* msg) const;
|
||||
virtual void unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num = 0);
|
||||
|
||||
LLSD asLLSD() const;
|
||||
bool fromLLSD(LLSD& sd);
|
||||
|
||||
// file support
|
||||
//--------------------------------------------------------------------
|
||||
// File Support
|
||||
//--------------------------------------------------------------------
|
||||
public:
|
||||
virtual BOOL importFile(LLFILE* fp);
|
||||
virtual BOOL exportFile(LLFILE* fp, BOOL include_asset_key = TRUE) const;
|
||||
|
||||
virtual BOOL importLegacyStream(std::istream& input_stream);
|
||||
virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Member Variables
|
||||
//--------------------------------------------------------------------
|
||||
protected:
|
||||
// The type of asset that this category was "meant" to hold
|
||||
// (although it may in fact hold any type).
|
||||
LLAssetType::EType mPreferredType;
|
||||
|
||||
LLAssetType::EType mPreferredType; // Type that this category was "meant" to hold (although it may hold any type).
|
||||
};
|
||||
|
||||
|
||||
@@ -404,8 +373,8 @@ struct SetNotForSale
|
||||
if(LLAssetType::AT_OBJECT == item->getType())
|
||||
{
|
||||
U32 flags = item->getFlags();
|
||||
flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
|
||||
flags |= LLInventoryItem::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
|
||||
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP;
|
||||
flags |= LLInventoryItemFlags::II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE;
|
||||
item->setFlags(flags);
|
||||
}
|
||||
|
||||
|
||||
38
indra/llinventory/llinventorydefines.cpp
Normal file
38
indra/llinventory/llinventorydefines.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @file llinventorydefines.cpp
|
||||
* @brief Implementation of the inventory defines.
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2010, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlife.com/developers/opensource/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlife.com/developers/opensource/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
#include "llinventorydefines.h"
|
||||
|
||||
const U8 TASK_INVENTORY_ITEM_KEY = 0;
|
||||
const U8 TASK_INVENTORY_ASSET_KEY = 1;
|
||||
107
indra/llinventory/llinventorydefines.h
Normal file
107
indra/llinventory/llinventorydefines.h
Normal file
@@ -0,0 +1,107 @@
|
||||
/**
|
||||
* @file llinventorydefines.h
|
||||
* @brief LLInventoryDefines
|
||||
*
|
||||
* $LicenseInfo:firstyear=2001&license=viewergpl$
|
||||
*
|
||||
* Copyright (c) 2001-2010, Linden Research, Inc.
|
||||
*
|
||||
* Second Life Viewer Source Code
|
||||
* The source code in this file ("Source Code") is provided by Linden Lab
|
||||
* to you under the terms of the GNU General Public License, version 2.0
|
||||
* ("GPL"), unless you have obtained a separate licensing agreement
|
||||
* ("Other License"), formally executed by you and Linden Lab. Terms of
|
||||
* the GPL can be found in doc/GPL-license.txt in this distribution, or
|
||||
* online at http://secondlife.com/developers/opensource/gplv2
|
||||
*
|
||||
* There are special exceptions to the terms and conditions of the GPL as
|
||||
* it is applied to this Source Code. View the full text of the exception
|
||||
* in the file doc/FLOSS-exception.txt in this software distribution, or
|
||||
* online at
|
||||
* http://secondlife.com/developers/opensource/flossexception
|
||||
*
|
||||
* By copying, modifying or distributing this software, you acknowledge
|
||||
* that you have read and understood your obligations described above,
|
||||
* and agree to abide by those obligations.
|
||||
*
|
||||
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
|
||||
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
|
||||
* COMPLETENESS OR PERFORMANCE.
|
||||
* $/LicenseInfo$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LL_LLINVENTORYDEFINES_H
|
||||
#define LL_LLINVENTORYDEFINES_H
|
||||
|
||||
// Consts for "key" field in the task inventory update message
|
||||
extern const U8 TASK_INVENTORY_ITEM_KEY;
|
||||
extern const U8 TASK_INVENTORY_ASSET_KEY;
|
||||
|
||||
// Max inventory buffer size (for use in packBinaryBucket)
|
||||
enum
|
||||
{
|
||||
MAX_INVENTORY_BUFFER_SIZE = 1024
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Inventory item flags enums
|
||||
// The shared flags at the top are shared among all inventory
|
||||
// types. After that section, all values of flags are type
|
||||
// dependent. The shared flags will start at 2^30 and work
|
||||
// down while item type specific flags will start at 2^0 and work up.
|
||||
//--------------------------------------------------------------------
|
||||
class LLInventoryItemFlags
|
||||
{
|
||||
public:
|
||||
enum EType
|
||||
{
|
||||
II_FLAGS_NONE = 0,
|
||||
|
||||
II_FLAGS_SHARED_SINGLE_REFERENCE = 0x40000000,
|
||||
// The asset has only one reference in the system. If the
|
||||
// inventory item is deleted, or the assetid updated, then we
|
||||
// can remove the old reference.
|
||||
|
||||
II_FLAGS_LANDMARK_VISITED = 1,
|
||||
|
||||
II_FLAGS_OBJECT_SLAM_PERM = 0x100,
|
||||
// Object permissions should have next owner perm be more
|
||||
// restrictive on rez. We bump this into the second byte of the
|
||||
// flags since the low byte is used to track attachment points.
|
||||
|
||||
II_FLAGS_OBJECT_SLAM_SALE = 0x1000,
|
||||
// The object sale information has been changed.
|
||||
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_BASE = 0x010000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER = 0x020000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP = 0x040000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE = 0x080000,
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER = 0x100000,
|
||||
// Specify which permissions masks to overwrite
|
||||
// upon rez. Normally, if no permissions slam (above) or
|
||||
// overwrite flags are set, the asset's permissions are
|
||||
// used and the inventory's permissions are ignored. If
|
||||
// any of these flags are set, the inventory's permissions
|
||||
// take precedence.
|
||||
|
||||
II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS = 0x200000,
|
||||
// Whether a returned object is composed of multiple items.
|
||||
|
||||
II_FLAGS_WEARABLES_MASK = 0xff,
|
||||
// Wearables use the low order byte of flags to store the
|
||||
// LLWearableType::EType enumeration found in newview/llwearable.h
|
||||
|
||||
II_FLAGS_PERM_OVERWRITE_MASK = (II_FLAGS_OBJECT_SLAM_PERM |
|
||||
II_FLAGS_OBJECT_SLAM_SALE |
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_BASE |
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_OWNER |
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_GROUP |
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_EVERYONE |
|
||||
II_FLAGS_OBJECT_PERM_OVERWRITE_NEXT_OWNER),
|
||||
// These bits need to be cleared whenever the asset_id is updated
|
||||
// on a pre-existing inventory item (DEV-28098 and DEV-30997)
|
||||
};
|
||||
};
|
||||
|
||||
#endif // LL_LLINVENTORYDEFINES_H
|
||||
@@ -33,66 +33,64 @@
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "llinventorytype.h"
|
||||
#include "lldictionary.h"
|
||||
#include "llmemory.h"
|
||||
|
||||
static const std::string empty_string;
|
||||
|
||||
///----------------------------------------------------------------------------
|
||||
/// Class LLInventoryType
|
||||
///----------------------------------------------------------------------------
|
||||
|
||||
// Unlike asset type names, not limited to 8 characters.
|
||||
// Need not match asset type names.
|
||||
static const char* INVENTORY_TYPE_NAMES[LLInventoryType::IT_COUNT] =
|
||||
{
|
||||
"texture", // 0
|
||||
"sound",
|
||||
"callcard",
|
||||
"landmark",
|
||||
NULL,
|
||||
NULL, // 5
|
||||
"object",
|
||||
"notecard",
|
||||
"category",
|
||||
"root",
|
||||
"script", // 10
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"snapshot", // 15
|
||||
NULL,
|
||||
"attach",
|
||||
"wearable",
|
||||
"animation",
|
||||
"gesture", // 20
|
||||
struct InventoryEntry : public LLDictionaryEntry
|
||||
{
|
||||
InventoryEntry(const std::string &name, // unlike asset type names, not limited to 8 characters; need not match asset type names
|
||||
const std::string &human_name, // for decoding to human readable form; put any and as many printable characters you want in each one.
|
||||
int num_asset_types = 0, ...)
|
||||
:
|
||||
LLDictionaryEntry(name),
|
||||
mHumanName(human_name)
|
||||
{
|
||||
va_list argp;
|
||||
va_start(argp, num_asset_types);
|
||||
// Read in local textures
|
||||
for (U8 i=0; i < num_asset_types; i++)
|
||||
{
|
||||
LLAssetType::EType t = (LLAssetType::EType)va_arg(argp,int);
|
||||
mAssetTypes.push_back(t);
|
||||
}
|
||||
}
|
||||
|
||||
const std::string mHumanName;
|
||||
typedef std::vector<LLAssetType::EType> asset_vec_t;
|
||||
asset_vec_t mAssetTypes;
|
||||
};
|
||||
|
||||
// This table is meant for decoding to human readable form. Put any
|
||||
// and as many printable characters you want in each one.
|
||||
// See also LLAssetType::mAssetTypeHumanNames
|
||||
static const char* INVENTORY_TYPE_HUMAN_NAMES[LLInventoryType::IT_COUNT] =
|
||||
{
|
||||
"texture", // 0
|
||||
"sound",
|
||||
"calling card",
|
||||
"landmark",
|
||||
NULL,
|
||||
NULL, // 5
|
||||
"object",
|
||||
"note card",
|
||||
"folder",
|
||||
"root",
|
||||
"script", // 10
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"snapshot", // 15
|
||||
NULL,
|
||||
"attachment",
|
||||
"wearable",
|
||||
"animation",
|
||||
"gesture", // 20
|
||||
class LLInventoryDictionary : public LLSingleton<LLInventoryDictionary>,
|
||||
public LLDictionary<LLInventoryType::EType, InventoryEntry>
|
||||
{
|
||||
public:
|
||||
LLInventoryDictionary();
|
||||
};
|
||||
|
||||
LLInventoryDictionary::LLInventoryDictionary()
|
||||
{
|
||||
addEntry(LLInventoryType::IT_TEXTURE, new InventoryEntry("texture", "texture", 1, LLAssetType::AT_TEXTURE));
|
||||
addEntry(LLInventoryType::IT_SOUND, new InventoryEntry("sound", "sound", 1, LLAssetType::AT_SOUND));
|
||||
addEntry(LLInventoryType::IT_CALLINGCARD, new InventoryEntry("callcard", "calling card", 1, LLAssetType::AT_CALLINGCARD));
|
||||
addEntry(LLInventoryType::IT_LANDMARK, new InventoryEntry("landmark", "landmark", 1, LLAssetType::AT_LANDMARK));
|
||||
addEntry(LLInventoryType::IT_OBJECT, new InventoryEntry("object", "object", 1, LLAssetType::AT_OBJECT));
|
||||
addEntry(LLInventoryType::IT_NOTECARD, new InventoryEntry("notecard", "note card", 1, LLAssetType::AT_NOTECARD));
|
||||
addEntry(LLInventoryType::IT_CATEGORY, new InventoryEntry("category", "folder" ));
|
||||
addEntry(LLInventoryType::IT_ROOT_CATEGORY, new InventoryEntry("root", "root" ));
|
||||
addEntry(LLInventoryType::IT_LSL, new InventoryEntry("script", "script", 2, LLAssetType::AT_LSL_TEXT, LLAssetType::AT_LSL_BYTECODE));
|
||||
addEntry(LLInventoryType::IT_SNAPSHOT, new InventoryEntry("snapshot", "snapshot", 1, LLAssetType::AT_TEXTURE));
|
||||
addEntry(LLInventoryType::IT_ATTACHMENT, new InventoryEntry("attach", "attachment", 1, LLAssetType::AT_OBJECT));
|
||||
addEntry(LLInventoryType::IT_WEARABLE, new InventoryEntry("wearable", "wearable", 2, LLAssetType::AT_CLOTHING, LLAssetType::AT_BODYPART));
|
||||
addEntry(LLInventoryType::IT_ANIMATION, new InventoryEntry("animation", "animation", 1, LLAssetType::AT_ANIMATION));
|
||||
addEntry(LLInventoryType::IT_GESTURE, new InventoryEntry("gesture", "gesture", 1, LLAssetType::AT_GESTURE));
|
||||
}
|
||||
|
||||
|
||||
// Maps asset types to the default inventory type for that kind of asset.
|
||||
// Thus, "Lost and Found" is a "Category"
|
||||
static const LLInventoryType::EType
|
||||
@@ -149,74 +147,28 @@ DEFAULT_ASSET_FOR_INV_TYPE[LLAssetType::AT_COUNT] =
|
||||
LLInventoryType::IT_NONE // AT_MY_OUTFITS
|
||||
};
|
||||
|
||||
static const int MAX_POSSIBLE_ASSET_TYPES = 2;
|
||||
static const LLAssetType::EType
|
||||
INVENTORY_TO_ASSET_TYPE[LLInventoryType::IT_COUNT][MAX_POSSIBLE_ASSET_TYPES] =
|
||||
{
|
||||
{ LLAssetType::AT_TEXTURE, LLAssetType::AT_NONE }, // IT_TEXTURE
|
||||
{ LLAssetType::AT_SOUND, LLAssetType::AT_NONE }, // IT_SOUND
|
||||
{ LLAssetType::AT_CALLINGCARD, LLAssetType::AT_NONE }, // IT_CALLINGCARD
|
||||
{ LLAssetType::AT_LANDMARK, LLAssetType::AT_NONE }, // IT_LANDMARK
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_OBJECT, LLAssetType::AT_NONE }, // IT_OBJECT
|
||||
{ LLAssetType::AT_NOTECARD, LLAssetType::AT_NONE }, // IT_NOTECARD
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE }, // IT_CATEGORY
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE }, // IT_ROOT_CATEGORY
|
||||
{ LLAssetType::AT_LSL_TEXT, LLAssetType::AT_LSL_BYTECODE }, // IT_LSL
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_TEXTURE, LLAssetType::AT_NONE }, // IT_SNAPSHOT
|
||||
{ LLAssetType::AT_NONE, LLAssetType::AT_NONE },
|
||||
{ LLAssetType::AT_OBJECT, LLAssetType::AT_NONE }, // IT_ATTACHMENT
|
||||
{ LLAssetType::AT_CLOTHING, LLAssetType::AT_BODYPART }, // IT_WEARABLE
|
||||
{ LLAssetType::AT_ANIMATION, LLAssetType::AT_NONE }, // IT_ANIMATION
|
||||
{ LLAssetType::AT_GESTURE, LLAssetType::AT_NONE }, // IT_GESTURE
|
||||
};
|
||||
|
||||
// static
|
||||
const char* LLInventoryType::lookup(EType type)
|
||||
const std::string &LLInventoryType::lookup(EType type)
|
||||
{
|
||||
if((type >= 0) && (type < IT_COUNT))
|
||||
{
|
||||
return INVENTORY_TYPE_NAMES[S32(type)];
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
const InventoryEntry *entry = LLInventoryDictionary::getInstance()->lookup(type);
|
||||
if (!entry) return empty_string;
|
||||
return entry->mName;
|
||||
}
|
||||
|
||||
// static
|
||||
LLInventoryType::EType LLInventoryType::lookup(const std::string& name)
|
||||
{
|
||||
for(S32 i = 0; i < IT_COUNT; ++i)
|
||||
{
|
||||
if((INVENTORY_TYPE_NAMES[i])
|
||||
&& (name == INVENTORY_TYPE_NAMES[i]))
|
||||
{
|
||||
// match
|
||||
return (EType)i;
|
||||
}
|
||||
}
|
||||
return IT_NONE;
|
||||
return LLInventoryDictionary::getInstance()->lookup(name);
|
||||
}
|
||||
|
||||
// XUI:translate
|
||||
// translation from a type to a human readable form.
|
||||
// static
|
||||
const char* LLInventoryType::lookupHumanReadable(EType type)
|
||||
const std::string &LLInventoryType::lookupHumanReadable(EType type)
|
||||
{
|
||||
if((type >= 0) && (type < IT_COUNT))
|
||||
{
|
||||
return INVENTORY_TYPE_HUMAN_NAMES[S32(type)];
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
const InventoryEntry *entry = LLInventoryDictionary::getInstance()->lookup(type);
|
||||
if (!entry) return empty_string;
|
||||
return entry->mHumanName;
|
||||
}
|
||||
|
||||
// return the default inventory for the given asset type.
|
||||
@@ -233,21 +185,40 @@ LLInventoryType::EType LLInventoryType::defaultForAssetType(LLAssetType::EType a
|
||||
}
|
||||
}
|
||||
|
||||
bool inventory_and_asset_types_match(
|
||||
LLInventoryType::EType inventory_type,
|
||||
LLAssetType::EType asset_type)
|
||||
|
||||
// add any types that we don't want the user to be able to change permissions on.
|
||||
// static
|
||||
bool LLInventoryType::cannotRestrictPermissions(LLInventoryType::EType type)
|
||||
{
|
||||
bool rv = false;
|
||||
if((inventory_type >= 0) && (inventory_type < LLInventoryType::IT_COUNT))
|
||||
switch(type)
|
||||
{
|
||||
for(S32 i = 0; i < MAX_POSSIBLE_ASSET_TYPES; ++i)
|
||||
case IT_CALLINGCARD:
|
||||
case IT_LANDMARK:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool inventory_and_asset_types_match(LLInventoryType::EType inventory_type,
|
||||
LLAssetType::EType asset_type)
|
||||
{
|
||||
// Links can be of any inventory type.
|
||||
if (LLAssetType::lookupIsLinkType(asset_type))
|
||||
return true;
|
||||
|
||||
const InventoryEntry *entry = LLInventoryDictionary::getInstance()->lookup(inventory_type);
|
||||
if (!entry) return false;
|
||||
|
||||
for (InventoryEntry::asset_vec_t::const_iterator iter = entry->mAssetTypes.begin();
|
||||
iter != entry->mAssetTypes.end();
|
||||
iter++)
|
||||
{
|
||||
const LLAssetType::EType type = (*iter);
|
||||
if(type == asset_type)
|
||||
{
|
||||
if(INVENTORY_TO_ASSET_TYPE[inventory_type][i] == asset_type)
|
||||
{
|
||||
rv = true;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -74,14 +74,16 @@ public:
|
||||
|
||||
// machine transation between type and strings
|
||||
static EType lookup(const std::string& name);
|
||||
static const char* lookup(EType type);
|
||||
|
||||
static const std::string &lookup(EType type);
|
||||
// translation from a type to a human readable form.
|
||||
static const char* lookupHumanReadable(EType type);
|
||||
static const std::string &lookupHumanReadable(EType type);
|
||||
|
||||
// return the default inventory for the given asset type.
|
||||
static EType defaultForAssetType(LLAssetType::EType asset_type);
|
||||
|
||||
// true if this type cannot have restricted permissions.
|
||||
static bool cannotRestrictPermissions(EType type);
|
||||
|
||||
private:
|
||||
// don't instantiate or derive one of these objects
|
||||
LLInventoryType( void );
|
||||
@@ -91,8 +93,7 @@ private:
|
||||
// helper function which returns true if inventory type and asset type
|
||||
// are potentially compatible. For example, an attachment must be an
|
||||
// object, but a wearable can be a bodypart or clothing asset.
|
||||
bool inventory_and_asset_types_match(
|
||||
LLInventoryType::EType inventory_type,
|
||||
LLAssetType::EType asset_type);
|
||||
bool inventory_and_asset_types_match(LLInventoryType::EType inventory_type,
|
||||
LLAssetType::EType asset_type);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
std::pair<LLUUID, U64> LLLandmark::mLocalRegion;
|
||||
LLLandmark::region_map_t LLLandmark::mRegions;
|
||||
LLLandmark::region_callback_t LLLandmark::mRegionCallback;
|
||||
LLLandmark::region_callback_map_t LLLandmark::sRegionCallbackMap;
|
||||
|
||||
LLLandmark::LLLandmark() :
|
||||
mGlobalPositionKnown(false)
|
||||
@@ -177,7 +177,7 @@ void LLLandmark::requestRegionHandle(
|
||||
LLMessageSystem* msg,
|
||||
const LLHost& upstream_host,
|
||||
const LLUUID& region_id,
|
||||
LLRegionHandleCallback* callback)
|
||||
region_handle_callback_t callback)
|
||||
{
|
||||
if(region_id.isNull())
|
||||
{
|
||||
@@ -186,7 +186,7 @@ void LLLandmark::requestRegionHandle(
|
||||
if(callback)
|
||||
{
|
||||
const U64 U64_ZERO = 0;
|
||||
callback->dataReady(region_id, U64_ZERO);
|
||||
callback(region_id, U64_ZERO);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -196,7 +196,7 @@ void LLLandmark::requestRegionHandle(
|
||||
lldebugs << "requestRegionHandle: local" << llendl;
|
||||
if(callback)
|
||||
{
|
||||
callback->dataReady(region_id, mLocalRegion.second);
|
||||
callback(region_id, mLocalRegion.second);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -207,8 +207,8 @@ void LLLandmark::requestRegionHandle(
|
||||
lldebugs << "requestRegionHandle: upstream" << llendl;
|
||||
if(callback)
|
||||
{
|
||||
region_callback_t::value_type vt(region_id, callback);
|
||||
mRegionCallback.insert(vt);
|
||||
region_callback_map_t::value_type vt(region_id, callback);
|
||||
sRegionCallbackMap.insert(vt);
|
||||
}
|
||||
lldebugs << "Landmark requesting information about: "
|
||||
<< region_id << llendl;
|
||||
@@ -221,7 +221,7 @@ void LLLandmark::requestRegionHandle(
|
||||
{
|
||||
// we have the answer locally - just call the callack.
|
||||
lldebugs << "requestRegionHandle: ready" << llendl;
|
||||
callback->dataReady(region_id, (*it).second.mRegionHandle);
|
||||
callback(region_id, (*it).second.mRegionHandle);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -259,11 +259,11 @@ void LLLandmark::processRegionIDAndHandle(LLMessageSystem* msg, void**)
|
||||
#endif
|
||||
|
||||
// make all the callbacks here.
|
||||
region_callback_t::iterator it;
|
||||
while((it = mRegionCallback.find(region_id)) != mRegionCallback.end())
|
||||
region_callback_map_t::iterator it;
|
||||
while((it = sRegionCallbackMap.find(region_id)) != sRegionCallbackMap.end())
|
||||
{
|
||||
(*it).second->dataReady(region_id, info.mRegionHandle);
|
||||
mRegionCallback.erase(it);
|
||||
(*it).second(region_id, info.mRegionHandle);
|
||||
sRegionCallbackMap.erase(it);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#define LL_LLLANDMARK_H
|
||||
|
||||
#include <map>
|
||||
#include <boost/function.hpp>
|
||||
#include "llframetimer.h"
|
||||
#include "lluuid.h"
|
||||
#include "v3dmath.h"
|
||||
@@ -42,24 +43,12 @@
|
||||
class LLMessageSystem;
|
||||
class LLHost;
|
||||
|
||||
// virutal base class used for calling back interested parties when a
|
||||
// region handle comes back.
|
||||
class LLRegionHandleCallback
|
||||
{
|
||||
public:
|
||||
LLRegionHandleCallback() {}
|
||||
virtual ~LLRegionHandleCallback() {}
|
||||
virtual bool dataReady(
|
||||
const LLUUID& region_id,
|
||||
const U64& region_handle)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class LLLandmark
|
||||
{
|
||||
public:
|
||||
// for calling back interested parties when a region handle comes back.
|
||||
typedef boost::function<void(const LLUUID& region_id, const U64& region_handle)> region_handle_callback_t;
|
||||
|
||||
~LLLandmark() {}
|
||||
|
||||
// returns true if the position is known.
|
||||
@@ -90,7 +79,7 @@ public:
|
||||
LLMessageSystem* msg,
|
||||
const LLHost& upstream_host,
|
||||
const LLUUID& region_id,
|
||||
LLRegionHandleCallback* callback);
|
||||
region_handle_callback_t callback);
|
||||
|
||||
// Call this method to create a lookup for this region. This
|
||||
// simplifies a lot of the code.
|
||||
@@ -118,8 +107,8 @@ private:
|
||||
static std::pair<LLUUID, U64> mLocalRegion;
|
||||
typedef std::map<LLUUID, CacheInfo> region_map_t;
|
||||
static region_map_t mRegions;
|
||||
typedef std::multimap<LLUUID, LLRegionHandleCallback*> region_callback_t;
|
||||
static region_callback_t mRegionCallback;
|
||||
typedef std::multimap<LLUUID, region_handle_callback_t> region_callback_map_t;
|
||||
static region_callback_map_t sRegionCallbackMap;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
#include "llstreamtools.h"
|
||||
|
||||
LLNotecard::LLNotecard(S32 max_text)
|
||||
: mMaxText(max_text)
|
||||
: mMaxText(max_text),
|
||||
mVersion(0),
|
||||
mEmbeddedVersion(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -203,7 +205,7 @@ bool LLNotecard::importStream(std::istream& str)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(text_len < 0 || text_len > mMaxText)
|
||||
if(text_len > mMaxText || text_len < 0)
|
||||
{
|
||||
llwarns << "Invalid Linden text length: " << text_len << llendl;
|
||||
return FALSE;
|
||||
|
||||
@@ -79,23 +79,25 @@ static const std::string PARCEL_CATEGORY_STRING[LLParcel::C_COUNT] =
|
||||
"shopping",
|
||||
"stage",
|
||||
"other",
|
||||
"rental"
|
||||
};
|
||||
static const std::string PARCEL_CATEGORY_UI_STRING[LLParcel::C_COUNT + 1] =
|
||||
{
|
||||
"None",
|
||||
"Linden Location",
|
||||
"Adult",
|
||||
"Arts & Culture",
|
||||
"Arts and Culture",
|
||||
"Business",
|
||||
"Educational",
|
||||
"Gaming",
|
||||
"Hangout",
|
||||
"Newcomer Friendly",
|
||||
"Parks & Nature",
|
||||
"Parks and Nature",
|
||||
"Residential",
|
||||
"Shopping",
|
||||
"Stage",
|
||||
"Other",
|
||||
"Rental",
|
||||
"Any", // valid string for parcel searches
|
||||
};
|
||||
|
||||
@@ -690,8 +692,8 @@ void LLParcel::packMessage(LLSD& msg)
|
||||
msg["auto_scale"] = getMediaAutoScale();
|
||||
msg["media_loop"] = getMediaLoop();
|
||||
msg["media_current_url"] = getMediaCurrentURL();
|
||||
msg["obscure_media"] = FALSE; // OBSOLETE - no longer used
|
||||
msg["obscure_music"] = FALSE; // OBSOLETE - no longer used
|
||||
msg["obscure_media"] = false; // OBSOLETE - no longer used
|
||||
msg["obscure_music"] = false; // OBSOLETE - no longer used
|
||||
msg["media_id"] = getMediaID();
|
||||
msg["media_allow_navigate"] = getMediaAllowNavigate();
|
||||
msg["media_prevent_camera_zoom"] = getMediaPreventCameraZoom();
|
||||
|
||||
@@ -170,6 +170,7 @@ public:
|
||||
C_SHOPPING,
|
||||
C_STAGE,
|
||||
C_OTHER,
|
||||
C_RENTAL,
|
||||
C_COUNT,
|
||||
C_ANY = -1 // only useful in queries
|
||||
};
|
||||
@@ -534,7 +535,7 @@ public:
|
||||
|
||||
static bool isAgentBlockedFromParcel(LLParcel* parcelp,
|
||||
const LLUUID& agent_id,
|
||||
const std::vector<LLUUID>& group_ids,
|
||||
const uuid_vec_t& group_ids,
|
||||
const BOOL is_agent_identified,
|
||||
const BOOL is_agent_transacted,
|
||||
const BOOL is_agent_ageverified);
|
||||
|
||||
@@ -83,6 +83,17 @@ void LLPermissions::initMasks(PermissionMask base, PermissionMask owner,
|
||||
fix();
|
||||
}
|
||||
|
||||
// ! BACKWARDS COMPATIBILITY ! Override masks for inventory types that
|
||||
// no longer can have restricted permissions. This takes care of previous
|
||||
// version landmarks that could have had no copy/mod/transfer bits set.
|
||||
void LLPermissions::initMasks(LLInventoryType::EType type)
|
||||
{
|
||||
if (LLInventoryType::cannotRestrictPermissions(type))
|
||||
{
|
||||
initMasks(PERM_ALL, PERM_ALL, PERM_ALL, PERM_ALL, PERM_ALL);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL LLPermissions::getOwnership(LLUUID& owner_id, BOOL& is_group_owned) const
|
||||
{
|
||||
if(mOwner.notNull())
|
||||
@@ -277,6 +288,17 @@ BOOL LLPermissions::setOwnerAndGroup(
|
||||
return allowed;
|
||||
}
|
||||
|
||||
//Fix for DEV-33917, last owner isn't used much and has little impact on
|
||||
//permissions so it's reasonably safe to do this, however, for now,
|
||||
//limiting the functionality of this routine to objects which are
|
||||
//group owned.
|
||||
void LLPermissions::setLastOwner(const LLUUID& last_owner)
|
||||
{
|
||||
if (isGroupOwned())
|
||||
mLastOwner = last_owner;
|
||||
}
|
||||
|
||||
|
||||
// only call this if you know what you're doing
|
||||
// there are usually perm-bit consequences when the
|
||||
// ownerhsip changes
|
||||
@@ -457,7 +479,7 @@ BOOL LLPermissions::setNextOwnerBits(const LLUUID& agent, const LLUUID& group, B
|
||||
return ownership;
|
||||
}
|
||||
|
||||
BOOL LLPermissions::allowOperationBy(PermissionBit op, const LLUUID& requester, const LLUUID& group) const
|
||||
bool LLPermissions::allowOperationBy(PermissionBit op, const LLUUID& requester, const LLUUID& group) const
|
||||
{
|
||||
if(requester.isNull())
|
||||
{
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "lluuid.h"
|
||||
#include "llxmlnode.h"
|
||||
#include "reflective.h"
|
||||
#include "llinventorytype.h"
|
||||
|
||||
// prototypes
|
||||
class LLMessageSystem;
|
||||
@@ -129,6 +130,8 @@ public:
|
||||
void initMasks(PermissionMask base, PermissionMask owner,
|
||||
PermissionMask everyone, PermissionMask group,
|
||||
PermissionMask next);
|
||||
// adjust permissions based on inventory type.
|
||||
void initMasks(LLInventoryType::EType type);
|
||||
|
||||
//
|
||||
// ACCESSORS
|
||||
@@ -229,6 +232,9 @@ public:
|
||||
// ownerhsip changes
|
||||
void yesReallySetOwner(const LLUUID& owner, bool group_owned);
|
||||
|
||||
// Last owner doesn't have much in the way of permissions so it's
|
||||
//not too dangerous to do this.
|
||||
void setLastOwner(const LLUUID& last_owner);
|
||||
// saves last owner, sets owner to uuid null, sets group
|
||||
// owned. group_id must be the group of the object (that's who it
|
||||
// is being deeded to) and the object must be group
|
||||
@@ -249,7 +255,11 @@ public:
|
||||
BOOL setGroupBits( const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
|
||||
BOOL setEveryoneBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
|
||||
BOOL setNextOwnerBits(const LLUUID& agent, const LLUUID& group, BOOL set, PermissionMask bits);
|
||||
|
||||
|
||||
// This is currently only used in the Viewer to handle calling cards
|
||||
// where the creator is actually used to store the target. Use with care.
|
||||
void setCreator(const LLUUID& creator) { mCreator = creator; }
|
||||
|
||||
//
|
||||
// METHODS
|
||||
//
|
||||
@@ -261,18 +271,18 @@ public:
|
||||
// They also return true if the object isn't owned, or the
|
||||
// requesting agent is a system agent. See llpermissionsflags.h
|
||||
// for bits.
|
||||
BOOL allowOperationBy(PermissionBit op, const LLUUID& agent, const LLUUID& group = LLUUID::null) const;
|
||||
bool allowOperationBy(PermissionBit op, const LLUUID& agent, const LLUUID& group = LLUUID::null) const;
|
||||
|
||||
inline BOOL allowModifyBy(const LLUUID &agent_id) const;
|
||||
inline BOOL allowCopyBy(const LLUUID& agent_id) const;
|
||||
inline BOOL allowMoveBy(const LLUUID& agent_id) const;
|
||||
inline BOOL allowModifyBy(const LLUUID &agent_id, const LLUUID& group) const;
|
||||
inline BOOL allowCopyBy(const LLUUID& agent_id, const LLUUID& group) const;
|
||||
inline BOOL allowMoveBy(const LLUUID &agent_id, const LLUUID &group) const;
|
||||
inline bool allowModifyBy(const LLUUID &agent_id) const;
|
||||
inline bool allowCopyBy(const LLUUID& agent_id) const;
|
||||
inline bool allowMoveBy(const LLUUID& agent_id) const;
|
||||
inline bool allowModifyBy(const LLUUID &agent_id, const LLUUID& group) const;
|
||||
inline bool allowCopyBy(const LLUUID& agent_id, const LLUUID& group) const;
|
||||
inline bool allowMoveBy(const LLUUID &agent_id, const LLUUID &group) const;
|
||||
|
||||
// This somewhat specialized function is meant for testing if the
|
||||
// current owner is allowed to transfer to the specified agent id.
|
||||
inline BOOL allowTransferTo(const LLUUID &agent_id) const;
|
||||
inline bool allowTransferTo(const LLUUID &agent_id) const;
|
||||
|
||||
//
|
||||
// DEPRECATED.
|
||||
@@ -328,38 +338,38 @@ public:
|
||||
};
|
||||
|
||||
// Inlines
|
||||
BOOL LLPermissions::allowModifyBy(const LLUUID& agent, const LLUUID& group) const
|
||||
bool LLPermissions::allowModifyBy(const LLUUID& agent, const LLUUID& group) const
|
||||
{
|
||||
return allowOperationBy(PERM_MODIFY, agent, group);
|
||||
}
|
||||
|
||||
BOOL LLPermissions::allowCopyBy(const LLUUID& agent, const LLUUID& group) const
|
||||
bool LLPermissions::allowCopyBy(const LLUUID& agent, const LLUUID& group) const
|
||||
{
|
||||
return allowOperationBy(PERM_COPY, agent, group);
|
||||
}
|
||||
|
||||
|
||||
BOOL LLPermissions::allowMoveBy(const LLUUID& agent, const LLUUID& group) const
|
||||
bool LLPermissions::allowMoveBy(const LLUUID& agent, const LLUUID& group) const
|
||||
{
|
||||
return allowOperationBy(PERM_MOVE, agent, group);
|
||||
}
|
||||
|
||||
BOOL LLPermissions::allowModifyBy(const LLUUID& agent) const
|
||||
bool LLPermissions::allowModifyBy(const LLUUID& agent) const
|
||||
{
|
||||
return allowOperationBy(PERM_MODIFY, agent, LLUUID::null);
|
||||
}
|
||||
|
||||
BOOL LLPermissions::allowCopyBy(const LLUUID& agent) const
|
||||
bool LLPermissions::allowCopyBy(const LLUUID& agent) const
|
||||
{
|
||||
return allowOperationBy(PERM_COPY, agent, LLUUID::null);
|
||||
}
|
||||
|
||||
BOOL LLPermissions::allowMoveBy(const LLUUID& agent) const
|
||||
bool LLPermissions::allowMoveBy(const LLUUID& agent) const
|
||||
{
|
||||
return allowOperationBy(PERM_MOVE, agent, LLUUID::null);
|
||||
}
|
||||
|
||||
BOOL LLPermissions::allowTransferTo(const LLUUID &agent_id) const
|
||||
bool LLPermissions::allowTransferTo(const LLUUID &agent_id) const
|
||||
{
|
||||
if (mIsGroupOwned)
|
||||
{
|
||||
|
||||
@@ -111,7 +111,7 @@ LLSD LLSaleInfo::asLLSD() const
|
||||
return sd;
|
||||
}
|
||||
|
||||
bool LLSaleInfo::fromLLSD(LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
|
||||
bool LLSaleInfo::fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
|
||||
{
|
||||
const char *w;
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
BOOL exportLegacyStream(std::ostream& output_stream) const;
|
||||
LLSD asLLSD() const;
|
||||
operator LLSD() const { return asLLSD(); }
|
||||
bool fromLLSD(LLSD& sd, BOOL& has_perm_mask, U32& perm_mask);
|
||||
bool fromLLSD(const LLSD& sd, BOOL& has_perm_mask, U32& perm_mask);
|
||||
BOOL importLegacyStream(std::istream& input_stream, BOOL& has_perm_mask, U32& perm_mask);
|
||||
|
||||
LLXMLNode *exportFileXML() const;
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
// Money transaction failure codes
|
||||
const U8 TRANS_FAIL_SIMULATOR_TIMEOUT = 1;
|
||||
const U8 TRANS_FAIL_DATASERVER_TIMEOUT = 2;
|
||||
const U8 TRANS_FAIL_APPLICATION = 3;
|
||||
|
||||
// Codes up to 999 for error conditions
|
||||
const S32 TRANS_NULL = 0;
|
||||
@@ -68,6 +69,11 @@ const S32 TRANS_PARCEL_DIR_FEE = 2003;
|
||||
const S32 TRANS_GROUP_TAX = 2004; // Taxes incurred as part of group membership
|
||||
const S32 TRANS_CLASSIFIED_RENEW = 2005;
|
||||
|
||||
// Codes 2100-2999 reserved for recurring billing services
|
||||
// New codes can be created through an admin interface so may not
|
||||
// automatically end up in the list below :-(
|
||||
// So make sure you check the transaction_description table
|
||||
const S32 TRANS_RECURRING_GENERIC = 2100;
|
||||
// Codes 3000-3999 reserved for inventory transactions
|
||||
const S32 TRANS_GIVE_INVENTORY = 3000;
|
||||
|
||||
@@ -83,6 +89,12 @@ const S32 TRANS_DWELL_BONUS = 5007;
|
||||
const S32 TRANS_PAY_OBJECT = 5008;
|
||||
const S32 TRANS_OBJECT_PAYS = 5009;
|
||||
|
||||
// Codes 5100-5999 reserved for recurring billing transfers between users
|
||||
// New codes can be created through an admin interface so may not
|
||||
// automatically end up in the list below :-(
|
||||
// So make sure you check the transaction_description table
|
||||
const S32 TRANS_RECURRING_GENERIC_USER = 5100;
|
||||
|
||||
// Codes 6000-6999 reserved for group transactions
|
||||
//const S32 TRANS_GROUP_JOIN = 6000; //reserved for future use
|
||||
const S32 TRANS_GROUP_LAND_DEED = 6001;
|
||||
|
||||
@@ -562,14 +562,13 @@ void LLAvatarNameCache::idle()
|
||||
bool LLAvatarNameCache::isRequestPending(const LLUUID& agent_id)
|
||||
{
|
||||
const F64 PENDING_TIMEOUT_SECS = 5.0 * 60.0;
|
||||
F64 now = LLFrameTimer::getTotalSeconds();
|
||||
F64 expire_time = now - PENDING_TIMEOUT_SECS;
|
||||
|
||||
pending_queue_t::const_iterator it = sPendingQueue.find(agent_id);
|
||||
if (it != sPendingQueue.end())
|
||||
{
|
||||
bool request_expired = (it->second < expire_time);
|
||||
return !request_expired;
|
||||
// in the list of requests in flight, retry if too old
|
||||
F64 expire_time = LLFrameTimer::getTotalSeconds() - PENDING_TIMEOUT_SECS;
|
||||
return it->second > expire_time;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -578,14 +577,12 @@ void LLAvatarNameCache::eraseExpired()
|
||||
{
|
||||
F64 now = LLFrameTimer::getTotalSeconds();
|
||||
cache_t::iterator it = sCache.begin();
|
||||
while (it != sCache.end())
|
||||
for (cache_t::iterator it = sCache.begin(); it != sCache.end(); ++it)
|
||||
{
|
||||
cache_t::iterator cur = it;
|
||||
++it;
|
||||
const LLAvatarName& av_name = cur->second;
|
||||
const LLAvatarName& av_name = it->second;
|
||||
if (av_name.mExpires < now)
|
||||
{
|
||||
sCache.erase(cur);
|
||||
sCache.erase(it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ protected:
|
||||
|
||||
void requestObjectInventories();
|
||||
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
|
||||
InventoryObjectList* inv,
|
||||
LLInventoryObject::object_list_t* inv,
|
||||
S32 serial_num,
|
||||
void* data);
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ protected:
|
||||
|
||||
void requestObjectInventories();
|
||||
/*virtual*/ void inventoryChanged(LLViewerObject* obj,
|
||||
InventoryObjectList* inv,
|
||||
LLInventoryObject::object_list_t* inv,
|
||||
S32 serial_num,
|
||||
void* data);
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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>
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 )
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)) ) ||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -653,7 +653,7 @@ Only large parcels can be listed in search.
|
||||
Adult
|
||||
</combo_item>
|
||||
<combo_item name="Arts&Culture" value="arts">
|
||||
Arts & 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&Nature" value="park">
|
||||
Parks & 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&Culture" value="arts">
|
||||
Arts & 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&Nature" value="park">
|
||||
Parks & 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"
|
||||
|
||||
@@ -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&Culture" value="arts">
|
||||
Arts & 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&Nature" value="park">
|
||||
Parks & 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&Culture" value="arts">
|
||||
Arts & 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&Nature" value="park">
|
||||
Parks & 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"
|
||||
|
||||
@@ -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&Culture" value="arts">
|
||||
Arts & 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&Nature" value="park">
|
||||
Parks & 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&Culture" value="arts">
|
||||
Arts & 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&Nature" value="park">
|
||||
Parks & 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"
|
||||
|
||||
@@ -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&Culture" value="arts">
|
||||
Arts & 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&Nature" value="park">
|
||||
Parks & 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&Culture" value="arts">
|
||||
Arts & 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&Nature" value="park">
|
||||
Parks & 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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user