summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory')
-rw-r--r--[-rwxr-xr-x]indra/llinventory/CMakeLists.txt0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llcategory.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llcategory.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/lleconomy.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/lleconomy.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llfoldertype.cpp4
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llfoldertype.h4
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llinventory.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llinventory.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llinventorydefines.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llinventorydefines.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llinventorytype.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llinventorytype.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/lllandmark.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/lllandmark.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llnotecard.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llnotecard.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llparcel.cpp88
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llparcel.h25
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llparcelflags.h6
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llpermissions.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llpermissions.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llpermissionsflags.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llsaleinfo.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/llsaleinfo.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/lltransactionflags.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/lltransactionflags.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/lltransactiontypes.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/lluserrelations.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/lluserrelations.h0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/tests/inventorymisc_test.cpp0
-rw-r--r--[-rwxr-xr-x]indra/llinventory/tests/llparcel_test.cpp0
32 files changed, 115 insertions, 12 deletions
diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt
index 0a1f93bd80..0a1f93bd80 100755..100644
--- a/indra/llinventory/CMakeLists.txt
+++ b/indra/llinventory/CMakeLists.txt
diff --git a/indra/llinventory/llcategory.cpp b/indra/llinventory/llcategory.cpp
index 97a496845b..97a496845b 100755..100644
--- a/indra/llinventory/llcategory.cpp
+++ b/indra/llinventory/llcategory.cpp
diff --git a/indra/llinventory/llcategory.h b/indra/llinventory/llcategory.h
index 390a8a1f1e..390a8a1f1e 100755..100644
--- a/indra/llinventory/llcategory.h
+++ b/indra/llinventory/llcategory.h
diff --git a/indra/llinventory/lleconomy.cpp b/indra/llinventory/lleconomy.cpp
index e10402196f..e10402196f 100755..100644
--- a/indra/llinventory/lleconomy.cpp
+++ b/indra/llinventory/lleconomy.cpp
diff --git a/indra/llinventory/lleconomy.h b/indra/llinventory/lleconomy.h
index 47fcf688a2..47fcf688a2 100755..100644
--- a/indra/llinventory/lleconomy.h
+++ b/indra/llinventory/lleconomy.h
diff --git a/indra/llinventory/llfoldertype.cpp b/indra/llinventory/llfoldertype.cpp
index 23bf6da1f9..86aca77de8 100755..100644
--- a/indra/llinventory/llfoldertype.cpp
+++ b/indra/llinventory/llfoldertype.cpp
@@ -96,6 +96,10 @@ LLFolderDictionary::LLFolderDictionary()
addEntry(LLFolderType::FT_OUTBOX, new FolderEntry("outbox", TRUE));
addEntry(LLFolderType::FT_BASIC_ROOT, new FolderEntry("basic_rt", TRUE));
+
+ addEntry(LLFolderType::FT_MARKETPLACE_LISTINGS, new FolderEntry("merchant", FALSE));
+ addEntry(LLFolderType::FT_MARKETPLACE_STOCK, new FolderEntry("stock", FALSE));
+ addEntry(LLFolderType::FT_MARKETPLACE_VERSION, new FolderEntry("version", FALSE));
addEntry(LLFolderType::FT_NONE, new FolderEntry("-1", FALSE));
};
diff --git a/indra/llinventory/llfoldertype.h b/indra/llinventory/llfoldertype.h
index a0c847914f..515bb05a3f 100755..100644
--- a/indra/llinventory/llfoldertype.h
+++ b/indra/llinventory/llfoldertype.h
@@ -87,6 +87,10 @@ public:
FT_BASIC_ROOT = 52,
+ FT_MARKETPLACE_LISTINGS = 53,
+ FT_MARKETPLACE_STOCK = 54,
+ FT_MARKETPLACE_VERSION = 55, // Note: We actually *never* create folders with that type. This is used for icon override only.
+
FT_COUNT,
FT_NONE = -1
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 11647c5518..11647c5518 100755..100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index 70b200e139..70b200e139 100755..100644
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
diff --git a/indra/llinventory/llinventorydefines.cpp b/indra/llinventory/llinventorydefines.cpp
index 575331a263..575331a263 100755..100644
--- a/indra/llinventory/llinventorydefines.cpp
+++ b/indra/llinventory/llinventorydefines.cpp
diff --git a/indra/llinventory/llinventorydefines.h b/indra/llinventory/llinventorydefines.h
index 3881fb1fd7..3881fb1fd7 100755..100644
--- a/indra/llinventory/llinventorydefines.h
+++ b/indra/llinventory/llinventorydefines.h
diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp
index 8807b36117..8807b36117 100755..100644
--- a/indra/llinventory/llinventorytype.cpp
+++ b/indra/llinventory/llinventorytype.cpp
diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h
index fc3c78cf50..fc3c78cf50 100755..100644
--- a/indra/llinventory/llinventorytype.h
+++ b/indra/llinventory/llinventorytype.h
diff --git a/indra/llinventory/lllandmark.cpp b/indra/llinventory/lllandmark.cpp
index 4c6075d6b5..4c6075d6b5 100755..100644
--- a/indra/llinventory/lllandmark.cpp
+++ b/indra/llinventory/lllandmark.cpp
diff --git a/indra/llinventory/lllandmark.h b/indra/llinventory/lllandmark.h
index 92923ea6fb..92923ea6fb 100755..100644
--- a/indra/llinventory/lllandmark.h
+++ b/indra/llinventory/lllandmark.h
diff --git a/indra/llinventory/llnotecard.cpp b/indra/llinventory/llnotecard.cpp
index 908c647498..908c647498 100755..100644
--- a/indra/llinventory/llnotecard.cpp
+++ b/indra/llinventory/llnotecard.cpp
diff --git a/indra/llinventory/llnotecard.h b/indra/llinventory/llnotecard.h
index d64a821b78..d64a821b78 100755..100644
--- a/indra/llinventory/llnotecard.h
+++ b/indra/llinventory/llnotecard.h
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index b24e14c72b..0908613c10 100755..100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -40,6 +40,8 @@
#include "llsdutil_math.h"
#include "message.h"
#include "u64.h"
+#include "llregionflags.h"
+#include <boost/range/adaptor/map.hpp>
static const F32 SOME_BIG_NUMBER = 1000.0f;
static const F32 SOME_BIG_NEG_NUMBER = -1000.0f;
@@ -627,8 +629,8 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
void LLParcel::packAccessEntries(LLMessageSystem* msg,
const std::map<LLUUID,LLAccessEntry>& list)
{
- access_map_const_iterator cit = list.begin();
- access_map_const_iterator end = list.end();
+ LLAccessEntry::map::const_iterator cit = list.begin();
+ LLAccessEntry::map::const_iterator end = list.end();
if (cit == end)
{
@@ -679,9 +681,28 @@ void LLParcel::unpackAccessEntries(LLMessageSystem* msg,
}
+void LLParcel::unpackExperienceEntries( LLMessageSystem* msg, U32 type )
+{
+ LLUUID id;
+
+ S32 i;
+ S32 count = msg->getNumberOfBlocksFast(_PREHASH_List);
+ for (i = 0; i < count; i++)
+ {
+ msg->getUUIDFast(_PREHASH_List, _PREHASH_ID, id, i);
+
+ if (id.notNull())
+ {
+ mExperienceKeys[id]=type;
+ }
+ }
+}
+
+
+
void LLParcel::expirePasses(S32 now)
{
- access_map_iterator itor = mAccessList.begin();
+ LLAccessEntry::map::iterator itor = mAccessList.begin();
while (itor != mAccessList.end())
{
const LLAccessEntry& entry = (*itor).second;
@@ -771,7 +792,7 @@ BOOL LLParcel::addToAccessList(const LLUUID& agent_id, S32 time)
// Can't add owner to these lists
return FALSE;
}
- access_map_iterator itor = mAccessList.begin();
+ LLAccessEntry::map::iterator itor = mAccessList.begin();
while (itor != mAccessList.end())
{
const LLAccessEntry& entry = (*itor).second;
@@ -814,7 +835,7 @@ BOOL LLParcel::addToBanList(const LLUUID& agent_id, S32 time)
return FALSE;
}
- access_map_iterator itor = mBanList.begin();
+ LLAccessEntry::map::iterator itor = mBanList.begin();
while (itor != mBanList.end())
{
const LLAccessEntry& entry = (*itor).second;
@@ -848,7 +869,7 @@ BOOL remove_from_access_array(std::map<LLUUID,LLAccessEntry>* list,
const LLUUID& agent_id)
{
BOOL removed = FALSE;
- access_map_iterator itor = list->begin();
+ LLAccessEntry::map::iterator itor = list->begin();
while (itor != list->end())
{
const LLAccessEntry& entry = (*itor).second;
@@ -1191,3 +1212,58 @@ LLParcel::ECategory category_ui_string_to_category(const std::string& s)
// is a distinct option from "None" and "Other"
return LLParcel::C_ANY;
}
+
+LLAccessEntry::map LLParcel::getExperienceKeysByType( U32 type ) const
+{
+ LLAccessEntry::map access;
+ LLAccessEntry entry;
+ xp_type_map_t::const_iterator it = mExperienceKeys.begin();
+ for(/**/; it != mExperienceKeys.end(); ++it)
+ {
+ if(it->second == type)
+ {
+ entry.mID = it->first;
+ access[entry.mID] = entry;
+ }
+ }
+ return access;
+}
+
+void LLParcel::clearExperienceKeysByType( U32 type )
+{
+ xp_type_map_t::iterator it = mExperienceKeys.begin();
+ while(it != mExperienceKeys.end())
+ {
+ if(it->second == type)
+ {
+ mExperienceKeys.erase(it++);
+ }
+ else
+ {
+ ++it;
+ }
+ }
+}
+
+void LLParcel::setExperienceKeyType( const LLUUID& experience_key, U32 type )
+{
+ if(type == EXPERIENCE_KEY_TYPE_NONE)
+ {
+ mExperienceKeys.erase(experience_key);
+ }
+ else
+ {
+ if(countExperienceKeyType(type) < PARCEL_MAX_EXPERIENCE_LIST)
+ {
+ mExperienceKeys[experience_key] = type;
+ }
+ }
+}
+
+U32 LLParcel::countExperienceKeyType( U32 type )
+{
+ return std::count_if(
+ boost::begin(mExperienceKeys | boost::adaptors::map_values),
+ boost::end(mExperienceKeys | boost::adaptors::map_values),
+ std::bind2nd(std::equal_to<U32>(), type));
+}
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index c4363a48df..e68331b99a 100755..100644
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -53,6 +53,9 @@ const S32 PARCEL_MAX_ACCESS_LIST = 300;
//for access/ban lists.
const F32 PARCEL_MAX_ENTRIES_PER_PACKET = 48.f;
+// Maximum number of experiences
+const S32 PARCEL_MAX_EXPERIENCE_LIST = 24;
+
// Weekly charge for listing a parcel in the directory
const S32 PARCEL_DIRECTORY_FEE = 30;
@@ -130,9 +133,11 @@ class LLSD;
class LLAccessEntry
{
public:
+
+ typedef std::map<LLUUID,LLAccessEntry> map;
+
LLAccessEntry()
- : mID(),
- mTime(0),
+ : mTime(0),
mFlags(0)
{}
@@ -141,8 +146,6 @@ public:
U32 mFlags; // Not used - currently should always be zero
};
-typedef std::map<LLUUID,LLAccessEntry>::iterator access_map_iterator;
-typedef std::map<LLUUID,LLAccessEntry>::const_iterator access_map_const_iterator;
class LLParcel
{
@@ -320,6 +323,9 @@ public:
void unpackAccessEntries(LLMessageSystem* msg,
std::map<LLUUID,LLAccessEntry>* list);
+ void unpackExperienceEntries(LLMessageSystem* msg, U32 type);
+
+
void setAABBMin(const LLVector3& min) { mAABBMin = min; }
void setAABBMax(const LLVector3& max) { mAABBMax = max; }
@@ -665,6 +671,17 @@ public:
std::map<LLUUID,LLAccessEntry> mTempBanList;
std::map<LLUUID,LLAccessEntry> mTempAccessList;
+ typedef std::map<LLUUID, U32> xp_type_map_t;
+
+ void setExperienceKeyType(const LLUUID& experience_key, U32 type);
+ U32 countExperienceKeyType(U32 type);
+ U32 getExperienceKeyType(const LLUUID& experience_key)const;
+ LLAccessEntry::map getExperienceKeysByType(U32 type)const;
+ void clearExperienceKeysByType(U32 type);
+
+private:
+ xp_type_map_t mExperienceKeys;
+
};
diff --git a/indra/llinventory/llparcelflags.h b/indra/llinventory/llparcelflags.h
index b1a917df73..25b27a281a 100755..100644
--- a/indra/llinventory/llparcelflags.h
+++ b/indra/llinventory/llparcelflags.h
@@ -90,8 +90,10 @@ const U32 PF_DEFAULT = PF_ALLOW_FLY
| PF_USE_ESTATE_VOICE_CHAN;
// Access list flags
-const U32 AL_ACCESS = (1 << 0);
-const U32 AL_BAN = (1 << 1);
+const U32 AL_ACCESS = (1 << 0);
+const U32 AL_BAN = (1 << 1);
+const U32 AL_ALLOW_EXPERIENCE = (1 << 3);
+const U32 AL_BLOCK_EXPERIENCE = (1 << 4);
//const U32 AL_RENTER = (1 << 2);
// Block access return values. BA_ALLOWED is the only success case
diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp
index e79b753514..e79b753514 100755..100644
--- a/indra/llinventory/llpermissions.cpp
+++ b/indra/llinventory/llpermissions.cpp
diff --git a/indra/llinventory/llpermissions.h b/indra/llinventory/llpermissions.h
index 89c66f6ebd..89c66f6ebd 100755..100644
--- a/indra/llinventory/llpermissions.h
+++ b/indra/llinventory/llpermissions.h
diff --git a/indra/llinventory/llpermissionsflags.h b/indra/llinventory/llpermissionsflags.h
index 9ecf465c8c..9ecf465c8c 100755..100644
--- a/indra/llinventory/llpermissionsflags.h
+++ b/indra/llinventory/llpermissionsflags.h
diff --git a/indra/llinventory/llsaleinfo.cpp b/indra/llinventory/llsaleinfo.cpp
index 63e34d188e..63e34d188e 100755..100644
--- a/indra/llinventory/llsaleinfo.cpp
+++ b/indra/llinventory/llsaleinfo.cpp
diff --git a/indra/llinventory/llsaleinfo.h b/indra/llinventory/llsaleinfo.h
index 4e98ccf6ff..4e98ccf6ff 100755..100644
--- a/indra/llinventory/llsaleinfo.h
+++ b/indra/llinventory/llsaleinfo.h
diff --git a/indra/llinventory/lltransactionflags.cpp b/indra/llinventory/lltransactionflags.cpp
index e21f29df41..e21f29df41 100755..100644
--- a/indra/llinventory/lltransactionflags.cpp
+++ b/indra/llinventory/lltransactionflags.cpp
diff --git a/indra/llinventory/lltransactionflags.h b/indra/llinventory/lltransactionflags.h
index 8227f3bcc2..8227f3bcc2 100755..100644
--- a/indra/llinventory/lltransactionflags.h
+++ b/indra/llinventory/lltransactionflags.h
diff --git a/indra/llinventory/lltransactiontypes.h b/indra/llinventory/lltransactiontypes.h
index 6f8d005f1b..6f8d005f1b 100755..100644
--- a/indra/llinventory/lltransactiontypes.h
+++ b/indra/llinventory/lltransactiontypes.h
diff --git a/indra/llinventory/lluserrelations.cpp b/indra/llinventory/lluserrelations.cpp
index b938dfeb7b..b938dfeb7b 100755..100644
--- a/indra/llinventory/lluserrelations.cpp
+++ b/indra/llinventory/lluserrelations.cpp
diff --git a/indra/llinventory/lluserrelations.h b/indra/llinventory/lluserrelations.h
index 9fbf36f0e2..9fbf36f0e2 100755..100644
--- a/indra/llinventory/lluserrelations.h
+++ b/indra/llinventory/lluserrelations.h
diff --git a/indra/llinventory/tests/inventorymisc_test.cpp b/indra/llinventory/tests/inventorymisc_test.cpp
index 7b15552f24..7b15552f24 100755..100644
--- a/indra/llinventory/tests/inventorymisc_test.cpp
+++ b/indra/llinventory/tests/inventorymisc_test.cpp
diff --git a/indra/llinventory/tests/llparcel_test.cpp b/indra/llinventory/tests/llparcel_test.cpp
index f2e4b03ff7..f2e4b03ff7 100755..100644
--- a/indra/llinventory/tests/llparcel_test.cpp
+++ b/indra/llinventory/tests/llparcel_test.cpp