aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llinventory
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/llinventory
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/llinventory')
-rw-r--r--linden/indra/llinventory/CMakeLists.txt56
-rw-r--r--linden/indra/llinventory/files.lst11
-rw-r--r--linden/indra/llinventory/llinventory.cpp228
-rw-r--r--linden/indra/llinventory/llinventory.h26
-rw-r--r--linden/indra/llinventory/llinventory.vcproj245
-rw-r--r--linden/indra/llinventory/llinventory_vc8.vcproj347
-rw-r--r--linden/indra/llinventory/llinventory_vc9.vcproj348
-rw-r--r--linden/indra/llinventory/llinventorytype.cpp4
-rw-r--r--linden/indra/llinventory/llinventorytype.h2
-rw-r--r--linden/indra/llinventory/llnotecard.cpp14
-rw-r--r--linden/indra/llinventory/llnotecard.h9
-rw-r--r--linden/indra/llinventory/llparcel.cpp341
-rw-r--r--linden/indra/llinventory/llparcel.h60
-rw-r--r--linden/indra/llinventory/llpermissions.cpp42
-rw-r--r--linden/indra/llinventory/llsaleinfo.cpp2
-rw-r--r--linden/indra/llinventory/lltransactionflags.cpp36
-rw-r--r--linden/indra/llinventory/lltransactionflags.h6
17 files changed, 446 insertions, 1331 deletions
diff --git a/linden/indra/llinventory/CMakeLists.txt b/linden/indra/llinventory/CMakeLists.txt
new file mode 100644
index 0000000..b70548a
--- /dev/null
+++ b/linden/indra/llinventory/CMakeLists.txt
@@ -0,0 +1,56 @@
1# -*- cmake -*-
2
3project(llinventory)
4
5include(00-Common)
6include(LLCommon)
7include(LLMath)
8include(LLMessage)
9include(LLXML)
10
11include_directories(
12 ${LLCOMMON_INCLUDE_DIRS}
13 ${LLMATH_INCLUDE_DIRS}
14 ${LLMESSAGE_INCLUDE_DIRS}
15 ${LLXML_INCLUDE_DIRS}
16 )
17
18set(llinventory_SOURCE_FILES
19 llcategory.cpp
20 lleconomy.cpp
21 llinventory.cpp
22 llinventorytype.cpp
23 lllandmark.cpp
24 llnotecard.cpp
25 llparcel.cpp
26 llpermissions.cpp
27 llsaleinfo.cpp
28 lltransactionflags.cpp
29 lluserrelations.cpp
30 )
31
32set(llinventory_HEADER_FILES
33 CMakeLists.txt
34
35 llcategory.h
36 lleconomy.h
37 llinventory.h
38 llinventorytype.h
39 lllandmark.h
40 llnotecard.h
41 llparcel.h
42 llparcelflags.h
43 llpermissions.h
44 llpermissionsflags.h
45 llsaleinfo.h
46 lltransactionflags.h
47 lltransactiontypes.h
48 lluserrelations.h
49 )
50
51set_source_files_properties(${llinventory_HEADER_FILES}
52 PROPERTIES HEADER_FILE_ONLY TRUE)
53
54list(APPEND llinventory_SOURCE_FILES ${llinventory_HEADER_FILES})
55
56add_library (llinventory ${llinventory_SOURCE_FILES})
diff --git a/linden/indra/llinventory/files.lst b/linden/indra/llinventory/files.lst
deleted file mode 100644
index b918b06..0000000
--- a/linden/indra/llinventory/files.lst
+++ /dev/null
@@ -1,11 +0,0 @@
1llinventory/llcategory.cpp
2llinventory/lleconomy.cpp
3llinventory/llinventory.cpp
4llinventory/llinventorytype.cpp
5llinventory/lllandmark.cpp
6llinventory/llnotecard.cpp
7llinventory/llparcel.cpp
8llinventory/llpermissions.cpp
9llinventory/llsaleinfo.cpp
10llinventory/lltransactionflags.cpp
11llinventory/lluserrelations.cpp
diff --git a/linden/indra/llinventory/llinventory.cpp b/linden/indra/llinventory/llinventory.cpp
index 8cd0700..457a0cb 100644
--- a/linden/indra/llinventory/llinventory.cpp
+++ b/linden/indra/llinventory/llinventory.cpp
@@ -78,16 +78,16 @@ LLInventoryObject::LLInventoryObject(
78 const LLUUID& uuid, 78 const LLUUID& uuid,
79 const LLUUID& parent_uuid, 79 const LLUUID& parent_uuid,
80 LLAssetType::EType type, 80 LLAssetType::EType type,
81 const LLString& name) : 81 const std::string& name) :
82 mUUID(uuid), 82 mUUID(uuid),
83 mParentUUID(parent_uuid), 83 mParentUUID(parent_uuid),
84 mType(type), 84 mType(type),
85 mName(name) 85 mName(name)
86{ 86{
87 LLString::replaceNonstandardASCII(mName, ' '); 87 LLStringUtil::replaceNonstandardASCII(mName, ' ');
88 LLString::replaceChar(mName, '|', ' '); 88 LLStringUtil::replaceChar(mName, '|', ' ');
89 LLString::trim(mName); 89 LLStringUtil::trim(mName);
90 LLString::truncate(mName, DB_INV_ITEM_NAME_STR_LEN); 90 LLStringUtil::truncate(mName, DB_INV_ITEM_NAME_STR_LEN);
91} 91}
92 92
93LLInventoryObject::LLInventoryObject() : 93LLInventoryObject::LLInventoryObject() :
@@ -117,7 +117,7 @@ const LLUUID& LLInventoryObject::getParentUUID() const
117 return mParentUUID; 117 return mParentUUID;
118} 118}
119 119
120const LLString& LLInventoryObject::getName() const 120const std::string& LLInventoryObject::getName() const
121{ 121{
122 return mName; 122 return mName;
123} 123}
@@ -132,13 +132,13 @@ void LLInventoryObject::setUUID(const LLUUID& new_uuid)
132 mUUID = new_uuid; 132 mUUID = new_uuid;
133} 133}
134 134
135void LLInventoryObject::rename(const LLString& n) 135void LLInventoryObject::rename(const std::string& n)
136{ 136{
137 LLString new_name(n); 137 std::string new_name(n);
138 LLString::replaceNonstandardASCII(new_name, ' '); 138 LLStringUtil::replaceNonstandardASCII(new_name, ' ');
139 LLString::replaceChar(new_name, '|', ' '); 139 LLStringUtil::replaceChar(new_name, '|', ' ');
140 LLString::trim(new_name); 140 LLStringUtil::trim(new_name);
141 LLString::truncate(new_name, DB_INV_ITEM_NAME_STR_LEN); 141 LLStringUtil::truncate(new_name, DB_INV_ITEM_NAME_STR_LEN);
142 142
143 if( new_name != mName ) 143 if( new_name != mName )
144 { 144 {
@@ -201,10 +201,10 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
201 " %254s %254[^|]", 201 " %254s %254[^|]",
202 keyword, valuestr); 202 keyword, valuestr);
203 mName.assign(valuestr); 203 mName.assign(valuestr);
204 LLString::replaceNonstandardASCII(mName, ' '); 204 LLStringUtil::replaceNonstandardASCII(mName, ' ');
205 LLString::replaceChar(mName, '|', ' '); 205 LLStringUtil::replaceChar(mName, '|', ' ');
206 LLString::trim(mName); 206 LLStringUtil::trim(mName);
207 LLString::truncate(mName, DB_INV_ITEM_NAME_STR_LEN); 207 LLStringUtil::truncate(mName, DB_INV_ITEM_NAME_STR_LEN);
208 } 208 }
209 else 209 else
210 { 210 {
@@ -219,12 +219,12 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
219// not sure whether exportLegacyStream(llofstream(fp)) would work, fp may need to get icramented... 219// not sure whether exportLegacyStream(llofstream(fp)) would work, fp may need to get icramented...
220BOOL LLInventoryObject::exportFile(LLFILE* fp, BOOL) const 220BOOL LLInventoryObject::exportFile(LLFILE* fp, BOOL) const
221{ 221{
222 char uuid_str[UUID_STR_LENGTH]; /* Flawfinder: ignore */ 222 std::string uuid_str;
223 fprintf(fp, "\tinv_object\t0\n\t{\n"); 223 fprintf(fp, "\tinv_object\t0\n\t{\n");
224 mUUID.toString(uuid_str); 224 mUUID.toString(uuid_str);
225 fprintf(fp, "\t\tobj_id\t%s\n", uuid_str); 225 fprintf(fp, "\t\tobj_id\t%s\n", uuid_str.c_str());
226 mParentUUID.toString(uuid_str); 226 mParentUUID.toString(uuid_str);
227 fprintf(fp, "\t\tparent_id\t%s\n", uuid_str); 227 fprintf(fp, "\t\tparent_id\t%s\n", uuid_str.c_str());
228 fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType)); 228 fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType));
229 fprintf(fp, "\t\tname\t%s|\n", mName.c_str()); 229 fprintf(fp, "\t\tname\t%s|\n", mName.c_str());
230 fprintf(fp,"\t}\n"); 230 fprintf(fp,"\t}\n");
@@ -233,7 +233,7 @@ BOOL LLInventoryObject::exportFile(LLFILE* fp, BOOL) const
233 233
234BOOL LLInventoryObject::exportLegacyStream(std::ostream& output_stream, BOOL) const 234BOOL LLInventoryObject::exportLegacyStream(std::ostream& output_stream, BOOL) const
235{ 235{
236 char uuid_str[UUID_STR_LENGTH]; /* Flawfinder: ignore */ 236 std::string uuid_str;
237 output_stream << "\tinv_object\t0\n\t{\n"; 237 output_stream << "\tinv_object\t0\n\t{\n";
238 mUUID.toString(uuid_str); 238 mUUID.toString(uuid_str);
239 output_stream << "\t\tobj_id\t" << uuid_str << "\n"; 239 output_stream << "\t\tobj_id\t" << uuid_str << "\n";
@@ -276,8 +276,8 @@ LLInventoryItem::LLInventoryItem(
276 const LLUUID& asset_uuid, 276 const LLUUID& asset_uuid,
277 LLAssetType::EType type, 277 LLAssetType::EType type,
278 LLInventoryType::EType inv_type, 278 LLInventoryType::EType inv_type,
279 const LLString& name, 279 const std::string& name,
280 const LLString& desc, 280 const std::string& desc,
281 const LLSaleInfo& sale_info, 281 const LLSaleInfo& sale_info,
282 U32 flags, 282 U32 flags,
283 S32 creation_date_utc) : 283 S32 creation_date_utc) :
@@ -290,8 +290,8 @@ LLInventoryItem::LLInventoryItem(
290 mFlags(flags), 290 mFlags(flags),
291 mCreationDate(creation_date_utc) 291 mCreationDate(creation_date_utc)
292{ 292{
293 LLString::replaceNonstandardASCII(mDescription, ' '); 293 LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
294 LLString::replaceChar(mDescription, '|', ' '); 294 LLStringUtil::replaceChar(mDescription, '|', ' ');
295} 295}
296 296
297LLInventoryItem::LLInventoryItem() : 297LLInventoryItem::LLInventoryItem() :
@@ -359,12 +359,12 @@ void LLInventoryItem::setAssetUUID(const LLUUID& asset_id)
359} 359}
360 360
361 361
362const LLString& LLInventoryItem::getDescription() const 362const std::string& LLInventoryItem::getDescription() const
363{ 363{
364 return mDescription; 364 return mDescription;
365} 365}
366 366
367S32 LLInventoryItem::getCreationDate() const 367time_t LLInventoryItem::getCreationDate() const
368{ 368{
369 return mCreationDate; 369 return mCreationDate;
370} 370}
@@ -396,11 +396,11 @@ U32 LLInventoryItem::getCRC32() const
396} 396}
397 397
398 398
399void LLInventoryItem::setDescription(const LLString& d) 399void LLInventoryItem::setDescription(const std::string& d)
400{ 400{
401 LLString new_desc(d); 401 std::string new_desc(d);
402 LLString::replaceNonstandardASCII(new_desc, ' '); 402 LLStringUtil::replaceNonstandardASCII(new_desc, ' ');
403 LLString::replaceChar(new_desc, '|', ' '); 403 LLStringUtil::replaceChar(new_desc, '|', ' ');
404 if( new_desc != mDescription ) 404 if( new_desc != mDescription )
405 { 405 {
406 mDescription = new_desc; 406 mDescription = new_desc;
@@ -422,7 +422,7 @@ void LLInventoryItem::setFlags(U32 flags)
422 mFlags = flags; 422 mFlags = flags;
423} 423}
424 424
425void LLInventoryItem::setCreationDate(S32 creation_date_utc) 425void LLInventoryItem::setCreationDate(time_t creation_date_utc)
426{ 426{
427 mCreationDate = creation_date_utc; 427 mCreationDate = creation_date_utc;
428} 428}
@@ -486,17 +486,15 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
486 486
487 mSaleInfo.unpackMultiMessage(msg, block, block_num); 487 mSaleInfo.unpackMultiMessage(msg, block, block_num);
488 488
489 char name[DB_INV_ITEM_NAME_BUF_SIZE]; /* Flawfinder: ignore */ 489 msg->getStringFast(block, _PREHASH_Name, mName, block_num);
490 msg->getStringFast(block, _PREHASH_Name, DB_INV_ITEM_NAME_BUF_SIZE, name, block_num); 490 LLStringUtil::replaceNonstandardASCII(mName, ' ');
491 mName.assign(name);
492 LLString::replaceNonstandardASCII(mName, ' ');
493 491
494 char desc[DB_INV_ITEM_DESC_BUF_SIZE]; /* Flawfinder: ignore */ 492 msg->getStringFast(block, _PREHASH_Description, mDescription, block_num);
495 msg->getStringFast(block, _PREHASH_Description, DB_INV_ITEM_DESC_BUF_SIZE, desc, block_num); 493 LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
496 mDescription.assign(desc);
497 LLString::replaceNonstandardASCII(mDescription, ' ');
498 494
499 msg->getS32(block, "CreationDate", mCreationDate, block_num); 495 S32 date;
496 msg->getS32(block, "CreationDate", date, block_num);
497 mCreationDate = date;
500 498
501 U32 local_crc = getCRC32(); 499 U32 local_crc = getCRC32();
502 U32 remote_crc = 0; 500 U32 remote_crc = 0;
@@ -602,7 +600,7 @@ BOOL LLInventoryItem::importFile(LLFILE* fp)
602 } 600 }
603 else if(0 == strcmp("inv_type", keyword)) 601 else if(0 == strcmp("inv_type", keyword))
604 { 602 {
605 mInventoryType = LLInventoryType::lookup(valuestr); 603 mInventoryType = LLInventoryType::lookup(std::string(valuestr));
606 } 604 }
607 else if(0 == strcmp("flags", keyword)) 605 else if(0 == strcmp("flags", keyword))
608 { 606 {
@@ -624,8 +622,8 @@ BOOL LLInventoryItem::importFile(LLFILE* fp)
624 } 622 }
625 623
626 mName.assign(valuestr); 624 mName.assign(valuestr);
627 LLString::replaceNonstandardASCII(mName, ' '); 625 LLStringUtil::replaceNonstandardASCII(mName, ' ');
628 LLString::replaceChar(mName, '|', ' '); 626 LLStringUtil::replaceChar(mName, '|', ' ');
629 } 627 }
630 else if(0 == strcmp("desc", keyword)) 628 else if(0 == strcmp("desc", keyword))
631 { 629 {
@@ -642,7 +640,7 @@ BOOL LLInventoryItem::importFile(LLFILE* fp)
642 } 640 }
643 641
644 mDescription.assign(valuestr); 642 mDescription.assign(valuestr);
645 LLString::replaceNonstandardASCII(mDescription, ' '); 643 LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
646 /* TODO -- ask Ian about this code 644 /* TODO -- ask Ian about this code
647 const char *donkey = mDescription.c_str(); 645 const char *donkey = mDescription.c_str();
648 if (donkey[0] == '|') 646 if (donkey[0] == '|')
@@ -653,7 +651,9 @@ BOOL LLInventoryItem::importFile(LLFILE* fp)
653 } 651 }
654 else if(0 == strcmp("creation_date", keyword)) 652 else if(0 == strcmp("creation_date", keyword))
655 { 653 {
656 sscanf(valuestr, "%d", &mCreationDate); 654 S32 date;
655 sscanf(valuestr, "%d", &date);
656 mCreationDate = date;
657 } 657 }
658 else 658 else
659 { 659 {
@@ -676,12 +676,12 @@ BOOL LLInventoryItem::importFile(LLFILE* fp)
676 676
677BOOL LLInventoryItem::exportFile(LLFILE* fp, BOOL include_asset_key) const 677BOOL LLInventoryItem::exportFile(LLFILE* fp, BOOL include_asset_key) const
678{ 678{
679 char uuid_str[UUID_STR_LENGTH]; /* Flawfinder: ignore */ 679 std::string uuid_str;
680 fprintf(fp, "\tinv_item\t0\n\t{\n"); 680 fprintf(fp, "\tinv_item\t0\n\t{\n");
681 mUUID.toString(uuid_str); 681 mUUID.toString(uuid_str);
682 fprintf(fp, "\t\titem_id\t%s\n", uuid_str); 682 fprintf(fp, "\t\titem_id\t%s\n", uuid_str.c_str());
683 mParentUUID.toString(uuid_str); 683 mParentUUID.toString(uuid_str);
684 fprintf(fp, "\t\tparent_id\t%s\n", uuid_str); 684 fprintf(fp, "\t\tparent_id\t%s\n", uuid_str.c_str());
685 mPermissions.exportFile(fp); 685 mPermissions.exportFile(fp);
686 686
687 // Check for permissions to see the asset id, and if so write it 687 // Check for permissions to see the asset id, and if so write it
@@ -693,7 +693,7 @@ BOOL LLInventoryItem::exportFile(LLFILE* fp, BOOL include_asset_key) const
693 || (mAssetUUID.isNull())) 693 || (mAssetUUID.isNull()))
694 { 694 {
695 mAssetUUID.toString(uuid_str); 695 mAssetUUID.toString(uuid_str);
696 fprintf(fp, "\t\tasset_id\t%s\n", uuid_str); 696 fprintf(fp, "\t\tasset_id\t%s\n", uuid_str.c_str());
697 } 697 }
698 else 698 else
699 { 699 {
@@ -701,13 +701,13 @@ BOOL LLInventoryItem::exportFile(LLFILE* fp, BOOL include_asset_key) const
701 LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES); 701 LLXORCipher cipher(MAGIC_ID.mData, UUID_BYTES);
702 cipher.encrypt(shadow_id.mData, UUID_BYTES); 702 cipher.encrypt(shadow_id.mData, UUID_BYTES);
703 shadow_id.toString(uuid_str); 703 shadow_id.toString(uuid_str);
704 fprintf(fp, "\t\tshadow_id\t%s\n", uuid_str); 704 fprintf(fp, "\t\tshadow_id\t%s\n", uuid_str.c_str());
705 } 705 }
706 } 706 }
707 else 707 else
708 { 708 {
709 LLUUID::null.toString(uuid_str); 709 LLUUID::null.toString(uuid_str);
710 fprintf(fp, "\t\tasset_id\t%s\n", uuid_str); 710 fprintf(fp, "\t\tasset_id\t%s\n", uuid_str.c_str());
711 } 711 }
712 fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType)); 712 fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType));
713 const char* inv_type_str = LLInventoryType::lookup(mInventoryType); 713 const char* inv_type_str = LLInventoryType::lookup(mInventoryType);
@@ -716,7 +716,7 @@ BOOL LLInventoryItem::exportFile(LLFILE* fp, BOOL include_asset_key) const
716 mSaleInfo.exportFile(fp); 716 mSaleInfo.exportFile(fp);
717 fprintf(fp, "\t\tname\t%s|\n", mName.c_str()); 717 fprintf(fp, "\t\tname\t%s|\n", mName.c_str());
718 fprintf(fp, "\t\tdesc\t%s|\n", mDescription.c_str()); 718 fprintf(fp, "\t\tdesc\t%s|\n", mDescription.c_str());
719 fprintf(fp, "\t\tcreation_date\t%d\n", mCreationDate); 719 fprintf(fp, "\t\tcreation_date\t%d\n", (S32) mCreationDate);
720 fprintf(fp,"\t}\n"); 720 fprintf(fp,"\t}\n");
721 return TRUE; 721 return TRUE;
722} 722}
@@ -803,7 +803,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
803 } 803 }
804 else if(0 == strcmp("inv_type", keyword)) 804 else if(0 == strcmp("inv_type", keyword))
805 { 805 {
806 mInventoryType = LLInventoryType::lookup(valuestr); 806 mInventoryType = LLInventoryType::lookup(std::string(valuestr));
807 } 807 }
808 else if(0 == strcmp("flags", keyword)) 808 else if(0 == strcmp("flags", keyword))
809 { 809 {
@@ -825,8 +825,8 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
825 } 825 }
826 826
827 mName.assign(valuestr); 827 mName.assign(valuestr);
828 LLString::replaceNonstandardASCII(mName, ' '); 828 LLStringUtil::replaceNonstandardASCII(mName, ' ');
829 LLString::replaceChar(mName, '|', ' '); 829 LLStringUtil::replaceChar(mName, '|', ' ');
830 } 830 }
831 else if(0 == strcmp("desc", keyword)) 831 else if(0 == strcmp("desc", keyword))
832 { 832 {
@@ -843,7 +843,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
843 } 843 }
844 844
845 mDescription.assign(valuestr); 845 mDescription.assign(valuestr);
846 LLString::replaceNonstandardASCII(mDescription, ' '); 846 LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
847 /* TODO -- ask Ian about this code 847 /* TODO -- ask Ian about this code
848 const char *donkey = mDescription.c_str(); 848 const char *donkey = mDescription.c_str();
849 if (donkey[0] == '|') 849 if (donkey[0] == '|')
@@ -854,7 +854,9 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
854 } 854 }
855 else if(0 == strcmp("creation_date", keyword)) 855 else if(0 == strcmp("creation_date", keyword))
856 { 856 {
857 sscanf(valuestr, "%d", &mCreationDate); 857 S32 date;
858 sscanf(valuestr, "%d", &date);
859 mCreationDate = date;
858 } 860 }
859 else 861 else
860 { 862 {
@@ -877,7 +879,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
877 879
878BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key) const 880BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key) const
879{ 881{
880 char uuid_str[UUID_STR_LENGTH]; /* Flawfinder: ignore */ 882 std::string uuid_str;
881 output_stream << "\tinv_item\t0\n\t{\n"; 883 output_stream << "\tinv_item\t0\n\t{\n";
882 mUUID.toString(uuid_str); 884 mUUID.toString(uuid_str);
883 output_stream << "\t\titem_id\t" << uuid_str << "\n"; 885 output_stream << "\t\titem_id\t" << uuid_str << "\n";
@@ -914,8 +916,8 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
914 const char* inv_type_str = LLInventoryType::lookup(mInventoryType); 916 const char* inv_type_str = LLInventoryType::lookup(mInventoryType);
915 if(inv_type_str) 917 if(inv_type_str)
916 output_stream << "\t\tinv_type\t" << inv_type_str << "\n"; 918 output_stream << "\t\tinv_type\t" << inv_type_str << "\n";
917 char buffer[32]; /* Flawfinder: ignore */ 919 std::string buffer;
918 snprintf(buffer, sizeof(buffer), "\t\tflags\t%08x\n", mFlags); /* Flawfinder: ignore */ 920 buffer = llformat( "\t\tflags\t%08x\n", mFlags);
919 output_stream << buffer; 921 output_stream << buffer;
920 mSaleInfo.exportLegacyStream(output_stream); 922 mSaleInfo.exportLegacyStream(output_stream);
921 output_stream << "\t\tname\t" << mName.c_str() << "|\n"; 923 output_stream << "\t\tname\t" << mName.c_str() << "|\n";
@@ -956,7 +958,7 @@ LLSD LLInventoryItem::asLLSD() const
956 sd[INV_SALE_INFO_LABEL] = mSaleInfo; 958 sd[INV_SALE_INFO_LABEL] = mSaleInfo;
957 sd[INV_NAME_LABEL] = mName; 959 sd[INV_NAME_LABEL] = mName;
958 sd[INV_DESC_LABEL] = mDescription; 960 sd[INV_DESC_LABEL] = mDescription;
959 sd[INV_CREATION_DATE_LABEL] = mCreationDate; 961 sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
960 962
961 return sd; 963 return sd;
962} 964}
@@ -1024,12 +1026,12 @@ bool LLInventoryItem::fromLLSD(LLSD& sd)
1024 w = INV_ASSET_TYPE_LABEL; 1026 w = INV_ASSET_TYPE_LABEL;
1025 if (sd.has(w)) 1027 if (sd.has(w))
1026 { 1028 {
1027 mType = LLAssetType::lookup(sd[w].asString().c_str()); 1029 mType = LLAssetType::lookup(sd[w].asString());
1028 } 1030 }
1029 w = INV_INVENTORY_TYPE_LABEL; 1031 w = INV_INVENTORY_TYPE_LABEL;
1030 if (sd.has(w)) 1032 if (sd.has(w))
1031 { 1033 {
1032 mInventoryType = LLInventoryType::lookup(sd[w].asString().c_str()); 1034 mInventoryType = LLInventoryType::lookup(sd[w].asString());
1033 } 1035 }
1034 w = INV_FLAGS_LABEL; 1036 w = INV_FLAGS_LABEL;
1035 if (sd.has(w)) 1037 if (sd.has(w))
@@ -1040,19 +1042,19 @@ bool LLInventoryItem::fromLLSD(LLSD& sd)
1040 if (sd.has(w)) 1042 if (sd.has(w))
1041 { 1043 {
1042 mName = sd[w].asString(); 1044 mName = sd[w].asString();
1043 LLString::replaceNonstandardASCII(mName, ' '); 1045 LLStringUtil::replaceNonstandardASCII(mName, ' ');
1044 LLString::replaceChar(mName, '|', ' '); 1046 LLStringUtil::replaceChar(mName, '|', ' ');
1045 } 1047 }
1046 w = INV_DESC_LABEL; 1048 w = INV_DESC_LABEL;
1047 if (sd.has(w)) 1049 if (sd.has(w))
1048 { 1050 {
1049 mDescription = sd[w].asString(); 1051 mDescription = sd[w].asString();
1050 LLString::replaceNonstandardASCII(mDescription, ' '); 1052 LLStringUtil::replaceNonstandardASCII(mDescription, ' ');
1051 } 1053 }
1052 w = INV_CREATION_DATE_LABEL; 1054 w = INV_CREATION_DATE_LABEL;
1053 if (sd.has(w)) 1055 if (sd.has(w))
1054 { 1056 {
1055 mCreationDate = sd[w]; 1057 mCreationDate = sd[w].asInteger();
1056 } 1058 }
1057 1059
1058 // Need to convert 1.0 simstate files to a useful inventory type 1060 // Need to convert 1.0 simstate files to a useful inventory type
@@ -1101,22 +1103,23 @@ LLXMLNode *LLInventoryItem::exportFileXML(BOOL include_asset_key) const
1101 } 1103 }
1102 } 1104 }
1103 1105
1104 LLString type_str = LLAssetType::lookup(mType); 1106 std::string type_str = LLAssetType::lookup(mType);
1105 LLString inv_type_str = LLInventoryType::lookup(mInventoryType); 1107 std::string inv_type_str = LLInventoryType::lookup(mInventoryType);
1106 1108
1107 ret->createChild("asset_type", FALSE)->setStringValue(1, &type_str); 1109 ret->createChild("asset_type", FALSE)->setStringValue(type_str);
1108 ret->createChild("inventory_type", FALSE)->setStringValue(1, &inv_type_str); 1110 ret->createChild("inventory_type", FALSE)->setStringValue(inv_type_str);
1109 S32 tmp_flags = (S32) mFlags; 1111 S32 tmp_flags = (S32) mFlags;
1110 ret->createChild("flags", FALSE)->setByteValue(4, (U8*)(&tmp_flags), LLXMLNode::ENCODING_HEX); 1112 ret->createChild("flags", FALSE)->setByteValue(4, (U8*)(&tmp_flags), LLXMLNode::ENCODING_HEX);
1111 1113
1112 mSaleInfo.exportFileXML()->setParent(ret); 1114 mSaleInfo.exportFileXML()->setParent(ret);
1113 1115
1114 LLString temp; 1116 std::string temp;
1115 temp.assign(mName); 1117 temp.assign(mName);
1116 ret->createChild("name", FALSE)->setStringValue(1, &temp); 1118 ret->createChild("name", FALSE)->setStringValue(temp);
1117 temp.assign(mDescription); 1119 temp.assign(mDescription);
1118 ret->createChild("description", FALSE)->setStringValue(1, &temp); 1120 ret->createChild("description", FALSE)->setStringValue(temp);
1119 ret->createChild("creation_date", FALSE)->setIntValue(1, &mCreationDate); 1121 S32 date = mCreationDate;
1122 ret->createChild("creation_date", FALSE)->setIntValue(1, &date);
1120 1123
1121 return ret; 1124 return ret;
1122} 1125}
@@ -1143,9 +1146,9 @@ BOOL LLInventoryItem::importXML(LLXMLNode* node)
1143 cipher.decrypt(mAssetUUID.mData, UUID_BYTES); 1146 cipher.decrypt(mAssetUUID.mData, UUID_BYTES);
1144 } 1147 }
1145 if (node->getChild("asset_type", sub_node)) 1148 if (node->getChild("asset_type", sub_node))
1146 mType = LLAssetType::lookup(sub_node->getValue().c_str()); 1149 mType = LLAssetType::lookup(sub_node->getValue());
1147 if (node->getChild("inventory_type", sub_node)) 1150 if (node->getChild("inventory_type", sub_node))
1148 mInventoryType = LLInventoryType::lookup(sub_node->getValue().c_str()); 1151 mInventoryType = LLInventoryType::lookup(sub_node->getValue());
1149 if (node->getChild("flags", sub_node)) 1152 if (node->getChild("flags", sub_node))
1150 { 1153 {
1151 S32 tmp_flags = 0; 1154 S32 tmp_flags = 0;
@@ -1159,7 +1162,12 @@ BOOL LLInventoryItem::importXML(LLXMLNode* node)
1159 if (node->getChild("description", sub_node)) 1162 if (node->getChild("description", sub_node))
1160 mDescription = sub_node->getValue(); 1163 mDescription = sub_node->getValue();
1161 if (node->getChild("creation_date", sub_node)) 1164 if (node->getChild("creation_date", sub_node))
1162 success = success && (1 == sub_node->getIntValue(1, &mCreationDate)); 1165 {
1166 S32 date = 0;
1167 success = success && (1 == sub_node->getIntValue(1, &date));
1168 mCreationDate = date;
1169 }
1170
1163 if (!success) 1171 if (!success)
1164 { 1172 {
1165 lldebugs << "LLInventory::importXML() failed for node named '" 1173 lldebugs << "LLInventory::importXML() failed for node named '"
@@ -1186,32 +1194,32 @@ S32 LLInventoryItem::packBinaryBucket(U8* bin_bucket, LLPermissions* perm_overri
1186 1194
1187 // describe the inventory item 1195 // describe the inventory item
1188 char* buffer = (char*) bin_bucket; 1196 char* buffer = (char*) bin_bucket;
1189 char creator_id_str[UUID_STR_LENGTH]; /* Flawfinder: ignore */ 1197 std::string creator_id_str;
1190 1198
1191 perm.getCreator().toString(creator_id_str); 1199 perm.getCreator().toString(creator_id_str);
1192 char owner_id_str[UUID_STR_LENGTH]; /* Flawfinder: ignore */ 1200 std::string owner_id_str;
1193 perm.getOwner().toString(owner_id_str); 1201 perm.getOwner().toString(owner_id_str);
1194 char last_owner_id_str[UUID_STR_LENGTH]; /* Flawfinder: ignore */ 1202 std::string last_owner_id_str;
1195 perm.getLastOwner().toString(last_owner_id_str); 1203 perm.getLastOwner().toString(last_owner_id_str);
1196 char group_id_str[UUID_STR_LENGTH]; /* Flawfinder: ignore */ 1204 std::string group_id_str;
1197 perm.getGroup().toString(group_id_str); 1205 perm.getGroup().toString(group_id_str);
1198 char asset_id_str[UUID_STR_LENGTH]; /* Flawfinder: ignore */ 1206 std::string asset_id_str;
1199 getAssetUUID().toString(asset_id_str); 1207 getAssetUUID().toString(asset_id_str);
1200 S32 size = sprintf(buffer, /* Flawfinder: ignore */ 1208 S32 size = sprintf(buffer, /* Flawfinder: ignore */
1201 "%d|%d|%s|%s|%s|%s|%s|%x|%x|%x|%x|%x|%s|%s|%d|%d|%x", 1209 "%d|%d|%s|%s|%s|%s|%s|%x|%x|%x|%x|%x|%s|%s|%d|%d|%x",
1202 getType(), 1210 getType(),
1203 getInventoryType(), 1211 getInventoryType(),
1204 getName().c_str(), 1212 getName().c_str(),
1205 creator_id_str, 1213 creator_id_str.c_str(),
1206 owner_id_str, 1214 owner_id_str.c_str(),
1207 last_owner_id_str, 1215 last_owner_id_str.c_str(),
1208 group_id_str, 1216 group_id_str.c_str(),
1209 perm.getMaskBase(), 1217 perm.getMaskBase(),
1210 perm.getMaskOwner(), 1218 perm.getMaskOwner(),
1211 perm.getMaskGroup(), 1219 perm.getMaskGroup(),
1212 perm.getMaskEveryone(), 1220 perm.getMaskEveryone(),
1213 perm.getMaskNextOwner(), 1221 perm.getMaskNextOwner(),
1214 asset_id_str, 1222 asset_id_str.c_str(),
1215 getDescription().c_str(), 1223 getDescription().c_str(),
1216 getSaleInfo().getSaleType(), 1224 getSaleInfo().getSaleType(),
1217 getSaleInfo().getSalePrice(), 1225 getSaleInfo().getSalePrice(),
@@ -1262,7 +1270,7 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size)
1262 inv_type = (LLInventoryType::EType)(atoi((*(iter++)).c_str())); 1270 inv_type = (LLInventoryType::EType)(atoi((*(iter++)).c_str()));
1263 setInventoryType( inv_type ); 1271 setInventoryType( inv_type );
1264 1272
1265 LLString name((*(iter++)).c_str()); 1273 std::string name((*(iter++)).c_str());
1266 rename( name ); 1274 rename( name );
1267 1275
1268 LLUUID creator_id((*(iter++)).c_str()); 1276 LLUUID creator_id((*(iter++)).c_str());
@@ -1283,7 +1291,7 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size)
1283 LLUUID asset_id((*(iter++)).c_str()); 1291 LLUUID asset_id((*(iter++)).c_str());
1284 setAssetUUID(asset_id); 1292 setAssetUUID(asset_id);
1285 1293
1286 LLString desc((*(iter++)).c_str()); 1294 std::string desc((*(iter++)).c_str());
1287 setDescription(desc); 1295 setDescription(desc);
1288 1296
1289 LLSaleInfo::EForSale sale_type; 1297 LLSaleInfo::EForSale sale_type;
@@ -1302,7 +1310,7 @@ void LLInventoryItem::unpackBinaryBucket(U8* bin_bucket, S32 bin_bucket_size)
1302// returns TRUE if a should appear before b 1310// returns TRUE if a should appear before b
1303BOOL item_dictionary_sort( LLInventoryItem* a, LLInventoryItem* b ) 1311BOOL item_dictionary_sort( LLInventoryItem* a, LLInventoryItem* b )
1304{ 1312{
1305 return (LLString::compareDict( a->getName().c_str(), b->getName().c_str() ) < 0); 1313 return (LLStringUtil::compareDict( a->getName().c_str(), b->getName().c_str() ) < 0);
1306} 1314}
1307 1315
1308// returns TRUE if a should appear before b 1316// returns TRUE if a should appear before b
@@ -1320,7 +1328,7 @@ LLInventoryCategory::LLInventoryCategory(
1320 const LLUUID& uuid, 1328 const LLUUID& uuid,
1321 const LLUUID& parent_uuid, 1329 const LLUUID& parent_uuid,
1322 LLAssetType::EType preferred_type, 1330 LLAssetType::EType preferred_type,
1323 const LLString& name) : 1331 const std::string& name) :
1324 LLInventoryObject(uuid, parent_uuid, LLAssetType::AT_CATEGORY, name), 1332 LLInventoryObject(uuid, parent_uuid, LLAssetType::AT_CATEGORY, name),
1325 mPreferredType(preferred_type) 1333 mPreferredType(preferred_type)
1326{ 1334{
@@ -1406,8 +1414,8 @@ bool LLInventoryCategory::fromLLSD(LLSD& sd)
1406 if (sd.has(w)) 1414 if (sd.has(w))
1407 { 1415 {
1408 mName = sd[w].asString(); 1416 mName = sd[w].asString();
1409 LLString::replaceNonstandardASCII(mName, ' '); 1417 LLStringUtil::replaceNonstandardASCII(mName, ' ');
1410 LLString::replaceChar(mName, '|', ' '); 1418 LLStringUtil::replaceChar(mName, '|', ' ');
1411 } 1419 }
1412 return true; 1420 return true;
1413} 1421}
@@ -1422,10 +1430,8 @@ void LLInventoryCategory::unpackMessage(LLMessageSystem* msg,
1422 S8 type; 1430 S8 type;
1423 msg->getS8Fast(block, _PREHASH_Type, type, block_num); 1431 msg->getS8Fast(block, _PREHASH_Type, type, block_num);
1424 mPreferredType = static_cast<LLAssetType::EType>(type); 1432 mPreferredType = static_cast<LLAssetType::EType>(type);
1425 char name[DB_INV_ITEM_NAME_BUF_SIZE]; /* Flawfinder: ignore */ 1433 msg->getStringFast(block, _PREHASH_Name, mName, block_num);
1426 msg->getStringFast(block, _PREHASH_Name, DB_INV_ITEM_NAME_BUF_SIZE, name, block_num); 1434 LLStringUtil::replaceNonstandardASCII(mName, ' ');
1427 mName.assign(name);
1428 LLString::replaceNonstandardASCII(mName, ' ');
1429} 1435}
1430 1436
1431// virtual 1437// virtual
@@ -1483,8 +1489,8 @@ BOOL LLInventoryCategory::importFile(LLFILE* fp)
1483 " %254s %254[^|]", 1489 " %254s %254[^|]",
1484 keyword, valuestr); 1490 keyword, valuestr);
1485 mName.assign(valuestr); 1491 mName.assign(valuestr);
1486 LLString::replaceNonstandardASCII(mName, ' '); 1492 LLStringUtil::replaceNonstandardASCII(mName, ' ');
1487 LLString::replaceChar(mName, '|', ' '); 1493 LLStringUtil::replaceChar(mName, '|', ' ');
1488 } 1494 }
1489 else 1495 else
1490 { 1496 {
@@ -1497,12 +1503,12 @@ BOOL LLInventoryCategory::importFile(LLFILE* fp)
1497 1503
1498BOOL LLInventoryCategory::exportFile(LLFILE* fp, BOOL) const 1504BOOL LLInventoryCategory::exportFile(LLFILE* fp, BOOL) const
1499{ 1505{
1500 char uuid_str[UUID_STR_LENGTH]; /* Flawfinder: ignore */ 1506 std::string uuid_str;
1501 fprintf(fp, "\tinv_category\t0\n\t{\n"); 1507 fprintf(fp, "\tinv_category\t0\n\t{\n");
1502 mUUID.toString(uuid_str); 1508 mUUID.toString(uuid_str);
1503 fprintf(fp, "\t\tcat_id\t%s\n", uuid_str); 1509 fprintf(fp, "\t\tcat_id\t%s\n", uuid_str.c_str());
1504 mParentUUID.toString(uuid_str); 1510 mParentUUID.toString(uuid_str);
1505 fprintf(fp, "\t\tparent_id\t%s\n", uuid_str); 1511 fprintf(fp, "\t\tparent_id\t%s\n", uuid_str.c_str());
1506 fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType)); 1512 fprintf(fp, "\t\ttype\t%s\n", LLAssetType::lookup(mType));
1507 fprintf(fp, "\t\tpref_type\t%s\n", LLAssetType::lookup(mPreferredType)); 1513 fprintf(fp, "\t\tpref_type\t%s\n", LLAssetType::lookup(mPreferredType));
1508 fprintf(fp, "\t\tname\t%s|\n", mName.c_str()); 1514 fprintf(fp, "\t\tname\t%s|\n", mName.c_str());
@@ -1562,8 +1568,8 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream)
1562 " %254s %254[^|]", 1568 " %254s %254[^|]",
1563 keyword, valuestr); 1569 keyword, valuestr);
1564 mName.assign(valuestr); 1570 mName.assign(valuestr);
1565 LLString::replaceNonstandardASCII(mName, ' '); 1571 LLStringUtil::replaceNonstandardASCII(mName, ' ');
1566 LLString::replaceChar(mName, '|', ' '); 1572 LLStringUtil::replaceChar(mName, '|', ' ');
1567 } 1573 }
1568 else 1574 else
1569 { 1575 {
@@ -1576,7 +1582,7 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream)
1576 1582
1577BOOL LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, BOOL) const 1583BOOL LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, BOOL) const
1578{ 1584{
1579 char uuid_str[UUID_STR_LENGTH]; /* Flawfinder: ignore */ 1585 std::string uuid_str;
1580 output_stream << "\tinv_category\t0\n\t{\n"; 1586 output_stream << "\tinv_category\t0\n\t{\n";
1581 mUUID.toString(uuid_str); 1587 mUUID.toString(uuid_str);
1582 output_stream << "\t\tcat_id\t" << uuid_str << "\n"; 1588 output_stream << "\t\tcat_id\t" << uuid_str << "\n";
@@ -1615,7 +1621,7 @@ LLSD ll_create_sd_from_inventory_item(LLPointer<LLInventoryItem> item)
1615 rv[INV_INVENTORY_TYPE_LABEL] = 1621 rv[INV_INVENTORY_TYPE_LABEL] =
1616 LLInventoryType::lookup(item->getInventoryType()); 1622 LLInventoryType::lookup(item->getInventoryType());
1617 rv[INV_FLAGS_LABEL] = (S32)item->getFlags(); 1623 rv[INV_FLAGS_LABEL] = (S32)item->getFlags();
1618 rv[INV_CREATION_DATE_LABEL] = item->getCreationDate(); 1624 rv[INV_CREATION_DATE_LABEL] = (S32)item->getCreationDate();
1619 return rv; 1625 return rv;
1620} 1626}
1621 1627
@@ -1626,7 +1632,7 @@ LLPointer<LLInventoryItem> ll_create_item_from_sd(const LLSD& sd_item)
1626 rv->setParent(sd_item[INV_PARENT_ID_LABEL].asUUID()); 1632 rv->setParent(sd_item[INV_PARENT_ID_LABEL].asUUID());
1627 rv->rename(sd_item[INV_NAME_LABEL].asString()); 1633 rv->rename(sd_item[INV_NAME_LABEL].asString());
1628 rv->setType( 1634 rv->setType(
1629 LLAssetType::lookup(sd_item[INV_ASSET_TYPE_LABEL].asString().c_str())); 1635 LLAssetType::lookup(sd_item[INV_ASSET_TYPE_LABEL].asString()));
1630 if (sd_item.has("shadow_id")) 1636 if (sd_item.has("shadow_id"))
1631 { 1637 {
1632 LLUUID asset_id = sd_item["shadow_id"]; 1638 LLUUID asset_id = sd_item["shadow_id"];
@@ -1643,7 +1649,7 @@ LLPointer<LLInventoryItem> ll_create_item_from_sd(const LLSD& sd_item)
1643 rv->setPermissions(ll_permissions_from_sd(sd_item[INV_PERMISSIONS_LABEL])); 1649 rv->setPermissions(ll_permissions_from_sd(sd_item[INV_PERMISSIONS_LABEL]));
1644 rv->setInventoryType( 1650 rv->setInventoryType(
1645 LLInventoryType::lookup( 1651 LLInventoryType::lookup(
1646 sd_item[INV_INVENTORY_TYPE_LABEL].asString().c_str())); 1652 sd_item[INV_INVENTORY_TYPE_LABEL].asString()));
1647 rv->setFlags((U32)(sd_item[INV_FLAGS_LABEL].asInteger())); 1653 rv->setFlags((U32)(sd_item[INV_FLAGS_LABEL].asInteger()));
1648 rv->setCreationDate(sd_item[INV_CREATION_DATE_LABEL].asInteger()); 1654 rv->setCreationDate(sd_item[INV_CREATION_DATE_LABEL].asInteger());
1649 return rv; 1655 return rv;
@@ -1678,9 +1684,9 @@ LLPointer<LLInventoryCategory> ll_create_category_from_sd(const LLSD& sd_cat)
1678 rv->setParent(sd_cat[INV_PARENT_ID_LABEL].asUUID()); 1684 rv->setParent(sd_cat[INV_PARENT_ID_LABEL].asUUID());
1679 rv->rename(sd_cat[INV_NAME_LABEL].asString()); 1685 rv->rename(sd_cat[INV_NAME_LABEL].asString());
1680 rv->setType( 1686 rv->setType(
1681 LLAssetType::lookup(sd_cat[INV_ASSET_TYPE_LABEL].asString().c_str())); 1687 LLAssetType::lookup(sd_cat[INV_ASSET_TYPE_LABEL].asString()));
1682 rv->setPreferredType( 1688 rv->setPreferredType(
1683 LLAssetType::lookup( 1689 LLAssetType::lookup(
1684 sd_cat[INV_PREFERRED_TYPE_LABEL].asString().c_str())); 1690 sd_cat[INV_PREFERRED_TYPE_LABEL].asString()));
1685 return rv; 1691 return rv;
1686} 1692}
diff --git a/linden/indra/llinventory/llinventory.h b/linden/indra/llinventory/llinventory.h
index 1bb6b85..d3cce6b 100644
--- a/linden/indra/llinventory/llinventory.h
+++ b/linden/indra/llinventory/llinventory.h
@@ -75,7 +75,7 @@ protected:
75 LLUUID mUUID; 75 LLUUID mUUID;
76 LLUUID mParentUUID; 76 LLUUID mParentUUID;
77 LLAssetType::EType mType; 77 LLAssetType::EType mType;
78 LLString mName; 78 std::string mName;
79 79
80protected: 80protected:
81 virtual ~LLInventoryObject( void ); 81 virtual ~LLInventoryObject( void );
@@ -83,19 +83,19 @@ protected:
83public: 83public:
84 MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY); 84 MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
85 LLInventoryObject(const LLUUID& uuid, const LLUUID& parent_uuid, 85 LLInventoryObject(const LLUUID& uuid, const LLUUID& parent_uuid,
86 LLAssetType::EType type, const LLString& name); 86 LLAssetType::EType type, const std::string& name);
87 LLInventoryObject(); 87 LLInventoryObject();
88 void copyObject(const LLInventoryObject* other); // LLRefCount requires custom copy 88 void copyObject(const LLInventoryObject* other); // LLRefCount requires custom copy
89 89
90 // accessors 90 // accessors
91 const LLUUID& getUUID() const; 91 const LLUUID& getUUID() const;
92 const LLUUID& getParentUUID() const; 92 const LLUUID& getParentUUID() const;
93 const LLString& getName() const; 93 const std::string& getName() const;
94 LLAssetType::EType getType() const; 94 LLAssetType::EType getType() const;
95 95
96 // mutators - will not call updateServer(); 96 // mutators - will not call updateServer();
97 void setUUID(const LLUUID& new_uuid); 97 void setUUID(const LLUUID& new_uuid);
98 void rename(const LLString& new_name); 98 void rename(const std::string& new_name);
99 void setParent(const LLUUID& new_parent); 99 void setParent(const LLUUID& new_parent);
100 void setType(LLAssetType::EType type); 100 void setType(LLAssetType::EType type);
101 101
@@ -128,11 +128,11 @@ public:
128protected: 128protected:
129 LLPermissions mPermissions; 129 LLPermissions mPermissions;
130 LLUUID mAssetUUID; 130 LLUUID mAssetUUID;
131 LLString mDescription; 131 std::string mDescription;
132 LLSaleInfo mSaleInfo; 132 LLSaleInfo mSaleInfo;
133 LLInventoryType::EType mInventoryType; 133 LLInventoryType::EType mInventoryType;
134 U32 mFlags; 134 U32 mFlags;
135 S32 mCreationDate; // seconds from 1/1/1970, UTC 135 time_t mCreationDate; // seconds from 1/1/1970, UTC
136 136
137public: 137public:
138 138
@@ -212,8 +212,8 @@ public:
212 const LLUUID& asset_uuid, 212 const LLUUID& asset_uuid,
213 LLAssetType::EType type, 213 LLAssetType::EType type,
214 LLInventoryType::EType inv_type, 214 LLInventoryType::EType inv_type,
215 const LLString& name, 215 const std::string& name,
216 const LLString& desc, 216 const std::string& desc,
217 const LLSaleInfo& sale_info, 217 const LLSaleInfo& sale_info,
218 U32 flags, 218 U32 flags,
219 S32 creation_date_utc); 219 S32 creation_date_utc);
@@ -233,22 +233,22 @@ public:
233 const LLPermissions& getPermissions() const; 233 const LLPermissions& getPermissions() const;
234 const LLUUID& getCreatorUUID() const; 234 const LLUUID& getCreatorUUID() const;
235 const LLUUID& getAssetUUID() const; 235 const LLUUID& getAssetUUID() const;
236 const LLString& getDescription() const; 236 const std::string& getDescription() const;
237 const LLSaleInfo& getSaleInfo() const; 237 const LLSaleInfo& getSaleInfo() const;
238 LLInventoryType::EType getInventoryType() const; 238 LLInventoryType::EType getInventoryType() const;
239 U32 getFlags() const; 239 U32 getFlags() const;
240 S32 getCreationDate() const; 240 time_t getCreationDate() const;
241 U32 getCRC32() const; // really more of a checksum. 241 U32 getCRC32() const; // really more of a checksum.
242 242
243 // mutators - will not call updateServer(), and will never fail 243 // mutators - will not call updateServer(), and will never fail
244 // (though it may correct to sane values) 244 // (though it may correct to sane values)
245 void setAssetUUID(const LLUUID& asset_id); 245 void setAssetUUID(const LLUUID& asset_id);
246 void setDescription(const LLString& new_desc); 246 void setDescription(const std::string& new_desc);
247 void setSaleInfo(const LLSaleInfo& sale_info); 247 void setSaleInfo(const LLSaleInfo& sale_info);
248 void setPermissions(const LLPermissions& perm); 248 void setPermissions(const LLPermissions& perm);
249 void setInventoryType(LLInventoryType::EType inv_type); 249 void setInventoryType(LLInventoryType::EType inv_type);
250 void setFlags(U32 flags); 250 void setFlags(U32 flags);
251 void setCreationDate(S32 creation_date_utc); 251 void setCreationDate(time_t creation_date_utc);
252 252
253 // Put this inventory item onto the current outgoing mesage. It 253 // Put this inventory item onto the current outgoing mesage. It
254 // assumes you have already called nextBlock(). 254 // assumes you have already called nextBlock().
@@ -303,7 +303,7 @@ public:
303 MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY); 303 MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
304 LLInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid, 304 LLInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid,
305 LLAssetType::EType preferred_type, 305 LLAssetType::EType preferred_type,
306 const LLString& name); 306 const std::string& name);
307 LLInventoryCategory(); 307 LLInventoryCategory();
308 LLInventoryCategory(const LLInventoryCategory* other); 308 LLInventoryCategory(const LLInventoryCategory* other);
309 void copyCategory(const LLInventoryCategory* other); // LLRefCount requires custom copy 309 void copyCategory(const LLInventoryCategory* other); // LLRefCount requires custom copy
diff --git a/linden/indra/llinventory/llinventory.vcproj b/linden/indra/llinventory/llinventory.vcproj
deleted file mode 100644
index 7155d29..0000000
--- a/linden/indra/llinventory/llinventory.vcproj
+++ /dev/null
@@ -1,245 +0,0 @@
1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject
3 ProjectType="Visual C++"
4 Version="7.10"
5 Name="llinventory"
6 ProjectGUID="{328D1968-924F-4863-AAE8-5F9A95BA68E5}"
7 Keyword="Win32Proj">
8 <Platforms>
9 <Platform
10 Name="Win32"/>
11 </Platforms>
12 <Configurations>
13 <Configuration
14 Name="Debug|Win32"
15 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
16 IntermediateDirectory="Debug"
17 ConfigurationType="4"
18 CharacterSet="1">
19 <Tool
20 Name="VCCLCompilerTool"
21 Optimization="0"
22 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llmessage;..\llxml;..\..\libraries\i686-win32\include;..\..\libraries\include"
23 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;LL_DEBUG"
24 MinimalRebuild="TRUE"
25 BasicRuntimeChecks="3"
26 RuntimeLibrary="1"
27 StructMemberAlignment="4"
28 ForceConformanceInForLoopScope="TRUE"
29 UsePrecompiledHeader="0"
30 WarningLevel="3"
31 WarnAsError="TRUE"
32 Detect64BitPortabilityProblems="FALSE"
33 DebugInformationFormat="4"/>
34 <Tool
35 Name="VCCustomBuildTool"/>
36 <Tool
37 Name="VCLibrarianTool"
38 OutputFile="$(OutDir)/llinventory.lib"/>
39 <Tool
40 Name="VCMIDLTool"/>
41 <Tool
42 Name="VCPostBuildEventTool"/>
43 <Tool
44 Name="VCPreBuildEventTool"/>
45 <Tool
46 Name="VCPreLinkEventTool"/>
47 <Tool
48 Name="VCResourceCompilerTool"/>
49 <Tool
50 Name="VCWebServiceProxyGeneratorTool"/>
51 <Tool
52 Name="VCXMLDataGeneratorTool"/>
53 <Tool
54 Name="VCManagedWrapperGeneratorTool"/>
55 <Tool
56 Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
57 </Configuration>
58 <Configuration
59 Name="Release|Win32"
60 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
61 IntermediateDirectory="Release"
62 ConfigurationType="4"
63 CharacterSet="1">
64 <Tool
65 Name="VCCLCompilerTool"
66 AdditionalOptions="/Oy-"
67 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llmessage;..\llxml;..\..\libraries\i686-win32\include;..\..\libraries\include"
68 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;LL_RELEASE"
69 RuntimeLibrary="0"
70 StructMemberAlignment="0"
71 ForceConformanceInForLoopScope="TRUE"
72 UsePrecompiledHeader="0"
73 WarningLevel="3"
74 WarnAsError="TRUE"
75 Detect64BitPortabilityProblems="FALSE"
76 DebugInformationFormat="3"/>
77 <Tool
78 Name="VCCustomBuildTool"/>
79 <Tool
80 Name="VCLibrarianTool"
81 OutputFile="$(OutDir)/llinventory.lib"/>
82 <Tool
83 Name="VCMIDLTool"/>
84 <Tool
85 Name="VCPostBuildEventTool"/>
86 <Tool
87 Name="VCPreBuildEventTool"/>
88 <Tool
89 Name="VCPreLinkEventTool"/>
90 <Tool
91 Name="VCResourceCompilerTool"/>
92 <Tool
93 Name="VCWebServiceProxyGeneratorTool"/>
94 <Tool
95 Name="VCXMLDataGeneratorTool"/>
96 <Tool
97 Name="VCManagedWrapperGeneratorTool"/>
98 <Tool
99 Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
100 </Configuration>
101 <Configuration
102 Name="ReleaseNoOpt|Win32"
103 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
104 IntermediateDirectory="$(ConfigurationName)"
105 ConfigurationType="4"
106 CharacterSet="1">
107 <Tool
108 Name="VCCLCompilerTool"
109 AdditionalOptions="/Oy-"
110 Optimization="0"
111 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llmessage;..\llxml;..\..\libraries\i686-win32\include;..\..\libraries\include"
112 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;LL_RELEASE"
113 RuntimeLibrary="0"
114 StructMemberAlignment="0"
115 ForceConformanceInForLoopScope="TRUE"
116 UsePrecompiledHeader="0"
117 WarningLevel="3"
118 WarnAsError="TRUE"
119 Detect64BitPortabilityProblems="FALSE"
120 DebugInformationFormat="3"/>
121 <Tool
122 Name="VCCustomBuildTool"/>
123 <Tool
124 Name="VCLibrarianTool"
125 OutputFile="$(OutDir)/llinventory.lib"/>
126 <Tool
127 Name="VCMIDLTool"/>
128 <Tool
129 Name="VCPostBuildEventTool"/>
130 <Tool
131 Name="VCPreBuildEventTool"/>
132 <Tool
133 Name="VCPreLinkEventTool"/>
134 <Tool
135 Name="VCResourceCompilerTool"/>
136 <Tool
137 Name="VCWebServiceProxyGeneratorTool"/>
138 <Tool
139 Name="VCXMLDataGeneratorTool"/>
140 <Tool
141 Name="VCManagedWrapperGeneratorTool"/>
142 <Tool
143 Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
144 </Configuration>
145 </Configurations>
146 <References>
147 </References>
148 <Files>
149 <Filter
150 Name="Source Files"
151 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
152 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
153 <File
154 RelativePath=".\llcategory.cpp">
155 </File>
156 <File
157 RelativePath=".\lleconomy.cpp">
158 </File>
159 <File
160 RelativePath=".\llinventory.cpp">
161 </File>
162 <File
163 RelativePath=".\llinventorytype.cpp">
164 </File>
165 <File
166 RelativePath=".\lllandmark.cpp">
167 </File>
168 <File
169 RelativePath=".\llnotecard.cpp">
170 </File>
171 <File
172 RelativePath=".\llparcel.cpp">
173 </File>
174 <File
175 RelativePath=".\llpermissions.cpp">
176 </File>
177 <File
178 RelativePath=".\llsaleinfo.cpp">
179 </File>
180 <File
181 RelativePath=".\lltransactionflags.cpp">
182 </File>
183 <File
184 RelativePath=".\lluserrelations.cpp">
185 </File>
186 </Filter>
187 <Filter
188 Name="Header Files"
189 Filter="h;hpp;hxx;hm;inl;inc;xsd"
190 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
191 <File
192 RelativePath=".\llcategory.h">
193 </File>
194 <File
195 RelativePath=".\lleconomy.h">
196 </File>
197 <File
198 RelativePath=".\llinventory.h">
199 </File>
200 <File
201 RelativePath=".\llinventorytype.h">
202 </File>
203 <File
204 RelativePath=".\lllandmark.h">
205 </File>
206 <File
207 RelativePath=".\llnotecard.h">
208 </File>
209 <File
210 RelativePath=".\llparcel.h">
211 </File>
212 <File
213 RelativePath=".\llparcelflags.h">
214 </File>
215 <File
216 RelativePath=".\llpermissions.h">
217 </File>
218 <File
219 RelativePath=".\llpermissionsflags.h">
220 </File>
221 <File
222 RelativePath=".\llsaleinfo.h">
223 </File>
224 <File
225 RelativePath=".\lltransactionflags.h">
226 </File>
227 <File
228 RelativePath=".\lltransactiontypes.h">
229 </File>
230 <File
231 RelativePath=".\lluserrelations.h">
232 </File>
233 </Filter>
234 <Filter
235 Name="Resource Files"
236 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
237 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
238 </Filter>
239 <File
240 RelativePath=".\files.lst">
241 </File>
242 </Files>
243 <Globals>
244 </Globals>
245</VisualStudioProject>
diff --git a/linden/indra/llinventory/llinventory_vc8.vcproj b/linden/indra/llinventory/llinventory_vc8.vcproj
deleted file mode 100644
index 34dadc9..0000000
--- a/linden/indra/llinventory/llinventory_vc8.vcproj
+++ /dev/null
@@ -1,347 +0,0 @@
1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject
3 ProjectType="Visual C++"
4 Version="8.00"
5 Name="llinventory"
6 ProjectGUID="{328D1968-924F-4863-AAE8-5F9A95BA68E5}"
7 RootNamespace="llinventory"
8 Keyword="Win32Proj"
9 >
10 <Platforms>
11 <Platform
12 Name="Win32"
13 />
14 </Platforms>
15 <ToolFiles>
16 </ToolFiles>
17 <Configurations>
18 <Configuration
19 Name="Debug|Win32"
20 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
21 IntermediateDirectory="Debug"
22 ConfigurationType="4"
23 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
24 CharacterSet="1"
25 >
26 <Tool
27 Name="VCPreBuildEventTool"
28 />
29 <Tool
30 Name="VCCustomBuildTool"
31 />
32 <Tool
33 Name="VCXMLDataGeneratorTool"
34 />
35 <Tool
36 Name="VCWebServiceProxyGeneratorTool"
37 />
38 <Tool
39 Name="VCMIDLTool"
40 />
41 <Tool
42 Name="VCCLCompilerTool"
43 Optimization="0"
44 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llmessage;..\llxml;..\..\libraries\i686-win32\include;..\..\libraries\include"
45 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG"
46 MinimalRebuild="true"
47 BasicRuntimeChecks="3"
48 RuntimeLibrary="1"
49 StructMemberAlignment="4"
50 TreatWChar_tAsBuiltInType="false"
51 ForceConformanceInForLoopScope="true"
52 UsePrecompiledHeader="0"
53 WarningLevel="3"
54 WarnAsError="true"
55 Detect64BitPortabilityProblems="false"
56 DebugInformationFormat="4"
57 />
58 <Tool
59 Name="VCManagedResourceCompilerTool"
60 />
61 <Tool
62 Name="VCResourceCompilerTool"
63 />
64 <Tool
65 Name="VCPreLinkEventTool"
66 />
67 <Tool
68 Name="VCLibrarianTool"
69 OutputFile="$(OutDir)/llinventory.lib"
70 />
71 <Tool
72 Name="VCALinkTool"
73 />
74 <Tool
75 Name="VCXDCMakeTool"
76 />
77 <Tool
78 Name="VCBscMakeTool"
79 />
80 <Tool
81 Name="VCFxCopTool"
82 />
83 <Tool
84 Name="VCPostBuildEventTool"
85 />
86 </Configuration>
87 <Configuration
88 Name="Release|Win32"
89 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
90 IntermediateDirectory="Release"
91 ConfigurationType="4"
92 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
93 CharacterSet="1"
94 >
95 <Tool
96 Name="VCPreBuildEventTool"
97 />
98 <Tool
99 Name="VCCustomBuildTool"
100 />
101 <Tool
102 Name="VCXMLDataGeneratorTool"
103 />
104 <Tool
105 Name="VCWebServiceProxyGeneratorTool"
106 />
107 <Tool
108 Name="VCMIDLTool"
109 />
110 <Tool
111 Name="VCCLCompilerTool"
112 AdditionalOptions="/Oy-"
113 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llmessage;..\llxml;..\..\libraries\i686-win32\include;..\..\libraries\include"
114 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
115 RuntimeLibrary="0"
116 StructMemberAlignment="0"
117 TreatWChar_tAsBuiltInType="false"
118 ForceConformanceInForLoopScope="true"
119 UsePrecompiledHeader="0"
120 WarningLevel="3"
121 WarnAsError="true"
122 Detect64BitPortabilityProblems="false"
123 DebugInformationFormat="3"
124 />
125 <Tool
126 Name="VCManagedResourceCompilerTool"
127 />
128 <Tool
129 Name="VCResourceCompilerTool"
130 />
131 <Tool
132 Name="VCPreLinkEventTool"
133 />
134 <Tool
135 Name="VCLibrarianTool"
136 OutputFile="$(OutDir)/llinventory.lib"
137 />
138 <Tool
139 Name="VCALinkTool"
140 />
141 <Tool
142 Name="VCXDCMakeTool"
143 />
144 <Tool
145 Name="VCBscMakeTool"
146 />
147 <Tool
148 Name="VCFxCopTool"
149 />
150 <Tool
151 Name="VCPostBuildEventTool"
152 />
153 </Configuration>
154 <Configuration
155 Name="ReleaseNoOpt|Win32"
156 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
157 IntermediateDirectory="$(ConfigurationName)"
158 ConfigurationType="4"
159 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
160 CharacterSet="1"
161 >
162 <Tool
163 Name="VCPreBuildEventTool"
164 />
165 <Tool
166 Name="VCCustomBuildTool"
167 />
168 <Tool
169 Name="VCXMLDataGeneratorTool"
170 />
171 <Tool
172 Name="VCWebServiceProxyGeneratorTool"
173 />
174 <Tool
175 Name="VCMIDLTool"
176 />
177 <Tool
178 Name="VCCLCompilerTool"
179 AdditionalOptions="/Oy-"
180 Optimization="0"
181 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llmessage;..\llxml;..\..\libraries\i686-win32\include;..\..\libraries\include"
182 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
183 RuntimeLibrary="0"
184 StructMemberAlignment="0"
185 TreatWChar_tAsBuiltInType="false"
186 ForceConformanceInForLoopScope="true"
187 UsePrecompiledHeader="0"
188 WarningLevel="3"
189 WarnAsError="true"
190 Detect64BitPortabilityProblems="false"
191 DebugInformationFormat="3"
192 />
193 <Tool
194 Name="VCManagedResourceCompilerTool"
195 />
196 <Tool
197 Name="VCResourceCompilerTool"
198 />
199 <Tool
200 Name="VCPreLinkEventTool"
201 />
202 <Tool
203 Name="VCLibrarianTool"
204 OutputFile="$(OutDir)/llinventory.lib"
205 />
206 <Tool
207 Name="VCALinkTool"
208 />
209 <Tool
210 Name="VCXDCMakeTool"
211 />
212 <Tool
213 Name="VCBscMakeTool"
214 />
215 <Tool
216 Name="VCFxCopTool"
217 />
218 <Tool
219 Name="VCPostBuildEventTool"
220 />
221 </Configuration>
222 </Configurations>
223 <References>
224 </References>
225 <Files>
226 <Filter
227 Name="Source Files"
228 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
229 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
230 >
231 <File
232 RelativePath=".\llcategory.cpp"
233 >
234 </File>
235 <File
236 RelativePath=".\lleconomy.cpp"
237 >
238 </File>
239 <File
240 RelativePath=".\llinventory.cpp"
241 >
242 </File>
243 <File
244 RelativePath=".\llinventorytype.cpp"
245 >
246 </File>
247 <File
248 RelativePath=".\lllandmark.cpp"
249 >
250 </File>
251 <File
252 RelativePath=".\llnotecard.cpp"
253 >
254 </File>
255 <File
256 RelativePath=".\llparcel.cpp"
257 >
258 </File>
259 <File
260 RelativePath=".\llpermissions.cpp"
261 >
262 </File>
263 <File
264 RelativePath=".\llsaleinfo.cpp"
265 >
266 </File>
267 <File
268 RelativePath=".\lltransactionflags.cpp"
269 >
270 </File>
271 <File
272 RelativePath=".\lluserrelations.cpp"
273 >
274 </File>
275 </Filter>
276 <Filter
277 Name="Header Files"
278 Filter="h;hpp;hxx;hm;inl;inc;xsd"
279 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
280 >
281 <File
282 RelativePath=".\llcategory.h"
283 >
284 </File>
285 <File
286 RelativePath=".\lleconomy.h"
287 >
288 </File>
289 <File
290 RelativePath=".\llinventory.h"
291 >
292 </File>
293 <File
294 RelativePath=".\llinventorytype.h"
295 >
296 </File>
297 <File
298 RelativePath=".\lllandmark.h"
299 >
300 </File>
301 <File
302 RelativePath=".\llnotecard.h"
303 >
304 </File>
305 <File
306 RelativePath=".\llparcel.h"
307 >
308 </File>
309 <File
310 RelativePath=".\llparcelflags.h"
311 >
312 </File>
313 <File
314 RelativePath=".\llpermissions.h"
315 >
316 </File>
317 <File
318 RelativePath=".\llpermissionsflags.h"
319 >
320 </File>
321 <File
322 RelativePath=".\llsaleinfo.h"
323 >
324 </File>
325 <File
326 RelativePath=".\lltransactionflags.h"
327 >
328 </File>
329 <File
330 RelativePath=".\lltransactiontypes.h"
331 >
332 </File>
333 <File
334 RelativePath=".\lluserrelations.h"
335 >
336 </File>
337 </Filter>
338 <Filter
339 Name="Resource Files"
340 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
341 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
342 >
343 </Filter>
344 </Files>
345 <Globals>
346 </Globals>
347</VisualStudioProject>
diff --git a/linden/indra/llinventory/llinventory_vc9.vcproj b/linden/indra/llinventory/llinventory_vc9.vcproj
deleted file mode 100644
index cdc6c43..0000000
--- a/linden/indra/llinventory/llinventory_vc9.vcproj
+++ /dev/null
@@ -1,348 +0,0 @@
1<?xml version="1.0" encoding="Windows-1252"?>
2<VisualStudioProject
3 ProjectType="Visual C++"
4 Version="9.00"
5 Name="llinventory"
6 ProjectGUID="{328D1968-924F-4863-AAE8-5F9A95BA68E5}"
7 RootNamespace="llinventory"
8 Keyword="Win32Proj"
9 TargetFrameworkVersion="131072"
10 >
11 <Platforms>
12 <Platform
13 Name="Win32"
14 />
15 </Platforms>
16 <ToolFiles>
17 </ToolFiles>
18 <Configurations>
19 <Configuration
20 Name="Debug|Win32"
21 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
22 IntermediateDirectory="Debug"
23 ConfigurationType="4"
24 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
25 CharacterSet="1"
26 >
27 <Tool
28 Name="VCPreBuildEventTool"
29 />
30 <Tool
31 Name="VCCustomBuildTool"
32 />
33 <Tool
34 Name="VCXMLDataGeneratorTool"
35 />
36 <Tool
37 Name="VCWebServiceProxyGeneratorTool"
38 />
39 <Tool
40 Name="VCMIDLTool"
41 />
42 <Tool
43 Name="VCCLCompilerTool"
44 Optimization="0"
45 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llmessage;..\llxml;..\..\libraries\i686-win32\include;..\..\libraries\include"
46 PreprocessorDefinitions="WIN32;_DEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_DEBUG"
47 MinimalRebuild="true"
48 BasicRuntimeChecks="3"
49 RuntimeLibrary="1"
50 StructMemberAlignment="4"
51 TreatWChar_tAsBuiltInType="false"
52 ForceConformanceInForLoopScope="true"
53 UsePrecompiledHeader="0"
54 WarningLevel="3"
55 WarnAsError="true"
56 Detect64BitPortabilityProblems="false"
57 DebugInformationFormat="4"
58 />
59 <Tool
60 Name="VCManagedResourceCompilerTool"
61 />
62 <Tool
63 Name="VCResourceCompilerTool"
64 />
65 <Tool
66 Name="VCPreLinkEventTool"
67 />
68 <Tool
69 Name="VCLibrarianTool"
70 OutputFile="$(OutDir)/llinventory.lib"
71 />
72 <Tool
73 Name="VCALinkTool"
74 />
75 <Tool
76 Name="VCXDCMakeTool"
77 />
78 <Tool
79 Name="VCBscMakeTool"
80 />
81 <Tool
82 Name="VCFxCopTool"
83 />
84 <Tool
85 Name="VCPostBuildEventTool"
86 />
87 </Configuration>
88 <Configuration
89 Name="Release|Win32"
90 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
91 IntermediateDirectory="Release"
92 ConfigurationType="4"
93 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
94 CharacterSet="1"
95 >
96 <Tool
97 Name="VCPreBuildEventTool"
98 />
99 <Tool
100 Name="VCCustomBuildTool"
101 />
102 <Tool
103 Name="VCXMLDataGeneratorTool"
104 />
105 <Tool
106 Name="VCWebServiceProxyGeneratorTool"
107 />
108 <Tool
109 Name="VCMIDLTool"
110 />
111 <Tool
112 Name="VCCLCompilerTool"
113 AdditionalOptions="/Oy-"
114 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llmessage;..\llxml;..\..\libraries\i686-win32\include;..\..\libraries\include"
115 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
116 RuntimeLibrary="0"
117 StructMemberAlignment="0"
118 TreatWChar_tAsBuiltInType="false"
119 ForceConformanceInForLoopScope="true"
120 UsePrecompiledHeader="0"
121 WarningLevel="3"
122 WarnAsError="true"
123 Detect64BitPortabilityProblems="false"
124 DebugInformationFormat="3"
125 />
126 <Tool
127 Name="VCManagedResourceCompilerTool"
128 />
129 <Tool
130 Name="VCResourceCompilerTool"
131 />
132 <Tool
133 Name="VCPreLinkEventTool"
134 />
135 <Tool
136 Name="VCLibrarianTool"
137 OutputFile="$(OutDir)/llinventory.lib"
138 />
139 <Tool
140 Name="VCALinkTool"
141 />
142 <Tool
143 Name="VCXDCMakeTool"
144 />
145 <Tool
146 Name="VCBscMakeTool"
147 />
148 <Tool
149 Name="VCFxCopTool"
150 />
151 <Tool
152 Name="VCPostBuildEventTool"
153 />
154 </Configuration>
155 <Configuration
156 Name="ReleaseNoOpt|Win32"
157 OutputDirectory="../lib_$(ConfigurationName)/i686-win32"
158 IntermediateDirectory="$(ConfigurationName)"
159 ConfigurationType="4"
160 InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
161 CharacterSet="1"
162 >
163 <Tool
164 Name="VCPreBuildEventTool"
165 />
166 <Tool
167 Name="VCCustomBuildTool"
168 />
169 <Tool
170 Name="VCXMLDataGeneratorTool"
171 />
172 <Tool
173 Name="VCWebServiceProxyGeneratorTool"
174 />
175 <Tool
176 Name="VCMIDLTool"
177 />
178 <Tool
179 Name="VCCLCompilerTool"
180 AdditionalOptions="/Oy-"
181 Optimization="0"
182 AdditionalIncludeDirectories="..\llcommon;..\llmath;..\llvfs;..\llmessage;..\llxml;..\..\libraries\i686-win32\include;..\..\libraries\include"
183 PreprocessorDefinitions="WIN32;NDEBUG;_LIB;LL_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;LL_RELEASE"
184 RuntimeLibrary="0"
185 StructMemberAlignment="0"
186 TreatWChar_tAsBuiltInType="false"
187 ForceConformanceInForLoopScope="true"
188 UsePrecompiledHeader="0"
189 WarningLevel="3"
190 WarnAsError="true"
191 Detect64BitPortabilityProblems="false"
192 DebugInformationFormat="3"
193 />
194 <Tool
195 Name="VCManagedResourceCompilerTool"
196 />
197 <Tool
198 Name="VCResourceCompilerTool"
199 />
200 <Tool
201 Name="VCPreLinkEventTool"
202 />
203 <Tool
204 Name="VCLibrarianTool"
205 OutputFile="$(OutDir)/llinventory.lib"
206 />
207 <Tool
208 Name="VCALinkTool"
209 />
210 <Tool
211 Name="VCXDCMakeTool"
212 />
213 <Tool
214 Name="VCBscMakeTool"
215 />
216 <Tool
217 Name="VCFxCopTool"
218 />
219 <Tool
220 Name="VCPostBuildEventTool"
221 />
222 </Configuration>
223 </Configurations>
224 <References>
225 </References>
226 <Files>
227 <Filter
228 Name="Source Files"
229 Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
230 UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
231 >
232 <File
233 RelativePath=".\llcategory.cpp"
234 >
235 </File>
236 <File
237 RelativePath=".\lleconomy.cpp"
238 >
239 </File>
240 <File
241 RelativePath=".\llinventory.cpp"
242 >
243 </File>
244 <File
245 RelativePath=".\llinventorytype.cpp"
246 >
247 </File>
248 <File
249 RelativePath=".\lllandmark.cpp"
250 >
251 </File>
252 <File
253 RelativePath=".\llnotecard.cpp"
254 >
255 </File>
256 <File
257 RelativePath=".\llparcel.cpp"
258 >
259 </File>
260 <File
261 RelativePath=".\llpermissions.cpp"
262 >
263 </File>
264 <File
265 RelativePath=".\llsaleinfo.cpp"
266 >
267 </File>
268 <File
269 RelativePath=".\lltransactionflags.cpp"
270 >
271 </File>
272 <File
273 RelativePath=".\lluserrelations.cpp"
274 >
275 </File>
276 </Filter>
277 <Filter
278 Name="Header Files"
279 Filter="h;hpp;hxx;hm;inl;inc;xsd"
280 UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
281 >
282 <File
283 RelativePath=".\llcategory.h"
284 >
285 </File>
286 <File
287 RelativePath=".\lleconomy.h"
288 >
289 </File>
290 <File
291 RelativePath=".\llinventory.h"
292 >
293 </File>
294 <File
295 RelativePath=".\llinventorytype.h"
296 >
297 </File>
298 <File
299 RelativePath=".\lllandmark.h"
300 >
301 </File>
302 <File
303 RelativePath=".\llnotecard.h"
304 >
305 </File>
306 <File
307 RelativePath=".\llparcel.h"
308 >
309 </File>
310 <File
311 RelativePath=".\llparcelflags.h"
312 >
313 </File>
314 <File
315 RelativePath=".\llpermissions.h"
316 >
317 </File>
318 <File
319 RelativePath=".\llpermissionsflags.h"
320 >
321 </File>
322 <File
323 RelativePath=".\llsaleinfo.h"
324 >
325 </File>
326 <File
327 RelativePath=".\lltransactionflags.h"
328 >
329 </File>
330 <File
331 RelativePath=".\lltransactiontypes.h"
332 >
333 </File>
334 <File
335 RelativePath=".\lluserrelations.h"
336 >
337 </File>
338 </Filter>
339 <Filter
340 Name="Resource Files"
341 Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
342 UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
343 >
344 </Filter>
345 </Files>
346 <Globals>
347 </Globals>
348</VisualStudioProject>
diff --git a/linden/indra/llinventory/llinventorytype.cpp b/linden/indra/llinventory/llinventorytype.cpp
index 9212947..6287db2 100644
--- a/linden/indra/llinventory/llinventorytype.cpp
+++ b/linden/indra/llinventory/llinventorytype.cpp
@@ -162,12 +162,12 @@ const char* LLInventoryType::lookup(EType type)
162} 162}
163 163
164// static 164// static
165LLInventoryType::EType LLInventoryType::lookup(const char* name) 165LLInventoryType::EType LLInventoryType::lookup(const std::string& name)
166{ 166{
167 for(S32 i = 0; i < IT_COUNT; ++i) 167 for(S32 i = 0; i < IT_COUNT; ++i)
168 { 168 {
169 if((INVENTORY_TYPE_NAMES[i]) 169 if((INVENTORY_TYPE_NAMES[i])
170 && (0 == strcmp(name, INVENTORY_TYPE_NAMES[i]))) 170 && (name == INVENTORY_TYPE_NAMES[i]))
171 { 171 {
172 // match 172 // match
173 return (EType)i; 173 return (EType)i;
diff --git a/linden/indra/llinventory/llinventorytype.h b/linden/indra/llinventory/llinventorytype.h
index 3c9abe9..00a4d28 100644
--- a/linden/indra/llinventory/llinventorytype.h
+++ b/linden/indra/llinventory/llinventorytype.h
@@ -72,7 +72,7 @@ public:
72 }; 72 };
73 73
74 // machine transation between type and strings 74 // machine transation between type and strings
75 static EType lookup(const char* name); 75 static EType lookup(const std::string& name);
76 static const char* lookup(EType type); 76 static const char* lookup(EType type);
77 77
78 // translation from a type to a human readable form. 78 // translation from a type to a human readable form.
diff --git a/linden/indra/llinventory/llnotecard.cpp b/linden/indra/llinventory/llnotecard.cpp
index 6d565e8..acd2e76 100644
--- a/linden/indra/llinventory/llnotecard.cpp
+++ b/linden/indra/llinventory/llnotecard.cpp
@@ -222,7 +222,7 @@ bool LLNotecard::importStream(std::istream& str)
222 if(success) 222 if(success)
223 { 223 {
224 // Actually set the text 224 // Actually set the text
225 mText = text; 225 mText = std::string(text);
226 } 226 }
227 227
228 delete[] text; 228 delete[] text;
@@ -281,22 +281,12 @@ bool LLNotecard::exportStream( std::ostream& out_stream )
281 281
282//////////////////////////////////////////////////////////////////////////// 282////////////////////////////////////////////////////////////////////////////
283 283
284const std::vector<LLPointer<LLInventoryItem> >& LLNotecard::getItems() const
285{
286 return mItems;
287}
288
289LLString& LLNotecard::getText()
290{
291 return mText;
292}
293
294void LLNotecard::setItems(const std::vector<LLPointer<LLInventoryItem> >& items) 284void LLNotecard::setItems(const std::vector<LLPointer<LLInventoryItem> >& items)
295{ 285{
296 mItems = items; 286 mItems = items;
297} 287}
298 288
299void LLNotecard::setText(const LLString& text) 289void LLNotecard::setText(const std::string& text)
300{ 290{
301 mText = text; 291 mText = text;
302} 292}
diff --git a/linden/indra/llinventory/llnotecard.h b/linden/indra/llinventory/llnotecard.h
index 2b36ae2..a510ba3 100644
--- a/linden/indra/llinventory/llnotecard.h
+++ b/linden/indra/llinventory/llnotecard.h
@@ -52,11 +52,12 @@ public:
52 bool importStream(std::istream& str); 52 bool importStream(std::istream& str);
53 bool exportStream(std::ostream& str); 53 bool exportStream(std::ostream& str);
54 54
55 const std::vector<LLPointer<LLInventoryItem> >& getItems() const; 55 const std::vector<LLPointer<LLInventoryItem> >& getItems() const { return mItems; }
56 LLString& getText(); 56 const std::string& getText() const { return mText; }
57 std::string& getText() { return mText; }
57 58
58 void setItems(const std::vector<LLPointer<LLInventoryItem> >& items); 59 void setItems(const std::vector<LLPointer<LLInventoryItem> >& items);
59 void setText(const LLString& text); 60 void setText(const std::string& text);
60 S32 getVersion() { return mVersion; } 61 S32 getVersion() { return mVersion; }
61 S32 getEmbeddedVersion() { return mEmbeddedVersion; } 62 S32 getEmbeddedVersion() { return mEmbeddedVersion; }
62 63
@@ -64,7 +65,7 @@ private:
64 bool importEmbeddedItemsStream(std::istream& str); 65 bool importEmbeddedItemsStream(std::istream& str);
65 bool exportEmbeddedItemsStream(std::ostream& str); 66 bool exportEmbeddedItemsStream(std::ostream& str);
66 std::vector<LLPointer<LLInventoryItem> > mItems; 67 std::vector<LLPointer<LLInventoryItem> > mItems;
67 LLString mText; 68 std::string mText;
68 S32 mMaxText; 69 S32 mMaxText;
69 S32 mVersion; 70 S32 mVersion;
70 S32 mEmbeddedVersion; 71 S32 mEmbeddedVersion;
diff --git a/linden/indra/llinventory/llparcel.cpp b/linden/indra/llinventory/llparcel.cpp
index 1390f72..2b9c201 100644
--- a/linden/indra/llinventory/llparcel.cpp
+++ b/linden/indra/llinventory/llparcel.cpp
@@ -1,33 +1,33 @@
1/** 1/**
2* @file llparcel.cpp 2 * @file llparcel.cpp
3* @brief A land parcel. 3 * @brief A land parcel.
4* 4 *
5* $LicenseInfo:firstyear=2002&license=viewergpl$ 5 * $LicenseInfo:firstyear=2002&license=viewergpl$
6* 6 *
7* Copyright (c) 2002-2008, Linden Research, Inc. 7 * Copyright (c) 2002-2008, Linden Research, Inc.
8* 8 *
9* Second Life Viewer Source Code 9 * Second Life Viewer Source Code
10* The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
11* to you under the terms of the GNU General Public License, version 2.0 11 * to you under the terms of the GNU General Public License, version 2.0
12* ("GPL"), unless you have obtained a separate licensing agreement 12 * ("GPL"), unless you have obtained a separate licensing agreement
13* ("Other License"), formally executed by you and Linden Lab. Terms of 13 * ("Other License"), formally executed by you and Linden Lab. Terms of
14* the GPL can be found in doc/GPL-license.txt in this distribution, or 14 * the GPL can be found in doc/GPL-license.txt in this distribution, or
15* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 15 * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
16* 16 *
17* There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18* it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19* in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21* 21 *
22* By copying, modifying or distributing this software, you acknowledge 22 * By copying, modifying or distributing this software, you acknowledge
23* that you have read and understood your obligations described above, 23 * that you have read and understood your obligations described above,
24* and agree to abide by those obligations. 24 * and agree to abide by those obligations.
25* 25 *
26* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
27* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28* COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29* $/LicenseInfo$ 29 * $/LicenseInfo$
30*/ 30 */
31 31
32#include "linden_common.h" 32#include "linden_common.h"
33 33
@@ -48,17 +48,18 @@
48 48
49static const F32 SOME_BIG_NUMBER = 1000.0f; 49static const F32 SOME_BIG_NUMBER = 1000.0f;
50static const F32 SOME_BIG_NEG_NUMBER = -1000.0f; 50static const F32 SOME_BIG_NEG_NUMBER = -1000.0f;
51static const char* PARCEL_OWNERSHIP_STATUS_STRING[LLParcel::OS_COUNT] = 51static const std::string PARCEL_OWNERSHIP_STATUS_STRING[LLParcel::OS_COUNT+1] =
52{ 52{
53 "leased", 53 "leased",
54 "lease_pending", 54 "lease_pending",
55 "abandoned" 55 "abandoned",
56 "none"
56}; 57};
57 58
58// NOTE: Adding parcel categories also requires updating: 59// NOTE: Adding parcel categories also requires updating:
59// * newview/app_settings/floater_directory.xml category combobox 60// * newview/app_settings/floater_directory.xml category combobox
60// * Web site "create event" tools 61// * Web site "create event" tools
61static const char* PARCEL_CATEGORY_STRING[LLParcel::C_COUNT] = 62static const std::string PARCEL_CATEGORY_STRING[LLParcel::C_COUNT] =
62{ 63{
63 "none", 64 "none",
64 "linden", 65 "linden",
@@ -75,7 +76,7 @@ static const char* PARCEL_CATEGORY_STRING[LLParcel::C_COUNT] =
75 "stage", 76 "stage",
76 "other", 77 "other",
77}; 78};
78static const char* PARCEL_CATEGORY_UI_STRING[LLParcel::C_COUNT + 1] = 79static const std::string PARCEL_CATEGORY_UI_STRING[LLParcel::C_COUNT + 1] =
79{ 80{
80 "None", 81 "None",
81 "Linden Location", 82 "Linden Location",
@@ -94,7 +95,7 @@ static const char* PARCEL_CATEGORY_UI_STRING[LLParcel::C_COUNT + 1] =
94 "Any", // valid string for parcel searches 95 "Any", // valid string for parcel searches
95}; 96};
96 97
97static const char* PARCEL_ACTION_STRING[LLParcel::A_COUNT + 1] = 98static const std::string PARCEL_ACTION_STRING[LLParcel::A_COUNT + 1] =
98{ 99{
99 "create", 100 "create",
100 "release", 101 "release",
@@ -132,14 +133,14 @@ const U64 SEVEN_DAYS_IN_USEC = U64L(604800000000);
132const S32 EXTEND_GRACE_IF_MORE_THAN_SEC = 100000; 133const S32 EXTEND_GRACE_IF_MORE_THAN_SEC = 100000;
133 134
134 135
135const char* ownership_status_to_string(LLParcel::EOwnershipStatus status); 136const std::string& ownership_status_to_string(LLParcel::EOwnershipStatus status);
136LLParcel::EOwnershipStatus ownership_string_to_status(const char* s); 137LLParcel::EOwnershipStatus ownership_string_to_status(const std::string& s);
137//const char* revert_action_to_string(LLParcel::ESaleTimerExpireAction action); 138//const char* revert_action_to_string(LLParcel::ESaleTimerExpireAction action);
138//LLParcel::ESaleTimerExpireAction revert_string_to_action(const char* s); 139//LLParcel::ESaleTimerExpireAction revert_string_to_action(const char* s);
139const char* category_to_string(LLParcel::ECategory category); 140const std::string& category_to_string(LLParcel::ECategory category);
140const char* category_to_ui_string(LLParcel::ECategory category); 141const std::string& category_to_ui_string(LLParcel::ECategory category);
141LLParcel::ECategory category_string_to_category(const char* s); 142LLParcel::ECategory category_string_to_category(const std::string& s);
142LLParcel::ECategory category_ui_string_to_category(const char* s); 143LLParcel::ECategory category_ui_string_to_category(const std::string& s);
143 144
144LLParcel::LLParcel() 145LLParcel::LLParcel()
145{ 146{
@@ -207,12 +208,12 @@ void LLParcel::init(const LLUUID &owner_id,
207 setParcelFlag(PF_ALLOW_DAMAGE, damage); 208 setParcelFlag(PF_ALLOW_DAMAGE, damage);
208 209
209 mSalePrice = 10000; 210 mSalePrice = 10000;
210 setName(NULL); 211 setName(LLStringUtil::null);
211 setDesc(NULL); 212 setDesc(LLStringUtil::null);
212 setMusicURL(NULL); 213 setMusicURL(LLStringUtil::null);
213 setMediaURL(NULL); 214 setMediaURL(LLStringUtil::null);
214 setMediaDesc(NULL); 215 setMediaDesc(LLStringUtil::null);
215 setMediaType(NULL); 216 setMediaType(LLStringUtil::null);
216 mMediaID.setNull(); 217 mMediaID.setNull();
217 mMediaAutoScale = 0; 218 mMediaAutoScale = 0;
218 mMediaLoop = TRUE; 219 mMediaLoop = TRUE;
@@ -241,6 +242,9 @@ void LLParcel::init(const LLUUID &owner_id,
241 setSelectedPrimCount(0); 242 setSelectedPrimCount(0);
242 setTempPrimCount(0); 243 setTempPrimCount(0);
243 setCleanOtherTime(0); 244 setCleanOtherTime(0);
245 setRegionPushOverride(FALSE);
246 setRegionDenyAnonymousOverride(FALSE);
247 setRegionDenyAgeUnverifiedOverride(FALSE);
244 setParcelPrimBonus(parcel_object_bonus); 248 setParcelPrimBonus(parcel_object_bonus);
245 249
246 setPreviousOwnerID(LLUUID::null); 250 setPreviousOwnerID(LLUUID::null);
@@ -268,22 +272,7 @@ void LLParcel::overrideParcelFlags(U32 flags)
268{ 272{
269 mParcelFlags = flags; 273 mParcelFlags = flags;
270} 274}
271void set_std_string(const char* src, std::string& dest) 275void LLParcel::setName(const std::string& name)
272{
273 if(src)
274 {
275 dest.assign(src);
276 }
277 else
278 {
279#if (LL_LINUX && __GNUC__ < 3)
280 dest.assign(std::string(""));
281#else
282 dest.clear();
283#endif
284 }
285}
286void LLParcel::setName(const LLString& name)
287{ 276{
288 // The escaping here must match the escaping in the database 277 // The escaping here must match the escaping in the database
289 // abstraction layer. 278 // abstraction layer.
@@ -291,7 +280,7 @@ void LLParcel::setName(const LLString& name)
291 LLStringFn::replace_nonprintable(mName, LL_UNKNOWN_CHAR); 280 LLStringFn::replace_nonprintable(mName, LL_UNKNOWN_CHAR);
292} 281}
293 282
294void LLParcel::setDesc(const LLString& desc) 283void LLParcel::setDesc(const std::string& desc)
295{ 284{
296 // The escaping here must match the escaping in the database 285 // The escaping here must match the escaping in the database
297 // abstraction layer. 286 // abstraction layer.
@@ -299,7 +288,7 @@ void LLParcel::setDesc(const LLString& desc)
299 mDesc = rawstr_to_utf8(mDesc); 288 mDesc = rawstr_to_utf8(mDesc);
300} 289}
301 290
302void LLParcel::setMusicURL(const LLString& url) 291void LLParcel::setMusicURL(const std::string& url)
303{ 292{
304 mMusicURL = url; 293 mMusicURL = url;
305 // The escaping here must match the escaping in the database 294 // The escaping here must match the escaping in the database
@@ -309,7 +298,7 @@ void LLParcel::setMusicURL(const LLString& url)
309 LLStringFn::replace_nonprintable(mMusicURL, LL_UNKNOWN_CHAR); 298 LLStringFn::replace_nonprintable(mMusicURL, LL_UNKNOWN_CHAR);
310} 299}
311 300
312void LLParcel::setMediaURL(const LLString& url) 301void LLParcel::setMediaURL(const std::string& url)
313{ 302{
314 mMediaURL = url; 303 mMediaURL = url;
315 // The escaping here must match the escaping in the database 304 // The escaping here must match the escaping in the database
@@ -319,24 +308,24 @@ void LLParcel::setMediaURL(const LLString& url)
319 LLStringFn::replace_nonprintable(mMediaURL, LL_UNKNOWN_CHAR); 308 LLStringFn::replace_nonprintable(mMediaURL, LL_UNKNOWN_CHAR);
320} 309}
321 310
322void LLParcel::setMediaDesc(const char* desc) 311void LLParcel::setMediaDesc(const std::string& desc)
323{ 312{
324 // The escaping here must match the escaping in the database 313 // The escaping here must match the escaping in the database
325 // abstraction layer. 314 // abstraction layer.
326 set_std_string(desc, mMediaDesc); 315 mMediaDesc = desc;
327 mMediaDesc = rawstr_to_utf8(mMediaDesc); 316 mMediaDesc = rawstr_to_utf8(mMediaDesc);
328} 317}
329void LLParcel::setMediaType(const char* type) 318void LLParcel::setMediaType(const std::string& type)
330{ 319{
331 // The escaping here must match the escaping in the database 320 // The escaping here must match the escaping in the database
332 // abstraction layer. 321 // abstraction layer.
333 set_std_string(type, mMediaType); 322 mMediaType = type;
334 mMediaType = rawstr_to_utf8(mMediaType); 323 mMediaType = rawstr_to_utf8(mMediaType);
335 324
336 // This code attempts to preserve legacy movie functioning 325 // This code attempts to preserve legacy movie functioning
337 if(mMediaType.empty() && ! mMediaURL.empty()) 326 if(mMediaType.empty() && ! mMediaURL.empty())
338 { 327 {
339 setMediaType("video/vnd.secondlife.qt.legacy"); 328 setMediaType(std::string("video/vnd.secondlife.qt.legacy"));
340 } 329 }
341} 330}
342void LLParcel::setMediaWidth(S32 width) 331void LLParcel::setMediaWidth(S32 width)
@@ -575,7 +564,7 @@ BOOL LLParcel::importStream(std::istream& input_stream)
575 while (input_stream.good()) 564 while (input_stream.good())
576 { 565 {
577 skip_comments_and_emptyspace(input_stream); 566 skip_comments_and_emptyspace(input_stream);
578 LLString line, keyword, value; 567 std::string line, keyword, value;
579 get_line(line, input_stream, MAX_STRING); 568 get_line(line, input_stream, MAX_STRING);
580 get_keyword_and_value(keyword, value, line); 569 get_keyword_and_value(keyword, value, line);
581 570
@@ -585,19 +574,19 @@ BOOL LLParcel::importStream(std::istream& input_stream)
585 } 574 }
586 else if ("parcel_id" == keyword) 575 else if ("parcel_id" == keyword)
587 { 576 {
588 mID.set(value.c_str()); 577 mID.set(value);
589 } 578 }
590 else if ("status" == keyword) 579 else if ("status" == keyword)
591 { 580 {
592 mStatus = ownership_string_to_status(value.c_str()); 581 mStatus = ownership_string_to_status(value);
593 } 582 }
594 else if ("category" == keyword) 583 else if ("category" == keyword)
595 { 584 {
596 mCategory = category_string_to_category(value.c_str()); 585 mCategory = category_string_to_category(value);
597 } 586 }
598 else if ("local_id" == keyword) 587 else if ("local_id" == keyword)
599 { 588 {
600 LLString::convertToS32(value, mLocalID); 589 LLStringUtil::convertToS32(value, mLocalID);
601 } 590 }
602 else if ("name" == keyword) 591 else if ("name" == keyword)
603 { 592 {
@@ -617,65 +606,65 @@ BOOL LLParcel::importStream(std::istream& input_stream)
617 } 606 }
618 else if ("media_desc" == keyword) 607 else if ("media_desc" == keyword)
619 { 608 {
620 setMediaDesc( value.c_str() ); 609 setMediaDesc( value );
621 } 610 }
622 else if ("media_type" == keyword) 611 else if ("media_type" == keyword)
623 { 612 {
624 setMediaType( value.c_str() ); 613 setMediaType( value );
625 } 614 }
626 else if ("media_width" == keyword) 615 else if ("media_width" == keyword)
627 { 616 {
628 S32 width; 617 S32 width;
629 LLString::convertToS32(value, width); 618 LLStringUtil::convertToS32(value, width);
630 setMediaWidth( width ); 619 setMediaWidth( width );
631 } 620 }
632 else if ("media_height" == keyword) 621 else if ("media_height" == keyword)
633 { 622 {
634 S32 height; 623 S32 height;
635 LLString::convertToS32(value, height); 624 LLStringUtil::convertToS32(value, height);
636 setMediaHeight( height ); 625 setMediaHeight( height );
637 } 626 }
638 else if ("media_id" == keyword) 627 else if ("media_id" == keyword)
639 { 628 {
640 mMediaID.set( value.c_str() ); 629 mMediaID.set( value );
641 } 630 }
642 else if ("media_auto_scale" == keyword) 631 else if ("media_auto_scale" == keyword)
643 { 632 {
644 LLString::convertToU8(value, mMediaAutoScale); 633 LLStringUtil::convertToU8(value, mMediaAutoScale);
645 } 634 }
646 else if ("media_loop" == keyword) 635 else if ("media_loop" == keyword)
647 { 636 {
648 LLString::convertToU8(value, mMediaLoop); 637 LLStringUtil::convertToU8(value, mMediaLoop);
649 } 638 }
650 else if ("obscure_media" == keyword) 639 else if ("obscure_media" == keyword)
651 { 640 {
652 LLString::convertToU8(value, mObscureMedia); 641 LLStringUtil::convertToU8(value, mObscureMedia);
653 } 642 }
654 else if ("obscure_music" == keyword) 643 else if ("obscure_music" == keyword)
655 { 644 {
656 LLString::convertToU8(value, mObscureMusic); 645 LLStringUtil::convertToU8(value, mObscureMusic);
657 } 646 }
658 else if ("owner_id" == keyword) 647 else if ("owner_id" == keyword)
659 { 648 {
660 mOwnerID.set( value.c_str() ); 649 mOwnerID.set( value );
661 } 650 }
662 else if ("group_owned" == keyword) 651 else if ("group_owned" == keyword)
663 { 652 {
664 LLString::convertToBOOL(value, mGroupOwned); 653 LLStringUtil::convertToBOOL(value, mGroupOwned);
665 } 654 }
666 else if ("clean_other_time" == keyword) 655 else if ("clean_other_time" == keyword)
667 { 656 {
668 S32 time; 657 S32 time;
669 LLString::convertToS32(value, time); 658 LLStringUtil::convertToS32(value, time);
670 setCleanOtherTime(time); 659 setCleanOtherTime(time);
671 } 660 }
672 else if ("auth_buyer_id" == keyword) 661 else if ("auth_buyer_id" == keyword)
673 { 662 {
674 mAuthBuyerID.set(value.c_str()); 663 mAuthBuyerID.set(value);
675 } 664 }
676 else if ("snapshot_id" == keyword) 665 else if ("snapshot_id" == keyword)
677 { 666 {
678 mSnapshotID.set(value.c_str()); 667 mSnapshotID.set(value);
679 } 668 }
680 else if ("user_location" == keyword) 669 else if ("user_location" == keyword)
681 { 670 {
@@ -694,7 +683,7 @@ BOOL LLParcel::importStream(std::istream& input_stream)
694 else if ("landing_type" == keyword) 683 else if ("landing_type" == keyword)
695 { 684 {
696 S32 landing_type = 0; 685 S32 landing_type = 0;
697 LLString::convertToS32(value, landing_type); 686 LLStringUtil::convertToS32(value, landing_type);
698 mLandingType = (ELandingType) landing_type; 687 mLandingType = (ELandingType) landing_type;
699 } 688 }
700 else if ("join_neighbors" == keyword) 689 else if ("join_neighbors" == keyword)
@@ -703,7 +692,7 @@ BOOL LLParcel::importStream(std::istream& input_stream)
703 } 692 }
704 else if ("revert_sale" == keyword) 693 else if ("revert_sale" == keyword)
705 { 694 {
706 LLString::convertToS32(value, secs_until_revert); 695 LLStringUtil::convertToS32(value, secs_until_revert);
707 if (secs_until_revert > 0) 696 if (secs_until_revert > 0)
708 { 697 {
709 mSaleTimerExpires.start(); 698 mSaleTimerExpires.start();
@@ -712,7 +701,7 @@ BOOL LLParcel::importStream(std::istream& input_stream)
712 } 701 }
713 else if("extended_grace" == keyword) 702 else if("extended_grace" == keyword)
714 { 703 {
715 LLString::convertToS32(value, mGraceExtension); 704 LLStringUtil::convertToS32(value, mGraceExtension);
716 } 705 }
717 else if ("user_list_type" == keyword) 706 else if ("user_list_type" == keyword)
718 { 707 {
@@ -720,147 +709,147 @@ BOOL LLParcel::importStream(std::istream& input_stream)
720 } 709 }
721 else if("auction_id" == keyword) 710 else if("auction_id" == keyword)
722 { 711 {
723 LLString::convertToU32(value, mAuctionID); 712 LLStringUtil::convertToU32(value, mAuctionID);
724 } 713 }
725 else if ("allow_modify" == keyword) 714 else if ("allow_modify" == keyword)
726 { 715 {
727 LLString::convertToU32(value, setting); 716 LLStringUtil::convertToU32(value, setting);
728 setParcelFlag(PF_CREATE_OBJECTS, setting); 717 setParcelFlag(PF_CREATE_OBJECTS, setting);
729 } 718 }
730 else if ("allow_group_modify" == keyword) 719 else if ("allow_group_modify" == keyword)
731 { 720 {
732 LLString::convertToU32(value, setting); 721 LLStringUtil::convertToU32(value, setting);
733 setParcelFlag(PF_CREATE_GROUP_OBJECTS, setting); 722 setParcelFlag(PF_CREATE_GROUP_OBJECTS, setting);
734 } 723 }
735 else if ("allow_all_object_entry" == keyword) 724 else if ("allow_all_object_entry" == keyword)
736 { 725 {
737 LLString::convertToU32(value, setting); 726 LLStringUtil::convertToU32(value, setting);
738 setParcelFlag(PF_ALLOW_ALL_OBJECT_ENTRY, setting); 727 setParcelFlag(PF_ALLOW_ALL_OBJECT_ENTRY, setting);
739 } 728 }
740 else if ("allow_group_object_entry" == keyword) 729 else if ("allow_group_object_entry" == keyword)
741 { 730 {
742 LLString::convertToU32(value, setting); 731 LLStringUtil::convertToU32(value, setting);
743 setParcelFlag(PF_ALLOW_GROUP_OBJECT_ENTRY, setting); 732 setParcelFlag(PF_ALLOW_GROUP_OBJECT_ENTRY, setting);
744 } 733 }
745 else if ("allow_deed_to_group" == keyword) 734 else if ("allow_deed_to_group" == keyword)
746 { 735 {
747 LLString::convertToU32(value, setting); 736 LLStringUtil::convertToU32(value, setting);
748 setParcelFlag(PF_ALLOW_DEED_TO_GROUP, setting); 737 setParcelFlag(PF_ALLOW_DEED_TO_GROUP, setting);
749 } 738 }
750 else if("contribute_with_deed" == keyword) 739 else if("contribute_with_deed" == keyword)
751 { 740 {
752 LLString::convertToU32(value, setting); 741 LLStringUtil::convertToU32(value, setting);
753 setParcelFlag(PF_CONTRIBUTE_WITH_DEED, setting); 742 setParcelFlag(PF_CONTRIBUTE_WITH_DEED, setting);
754 } 743 }
755 else if ("allow_terraform" == keyword) 744 else if ("allow_terraform" == keyword)
756 { 745 {
757 LLString::convertToU32(value, setting); 746 LLStringUtil::convertToU32(value, setting);
758 setParcelFlag(PF_ALLOW_TERRAFORM, setting); 747 setParcelFlag(PF_ALLOW_TERRAFORM, setting);
759 } 748 }
760 else if ("allow_damage" == keyword) 749 else if ("allow_damage" == keyword)
761 { 750 {
762 LLString::convertToU32(value, setting); 751 LLStringUtil::convertToU32(value, setting);
763 setParcelFlag(PF_ALLOW_DAMAGE, setting); 752 setParcelFlag(PF_ALLOW_DAMAGE, setting);
764 } 753 }
765 else if ("allow_fly" == keyword) 754 else if ("allow_fly" == keyword)
766 { 755 {
767 LLString::convertToU32(value, setting); 756 LLStringUtil::convertToU32(value, setting);
768 setParcelFlag(PF_ALLOW_FLY, setting); 757 setParcelFlag(PF_ALLOW_FLY, setting);
769 } 758 }
770 else if ("allow_landmark" == keyword) 759 else if ("allow_landmark" == keyword)
771 { 760 {
772 LLString::convertToU32(value, setting); 761 LLStringUtil::convertToU32(value, setting);
773 setParcelFlag(PF_ALLOW_LANDMARK, setting); 762 setParcelFlag(PF_ALLOW_LANDMARK, setting);
774 } 763 }
775 else if ("sound_local" == keyword) 764 else if ("sound_local" == keyword)
776 { 765 {
777 LLString::convertToU32(value, setting); 766 LLStringUtil::convertToU32(value, setting);
778 setParcelFlag(PF_SOUND_LOCAL, setting); 767 setParcelFlag(PF_SOUND_LOCAL, setting);
779 } 768 }
780 else if ("allow_group_scripts" == keyword) 769 else if ("allow_group_scripts" == keyword)
781 { 770 {
782 LLString::convertToU32(value, setting); 771 LLStringUtil::convertToU32(value, setting);
783 setParcelFlag(PF_ALLOW_GROUP_SCRIPTS, setting); 772 setParcelFlag(PF_ALLOW_GROUP_SCRIPTS, setting);
784 } 773 }
785 else if ("allow_voice_chat" == keyword) 774 else if ("allow_voice_chat" == keyword)
786 { 775 {
787 LLString::convertToU32(value, setting); 776 LLStringUtil::convertToU32(value, setting);
788 setParcelFlag(PF_ALLOW_VOICE_CHAT, setting); 777 setParcelFlag(PF_ALLOW_VOICE_CHAT, setting);
789 } 778 }
790 else if ("use_estate_voice_chan" == keyword) 779 else if ("use_estate_voice_chan" == keyword)
791 { 780 {
792 LLString::convertToU32(value, setting); 781 LLStringUtil::convertToU32(value, setting);
793 setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, setting); 782 setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, setting);
794 } 783 }
795 else if ("allow_scripts" == keyword) 784 else if ("allow_scripts" == keyword)
796 { 785 {
797 LLString::convertToU32(value, setting); 786 LLStringUtil::convertToU32(value, setting);
798 setParcelFlag(PF_ALLOW_OTHER_SCRIPTS, setting); 787 setParcelFlag(PF_ALLOW_OTHER_SCRIPTS, setting);
799 } 788 }
800 else if ("for_sale" == keyword) 789 else if ("for_sale" == keyword)
801 { 790 {
802 LLString::convertToU32(value, setting); 791 LLStringUtil::convertToU32(value, setting);
803 setParcelFlag(PF_FOR_SALE, setting); 792 setParcelFlag(PF_FOR_SALE, setting);
804 } 793 }
805 else if ("sell_w_objects" == keyword) 794 else if ("sell_w_objects" == keyword)
806 { 795 {
807 LLString::convertToU32(value, setting); 796 LLStringUtil::convertToU32(value, setting);
808 setParcelFlag(PF_SELL_PARCEL_OBJECTS, setting); 797 setParcelFlag(PF_SELL_PARCEL_OBJECTS, setting);
809 } 798 }
810 else if ("use_pass_list" == keyword) 799 else if ("use_pass_list" == keyword)
811 { 800 {
812 LLString::convertToU32(value, setting); 801 LLStringUtil::convertToU32(value, setting);
813 setParcelFlag(PF_USE_PASS_LIST, setting); 802 setParcelFlag(PF_USE_PASS_LIST, setting);
814 } 803 }
815 else if ("show_directory" == keyword) 804 else if ("show_directory" == keyword)
816 { 805 {
817 LLString::convertToU32(value, setting); 806 LLStringUtil::convertToU32(value, setting);
818 setParcelFlag(PF_SHOW_DIRECTORY, setting); 807 setParcelFlag(PF_SHOW_DIRECTORY, setting);
819 } 808 }
820 else if ("allow_publish" == keyword) 809 else if ("allow_publish" == keyword)
821 { 810 {
822 LLString::convertToU32(value, setting); 811 LLStringUtil::convertToU32(value, setting);
823 setParcelFlag(PF_ALLOW_PUBLISH, setting); 812 setParcelFlag(PF_ALLOW_PUBLISH, setting);
824 } 813 }
825 else if ("mature_publish" == keyword) 814 else if ("mature_publish" == keyword)
826 { 815 {
827 LLString::convertToU32(value, setting); 816 LLStringUtil::convertToU32(value, setting);
828 setParcelFlag(PF_MATURE_PUBLISH, setting); 817 setParcelFlag(PF_MATURE_PUBLISH, setting);
829 } 818 }
830 else if ("claim_date" == keyword) 819 else if ("claim_date" == keyword)
831 { 820 {
832 // BUG: This will fail when time rolls over in 2038. 821 // BUG: This will fail when time rolls over in 2038.
833 S32 time; 822 S32 time;
834 LLString::convertToS32(value, time); 823 LLStringUtil::convertToS32(value, time);
835 mClaimDate = time; 824 mClaimDate = time;
836 } 825 }
837 else if ("claim_price" == keyword) 826 else if ("claim_price" == keyword)
838 { 827 {
839 LLString::convertToS32(value, mClaimPricePerMeter); 828 LLStringUtil::convertToS32(value, mClaimPricePerMeter);
840 } 829 }
841 else if ("rent_price" == keyword) 830 else if ("rent_price" == keyword)
842 { 831 {
843 LLString::convertToS32(value, mRentPricePerMeter); 832 LLStringUtil::convertToS32(value, mRentPricePerMeter);
844 } 833 }
845 else if ("discount_rate" == keyword) 834 else if ("discount_rate" == keyword)
846 { 835 {
847 LLString::convertToF32(value, mDiscountRate); 836 LLStringUtil::convertToF32(value, mDiscountRate);
848 } 837 }
849 else if ("draw_distance" == keyword) 838 else if ("draw_distance" == keyword)
850 { 839 {
851 LLString::convertToF32(value, mDrawDistance); 840 LLStringUtil::convertToF32(value, mDrawDistance);
852 } 841 }
853 else if ("sale_price" == keyword) 842 else if ("sale_price" == keyword)
854 { 843 {
855 LLString::convertToS32(value, mSalePrice); 844 LLStringUtil::convertToS32(value, mSalePrice);
856 } 845 }
857 else if ("pass_price" == keyword) 846 else if ("pass_price" == keyword)
858 { 847 {
859 LLString::convertToS32(value, mPassPrice); 848 LLStringUtil::convertToS32(value, mPassPrice);
860 } 849 }
861 else if ("pass_hours" == keyword) 850 else if ("pass_hours" == keyword)
862 { 851 {
863 LLString::convertToF32(value, mPassHours); 852 LLStringUtil::convertToF32(value, mPassHours);
864 } 853 }
865 else if ("box" == keyword) 854 else if ("box" == keyword)
866 { 855 {
@@ -873,17 +862,17 @@ BOOL LLParcel::importStream(std::istream& input_stream)
873 } 862 }
874 else if ("use_access_group" == keyword) 863 else if ("use_access_group" == keyword)
875 { 864 {
876 LLString::convertToU32(value, setting); 865 LLStringUtil::convertToU32(value, setting);
877 setParcelFlag(PF_USE_ACCESS_GROUP, setting); 866 setParcelFlag(PF_USE_ACCESS_GROUP, setting);
878 } 867 }
879 else if ("use_access_list" == keyword) 868 else if ("use_access_list" == keyword)
880 { 869 {
881 LLString::convertToU32(value, setting); 870 LLStringUtil::convertToU32(value, setting);
882 setParcelFlag(PF_USE_ACCESS_LIST, setting); 871 setParcelFlag(PF_USE_ACCESS_LIST, setting);
883 } 872 }
884 else if ("use_ban_list" == keyword) 873 else if ("use_ban_list" == keyword)
885 { 874 {
886 LLString::convertToU32(value, setting); 875 LLStringUtil::convertToU32(value, setting);
887 setParcelFlag(PF_USE_BAN_LIST, setting); 876 setParcelFlag(PF_USE_BAN_LIST, setting);
888 } 877 }
889 else if ("group_name" == keyword) 878 else if ("group_name" == keyword)
@@ -892,7 +881,7 @@ BOOL LLParcel::importStream(std::istream& input_stream)
892 } 881 }
893 else if ("group_id" == keyword) 882 else if ("group_id" == keyword)
894 { 883 {
895 mGroupID.set( value.c_str() ); 884 mGroupID.set( value );
896 } 885 }
897 // TODO: DEPRECATED FLAG 886 // TODO: DEPRECATED FLAG
898 // Flag removed from simstate files in 1.11.1 887 // Flag removed from simstate files in 1.11.1
@@ -900,7 +889,7 @@ BOOL LLParcel::importStream(std::istream& input_stream)
900 // no longer exists anywhere in simstate files. 889 // no longer exists anywhere in simstate files.
901 else if ("require_identified" == keyword) 890 else if ("require_identified" == keyword)
902 { 891 {
903 // LLString::convertToU32(value, setting); 892 // LLStringUtil::convertToU32(value, setting);
904 // setParcelFlag(PF_DENY_ANONYMOUS, setting); 893 // setParcelFlag(PF_DENY_ANONYMOUS, setting);
905 } 894 }
906 // TODO: DEPRECATED FLAG 895 // TODO: DEPRECATED FLAG
@@ -909,39 +898,39 @@ BOOL LLParcel::importStream(std::istream& input_stream)
909 // no longer exists anywhere in simstate files. 898 // no longer exists anywhere in simstate files.
910 else if ("require_transacted" == keyword) 899 else if ("require_transacted" == keyword)
911 { 900 {
912 // LLString::convertToU32(value, setting); 901 // LLStringUtil::convertToU32(value, setting);
913 // setParcelFlag(PF_DENY_ANONYMOUS, setting); 902 // setParcelFlag(PF_DENY_ANONYMOUS, setting);
914 // setParcelFlag(PF_DENY_IDENTIFIED, setting); 903 // setParcelFlag(PF_DENY_IDENTIFIED, setting);
915 } 904 }
916 else if ("restrict_pushobject" == keyword) 905 else if ("restrict_pushobject" == keyword)
917 { 906 {
918 LLString::convertToU32(value, setting); 907 LLStringUtil::convertToU32(value, setting);
919 setParcelFlag(PF_RESTRICT_PUSHOBJECT, setting); 908 setParcelFlag(PF_RESTRICT_PUSHOBJECT, setting);
920 } 909 }
921 else if ("deny_anonymous" == keyword) 910 else if ("deny_anonymous" == keyword)
922 { 911 {
923 LLString::convertToU32(value, setting); 912 LLStringUtil::convertToU32(value, setting);
924 setParcelFlag(PF_DENY_ANONYMOUS, setting); 913 setParcelFlag(PF_DENY_ANONYMOUS, setting);
925 } 914 }
926 else if ("deny_identified" == keyword) 915 else if ("deny_identified" == keyword)
927 { 916 {
928// LLString::convertToU32(value, setting); 917// LLStringUtil::convertToU32(value, setting);
929// setParcelFlag(PF_DENY_IDENTIFIED, setting); 918// setParcelFlag(PF_DENY_IDENTIFIED, setting);
930 } 919 }
931 else if ("deny_transacted" == keyword) 920 else if ("deny_transacted" == keyword)
932 { 921 {
933// LLString::convertToU32(value, setting); 922// LLStringUtil::convertToU32(value, setting);
934// setParcelFlag(PF_DENY_TRANSACTED, setting); 923// setParcelFlag(PF_DENY_TRANSACTED, setting);
935 } 924 }
936 else if ("deny_age_unverified" == keyword) 925 else if ("deny_age_unverified" == keyword)
937 { 926 {
938 LLString::convertToU32(value, setting); 927 LLStringUtil::convertToU32(value, setting);
939 setParcelFlag(PF_DENY_AGEUNVERIFIED, setting); 928 setParcelFlag(PF_DENY_AGEUNVERIFIED, setting);
940 } 929 }
941 else if ("access_list" == keyword) 930 else if ("access_list" == keyword)
942 { 931 {
943 S32 entry_count = 0; 932 S32 entry_count = 0;
944 LLString::convertToS32(value, entry_count); 933 LLStringUtil::convertToS32(value, entry_count);
945 for (S32 i = 0; i < entry_count; i++) 934 for (S32 i = 0; i < entry_count; i++)
946 { 935 {
947 LLAccessEntry entry; 936 LLAccessEntry entry;
@@ -954,7 +943,7 @@ BOOL LLParcel::importStream(std::istream& input_stream)
954 else if ("ban_list" == keyword) 943 else if ("ban_list" == keyword)
955 { 944 {
956 S32 entry_count = 0; 945 S32 entry_count = 0;
957 LLString::convertToS32(value, entry_count); 946 LLStringUtil::convertToS32(value, entry_count);
958 for (S32 i = 0; i < entry_count; i++) 947 for (S32 i = 0; i < entry_count; i++)
959 { 948 {
960 LLAccessEntry entry; 949 LLAccessEntry entry;
@@ -968,7 +957,7 @@ BOOL LLParcel::importStream(std::istream& input_stream)
968 { 957 {
969 /* 958 /*
970 S32 entry_count = 0; 959 S32 entry_count = 0;
971 LLString::convertToS32(value, entry_count); 960 LLStringUtil::convertToS32(value, entry_count);
972 for (S32 i = 0; i < entry_count; i++) 961 for (S32 i = 0; i < entry_count; i++)
973 { 962 {
974 LLAccessEntry entry; 963 LLAccessEntry entry;
@@ -982,7 +971,7 @@ BOOL LLParcel::importStream(std::istream& input_stream)
982 { 971 {
983 // legacy - put into access list 972 // legacy - put into access list
984 S32 entry_count = 0; 973 S32 entry_count = 0;
985 LLString::convertToS32(value, entry_count); 974 LLStringUtil::convertToS32(value, entry_count);
986 for (S32 i = 0; i < entry_count; i++) 975 for (S32 i = 0; i < entry_count; i++)
987 { 976 {
988 LLAccessEntry entry; 977 LLAccessEntry entry;
@@ -1058,7 +1047,7 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr
1058 while (input_stream.good()) 1047 while (input_stream.good())
1059 { 1048 {
1060 skip_comments_and_emptyspace(input_stream); 1049 skip_comments_and_emptyspace(input_stream);
1061 LLString line, keyword, value; 1050 std::string line, keyword, value;
1062 get_line(line, input_stream, MAX_STRING); 1051 get_line(line, input_stream, MAX_STRING);
1063 get_keyword_and_value(keyword, value, line); 1052 get_keyword_and_value(keyword, value, line);
1064 1053
@@ -1068,7 +1057,7 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr
1068 } 1057 }
1069 else if ("id" == keyword) 1058 else if ("id" == keyword)
1070 { 1059 {
1071 entry->mID.set( value.c_str() ); 1060 entry->mID.set( value );
1072 } 1061 }
1073 else if ("name" == keyword) 1062 else if ("name" == keyword)
1074 { 1063 {
@@ -1077,13 +1066,13 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr
1077 else if ("time" == keyword) 1066 else if ("time" == keyword)
1078 { 1067 {
1079 S32 when; 1068 S32 when;
1080 LLString::convertToS32(value, when); 1069 LLStringUtil::convertToS32(value, when);
1081 entry->mTime = when; 1070 entry->mTime = when;
1082 } 1071 }
1083 else if ("flags" == keyword) 1072 else if ("flags" == keyword)
1084 { 1073 {
1085 U32 setting; 1074 U32 setting;
1086 LLString::convertToU32(value, setting); 1075 LLStringUtil::convertToU32(value, setting);
1087 entry->mFlags = setting; 1076 entry->mFlags = setting;
1088 } 1077 }
1089 else 1078 else
@@ -1098,7 +1087,7 @@ BOOL LLParcel::importAccessEntry(std::istream& input_stream, LLAccessEntry* entr
1098BOOL LLParcel::exportStream(std::ostream& output_stream) 1087BOOL LLParcel::exportStream(std::ostream& output_stream)
1099{ 1088{
1100 S32 setting; 1089 S32 setting;
1101 char id_string[MAX_STRING]; /* Flawfinder: ignore */ 1090 std::string id_string;
1102 1091
1103 std::ios::fmtflags old_flags = output_stream.flags(); 1092 std::ios::fmtflags old_flags = output_stream.flags();
1104 output_stream.setf(std::ios::showpoint); 1093 output_stream.setf(std::ios::showpoint);
@@ -1201,8 +1190,10 @@ BOOL LLParcel::exportStream(std::ostream& output_stream)
1201 output_stream << "\t\t sound_local " << (getSoundLocal() ? 1 : 0) << "\n"; 1190 output_stream << "\t\t sound_local " << (getSoundLocal() ? 1 : 0) << "\n";
1202 output_stream << "\t\t allow_scripts " << (getAllowOtherScripts() ? 1 : 0) << "\n"; 1191 output_stream << "\t\t allow_scripts " << (getAllowOtherScripts() ? 1 : 0) << "\n";
1203 output_stream << "\t\t allow_group_scripts " << (getAllowGroupScripts() ? 1 : 0) << "\n"; 1192 output_stream << "\t\t allow_group_scripts " << (getAllowGroupScripts() ? 1 : 0) << "\n";
1204 output_stream << "\t\t allow_voice_chat " << (getVoiceEnabled() ? 1 : 0) << "\n"; 1193 output_stream << "\t\t use_estate_voice_chan " << (getParcelFlagUseEstateVoiceChannel() ? 1 : 0) << "\n";
1205 output_stream << "\t\t use_estate_voice_chan " << (getVoiceUseEstateChannel() ? 1 : 0) << "\n"; 1194
1195 output_stream << "\t\t allow_voice_chat " << (getParcelFlagAllowVoice() ? 1 : 0) << "\n";
1196 output_stream << "\t\t use_estate_voice_chan " << (getParcelFlagUseEstateVoiceChannel() ? 1 : 0) << "\n";
1206 output_stream << "\t\t for_sale " << (getForSale() ? 1 : 0) << "\n"; 1197 output_stream << "\t\t for_sale " << (getForSale() ? 1 : 0) << "\n";
1207 output_stream << "\t\t sell_w_objects " << (getSellWithObjects() ? 1 : 0) << "\n"; 1198 output_stream << "\t\t sell_w_objects " << (getSellWithObjects() ? 1 : 0) << "\n";
1208 output_stream << "\t\t draw_distance " << mDrawDistance << "\n"; 1199 output_stream << "\t\t draw_distance " << mDrawDistance << "\n";
@@ -1374,17 +1365,17 @@ void LLParcel::packMessage(LLSD& msg)
1374 1365
1375void LLParcel::unpackMessage(LLMessageSystem* msg) 1366void LLParcel::unpackMessage(LLMessageSystem* msg)
1376{ 1367{
1377 char buffer[256]; /* Flawfinder: ignore */ 1368 std::string buffer;
1378 1369
1379 msg->getU32Fast( _PREHASH_ParcelData,_PREHASH_ParcelFlags, mParcelFlags ); 1370 msg->getU32Fast( _PREHASH_ParcelData,_PREHASH_ParcelFlags, mParcelFlags );
1380 msg->getS32Fast( _PREHASH_ParcelData,_PREHASH_SalePrice, mSalePrice ); 1371 msg->getS32Fast( _PREHASH_ParcelData,_PREHASH_SalePrice, mSalePrice );
1381 msg->getStringFast( _PREHASH_ParcelData,_PREHASH_Name, 256, buffer ); 1372 msg->getStringFast( _PREHASH_ParcelData,_PREHASH_Name, buffer );
1382 setName(buffer); 1373 setName(buffer);
1383 msg->getStringFast( _PREHASH_ParcelData,_PREHASH_Desc, 256, buffer ); 1374 msg->getStringFast( _PREHASH_ParcelData,_PREHASH_Desc, buffer );
1384 setDesc(buffer); 1375 setDesc(buffer);
1385 msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MusicURL, 256, buffer ); 1376 msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MusicURL, buffer );
1386 setMusicURL(buffer); 1377 setMusicURL(buffer);
1387 msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, 256, buffer ); 1378 msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer );
1388 setMediaURL(buffer); 1379 setMediaURL(buffer);
1389 1380
1390 // non-optimized version 1381 // non-optimized version
@@ -1409,9 +1400,9 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
1409 // Note: the message has been converted to TCP 1400 // Note: the message has been converted to TCP
1410 if(msg->getNumberOfBlocks("MediaData") > 0) 1401 if(msg->getNumberOfBlocks("MediaData") > 0)
1411 { 1402 {
1412 msg->getString("MediaData", "MediaDesc", 256, buffer); 1403 msg->getString("MediaData", "MediaDesc", buffer);
1413 setMediaDesc(buffer); 1404 setMediaDesc(buffer);
1414 msg->getString("MediaData", "MediaType", 256, buffer); 1405 msg->getString("MediaData", "MediaType", buffer);
1415 setMediaType(buffer); 1406 setMediaType(buffer);
1416 msg->getS32("MediaData", "MediaWidth", mMediaWidth); 1407 msg->getS32("MediaData", "MediaWidth", mMediaWidth);
1417 msg->getS32("MediaData", "MediaHeight", mMediaHeight); 1408 msg->getS32("MediaData", "MediaHeight", mMediaHeight);
@@ -1421,8 +1412,8 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
1421 } 1412 }
1422 else 1413 else
1423 { 1414 {
1424 setMediaType("video/vnd.secondlife.qt.legacy"); 1415 setMediaType(std::string("video/vnd.secondlife.qt.legacy"));
1425 setMediaDesc("No Description available without Server Upgrade"); 1416 setMediaDesc(std::string("No Description available without Server Upgrade"));
1426 mMediaLoop = true; 1417 mMediaLoop = true;
1427 mObscureMedia = true; 1418 mObscureMedia = true;
1428 mObscureMusic = true; 1419 mObscureMusic = true;
@@ -1685,37 +1676,37 @@ BOOL LLParcel::removeFromBanList(const LLUUID& agent_id)
1685} 1676}
1686 1677
1687// static 1678// static
1688const char* LLParcel::getOwnershipStatusString(EOwnershipStatus status) 1679const std::string& LLParcel::getOwnershipStatusString(EOwnershipStatus status)
1689{ 1680{
1690 return ownership_status_to_string(status); 1681 return ownership_status_to_string(status);
1691} 1682}
1692 1683
1693// static 1684// static
1694const char* LLParcel::getCategoryString(ECategory category) 1685const std::string& LLParcel::getCategoryString(ECategory category)
1695{ 1686{
1696 return category_to_string(category); 1687 return category_to_string(category);
1697} 1688}
1698 1689
1699// static 1690// static
1700const char* LLParcel::getCategoryUIString(ECategory category) 1691const std::string& LLParcel::getCategoryUIString(ECategory category)
1701{ 1692{
1702 return category_to_ui_string(category); 1693 return category_to_ui_string(category);
1703} 1694}
1704 1695
1705// static 1696// static
1706LLParcel::ECategory LLParcel::getCategoryFromString(const char* string) 1697LLParcel::ECategory LLParcel::getCategoryFromString(const std::string& string)
1707{ 1698{
1708 return category_string_to_category(string); 1699 return category_string_to_category(string);
1709} 1700}
1710 1701
1711// static 1702// static
1712LLParcel::ECategory LLParcel::getCategoryFromUIString(const char* string) 1703LLParcel::ECategory LLParcel::getCategoryFromUIString(const std::string& string)
1713{ 1704{
1714 return category_ui_string_to_category(string); 1705 return category_ui_string_to_category(string);
1715} 1706}
1716 1707
1717// static 1708// static
1718const char* LLParcel::getActionString(LLParcel::EAction action) 1709const std::string& LLParcel::getActionString(LLParcel::EAction action)
1719{ 1710{
1720 S32 index = 0; 1711 S32 index = 0;
1721 if((action >= 0) && (action < LLParcel::A_COUNT)) 1712 if((action >= 0) && (action < LLParcel::A_COUNT))
@@ -1848,19 +1839,19 @@ BOOL LLParcel::isBuyerAuthorized(const LLUUID& buyer_id) const
1848void LLParcel::clearParcel() 1839void LLParcel::clearParcel()
1849{ 1840{
1850 overrideParcelFlags(PF_DEFAULT); 1841 overrideParcelFlags(PF_DEFAULT);
1851 setName(NULL); 1842 setName(LLStringUtil::null);
1852 setDesc(NULL); 1843 setDesc(LLStringUtil::null);
1853 setMediaURL(NULL); 1844 setMediaURL(LLStringUtil::null);
1854 setMediaType(NULL); 1845 setMediaType(LLStringUtil::null);
1855 setMediaID(LLUUID::null); 1846 setMediaID(LLUUID::null);
1856 setMediaDesc(NULL); 1847 setMediaDesc(LLStringUtil::null);
1857 setMediaAutoScale(0); 1848 setMediaAutoScale(0);
1858 setMediaLoop(TRUE); 1849 setMediaLoop(TRUE);
1859 mObscureMedia = 1; 1850 mObscureMedia = 1;
1860 mObscureMusic = 1; 1851 mObscureMusic = 1;
1861 mMediaWidth = 0; 1852 mMediaWidth = 0;
1862 mMediaHeight = 0; 1853 mMediaHeight = 0;
1863 setMusicURL(NULL); 1854 setMusicURL(LLStringUtil::null);
1864 setInEscrow(FALSE); 1855 setInEscrow(FALSE);
1865 setAuthorizedBuyerID(LLUUID::null); 1856 setAuthorizedBuyerID(LLUUID::null);
1866 setCategory(C_NONE); 1857 setCategory(C_NONE);
@@ -1884,20 +1875,20 @@ void LLParcel::dump()
1884 llinfos << " desc <" << mDesc << ">" << llendl; 1875 llinfos << " desc <" << mDesc << ">" << llendl;
1885} 1876}
1886 1877
1887const char* ownership_status_to_string(LLParcel::EOwnershipStatus status) 1878const std::string& ownership_status_to_string(LLParcel::EOwnershipStatus status)
1888{ 1879{
1889 if(status >= 0 && status < LLParcel::OS_COUNT) 1880 if(status >= 0 && status < LLParcel::OS_COUNT)
1890 { 1881 {
1891 return PARCEL_OWNERSHIP_STATUS_STRING[status]; 1882 return PARCEL_OWNERSHIP_STATUS_STRING[status];
1892 } 1883 }
1893 return "none"; 1884 return PARCEL_OWNERSHIP_STATUS_STRING[LLParcel::OS_COUNT];
1894} 1885}
1895 1886
1896LLParcel::EOwnershipStatus ownership_string_to_status(const char* s) 1887LLParcel::EOwnershipStatus ownership_string_to_status(const std::string& s)
1897{ 1888{
1898 for(S32 i = 0; i < LLParcel::OS_COUNT; ++i) 1889 for(S32 i = 0; i < LLParcel::OS_COUNT; ++i)
1899 { 1890 {
1900 if(0 == strcmp(s, PARCEL_OWNERSHIP_STATUS_STRING[i])) 1891 if(s == PARCEL_OWNERSHIP_STATUS_STRING[i])
1901 { 1892 {
1902 return (LLParcel::EOwnershipStatus)i; 1893 return (LLParcel::EOwnershipStatus)i;
1903 } 1894 }
@@ -1927,7 +1918,7 @@ LLParcel::EOwnershipStatus ownership_string_to_status(const char* s)
1927// return LLParcel::STEA_REVERT; 1918// return LLParcel::STEA_REVERT;
1928//} 1919//}
1929 1920
1930const char* category_to_string(LLParcel::ECategory category) 1921const std::string& category_to_string(LLParcel::ECategory category)
1931{ 1922{
1932 S32 index = 0; 1923 S32 index = 0;
1933 if((category >= 0) && (category < LLParcel::C_COUNT)) 1924 if((category >= 0) && (category < LLParcel::C_COUNT))
@@ -1937,7 +1928,7 @@ const char* category_to_string(LLParcel::ECategory category)
1937 return PARCEL_CATEGORY_STRING[index]; 1928 return PARCEL_CATEGORY_STRING[index];
1938} 1929}
1939 1930
1940const char* category_to_ui_string(LLParcel::ECategory category) 1931const std::string& category_to_ui_string(LLParcel::ECategory category)
1941{ 1932{
1942 S32 index = 0; 1933 S32 index = 0;
1943 if((category >= 0) && (category < LLParcel::C_COUNT)) 1934 if((category >= 0) && (category < LLParcel::C_COUNT))
@@ -1952,11 +1943,11 @@ const char* category_to_ui_string(LLParcel::ECategory category)
1952 return PARCEL_CATEGORY_UI_STRING[index]; 1943 return PARCEL_CATEGORY_UI_STRING[index];
1953} 1944}
1954 1945
1955LLParcel::ECategory category_string_to_category(const char* s) 1946LLParcel::ECategory category_string_to_category(const std::string& s)
1956{ 1947{
1957 for(S32 i = 0; i < LLParcel::C_COUNT; ++i) 1948 for(S32 i = 0; i < LLParcel::C_COUNT; ++i)
1958 { 1949 {
1959 if(0 == strcmp(s, PARCEL_CATEGORY_STRING[i])) 1950 if(s == PARCEL_CATEGORY_STRING[i])
1960 { 1951 {
1961 return (LLParcel::ECategory)i; 1952 return (LLParcel::ECategory)i;
1962 } 1953 }
@@ -1965,11 +1956,11 @@ LLParcel::ECategory category_string_to_category(const char* s)
1965 return LLParcel::C_NONE; 1956 return LLParcel::C_NONE;
1966} 1957}
1967 1958
1968LLParcel::ECategory category_ui_string_to_category(const char* s) 1959LLParcel::ECategory category_ui_string_to_category(const std::string& s)
1969{ 1960{
1970 for(S32 i = 0; i < LLParcel::C_COUNT; ++i) 1961 for(S32 i = 0; i < LLParcel::C_COUNT; ++i)
1971 { 1962 {
1972 if(0 == strcmp(s, PARCEL_CATEGORY_UI_STRING[i])) 1963 if(s == PARCEL_CATEGORY_UI_STRING[i])
1973 { 1964 {
1974 return (LLParcel::ECategory)i; 1965 return (LLParcel::ECategory)i;
1975 } 1966 }
diff --git a/linden/indra/llinventory/llparcel.h b/linden/indra/llinventory/llparcel.h
index 9c91d94..e8f18f2 100644
--- a/linden/indra/llinventory/llparcel.h
+++ b/linden/indra/llinventory/llparcel.h
@@ -207,12 +207,12 @@ public:
207 207
208 // MANIPULATORS 208 // MANIPULATORS
209 void generateNewID() { mID.generate(); } 209 void generateNewID() { mID.generate(); }
210 void setName(const LLString& name); 210 void setName(const std::string& name);
211 void setDesc(const LLString& desc); 211 void setDesc(const std::string& desc);
212 void setMusicURL(const LLString& url); 212 void setMusicURL(const std::string& url);
213 void setMediaURL(const LLString& url); 213 void setMediaURL(const std::string& url);
214 void setMediaType(const char* type); 214 void setMediaType(const std::string& type);
215 void setMediaDesc(const char* desc); 215 void setMediaDesc(const std::string& desc);
216 void setMediaID(const LLUUID& id) { mMediaID = id; } 216 void setMediaID(const LLUUID& id) { mMediaID = id; }
217 void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; } 217 void setMediaAutoScale ( U8 flagIn ) { mMediaAutoScale = flagIn; }
218 void setMediaLoop (U8 loop) { mMediaLoop = loop; } 218 void setMediaLoop (U8 loop) { mMediaLoop = loop; }
@@ -266,7 +266,7 @@ public:
266 void setDrawDistance(F32 dist) { mDrawDistance = dist; } 266 void setDrawDistance(F32 dist) { mDrawDistance = dist; }
267 void setSalePrice(S32 price) { mSalePrice = price; } 267 void setSalePrice(S32 price) { mSalePrice = price; }
268 void setGroupID(const LLUUID& id) { mGroupID = id; } 268 void setGroupID(const LLUUID& id) { mGroupID = id; }
269 //void setGroupName(const LLString& s) { mGroupName.assign(s); } 269 //void setGroupName(const std::string& s) { mGroupName.assign(s); }
270 void setPassPrice(S32 price) { mPassPrice = price; } 270 void setPassPrice(S32 price) { mPassPrice = price; }
271 void setPassHours(F32 hours) { mPassHours = hours; } 271 void setPassHours(F32 hours) { mPassHours = hours; }
272 272
@@ -303,12 +303,12 @@ public:
303 303
304 // ACCESSORS 304 // ACCESSORS
305 const LLUUID& getID() const { return mID; } 305 const LLUUID& getID() const { return mID; }
306 const LLString& getName() const { return mName; } 306 const std::string& getName() const { return mName; }
307 const LLString& getDesc() const { return mDesc; } 307 const std::string& getDesc() const { return mDesc; }
308 const LLString& getMusicURL() const { return mMusicURL; } 308 const std::string& getMusicURL() const { return mMusicURL; }
309 const LLString& getMediaURL() const { return mMediaURL; } 309 const std::string& getMediaURL() const { return mMediaURL; }
310 const char* getMediaDesc() const { return mMediaDesc.c_str(); } 310 const std::string& getMediaDesc() const { return mMediaDesc; }
311 const char* getMediaType() const { return mMediaType.c_str(); } 311 const std::string& getMediaType() const { return mMediaType; }
312 const LLUUID& getMediaID() const { return mMediaID; } 312 const LLUUID& getMediaID() const { return mMediaID; }
313 S32 getMediaWidth() const { return mMediaWidth; } 313 S32 getMediaWidth() const { return mMediaWidth; }
314 S32 getMediaHeight() const { return mMediaHeight; } 314 S32 getMediaHeight() const { return mMediaHeight; }
@@ -351,18 +351,18 @@ public:
351 351
352 // functions to deal with ownership status. 352 // functions to deal with ownership status.
353 EOwnershipStatus getOwnershipStatus() const { return mStatus; } 353 EOwnershipStatus getOwnershipStatus() const { return mStatus; }
354 static const char* getOwnershipStatusString(EOwnershipStatus status); 354 static const std::string& getOwnershipStatusString(EOwnershipStatus status);
355 void setOwnershipStatus(EOwnershipStatus status) { mStatus = status; } 355 void setOwnershipStatus(EOwnershipStatus status) { mStatus = status; }
356 356
357 // dealing with parcel category information 357 // dealing with parcel category information
358 ECategory getCategory() const {return mCategory; } 358 ECategory getCategory() const {return mCategory; }
359 static const char* getCategoryString(ECategory category); 359 static const std::string& getCategoryString(ECategory category);
360 static const char* getCategoryUIString(ECategory category); 360 static const std::string& getCategoryUIString(ECategory category);
361 static ECategory getCategoryFromString(const char* string); 361 static ECategory getCategoryFromString(const std::string& string);
362 static ECategory getCategoryFromUIString(const char* string); 362 static ECategory getCategoryFromUIString(const std::string& string);
363 363
364 // functions for parcel action (used for logging) 364 // functions for parcel action (used for logging)
365 static const char* getActionString(EAction action); 365 static const std::string& getActionString(EAction action);
366 366
367 // dealing with sales and parcel conversion. 367 // dealing with sales and parcel conversion.
368 // 368 //
@@ -444,9 +444,9 @@ public:
444 { return (mParcelFlags & PF_FOR_SALE) ? TRUE : FALSE; } 444 { return (mParcelFlags & PF_FOR_SALE) ? TRUE : FALSE; }
445 BOOL getSoundLocal() const 445 BOOL getSoundLocal() const
446 { return (mParcelFlags & PF_SOUND_LOCAL) ? TRUE : FALSE; } 446 { return (mParcelFlags & PF_SOUND_LOCAL) ? TRUE : FALSE; }
447 BOOL getVoiceEnabled() const 447 BOOL getParcelFlagAllowVoice() const
448 { return (mParcelFlags & PF_ALLOW_VOICE_CHAT) ? TRUE : FALSE; } 448 { return (mParcelFlags & PF_ALLOW_VOICE_CHAT) ? TRUE : FALSE; }
449 BOOL getVoiceUseEstateChannel() const 449 BOOL getParcelFlagUseEstateVoiceChannel() const
450 { return (mParcelFlags & PF_USE_ESTATE_VOICE_CHAN) ? TRUE : FALSE; } 450 { return (mParcelFlags & PF_USE_ESTATE_VOICE_CHAN) ? TRUE : FALSE; }
451 BOOL getAllowPublish() const 451 BOOL getAllowPublish() const
452 { return (mParcelFlags & PF_ALLOW_PUBLISH) ? TRUE : FALSE; } 452 { return (mParcelFlags & PF_ALLOW_PUBLISH) ? TRUE : FALSE; }
@@ -514,7 +514,7 @@ public:
514 S32 getSimWidePrimCount() const { return mSimWidePrimCount; } 514 S32 getSimWidePrimCount() const { return mSimWidePrimCount; }
515 515
516 // this parcel only (not simwide) 516 // this parcel only (not simwide)
517 S32 getMaxPrimCapacity() const { return mMaxPrimCapacity; } 517 S32 getMaxPrimCapacity() const { return mMaxPrimCapacity; } // Does not include prim bonus
518 S32 getPrimCount() const { return mOwnerPrimCount + mGroupPrimCount + mOtherPrimCount + mSelectedPrimCount; } 518 S32 getPrimCount() const { return mOwnerPrimCount + mGroupPrimCount + mOtherPrimCount + mSelectedPrimCount; }
519 S32 getOwnerPrimCount() const { return mOwnerPrimCount; } 519 S32 getOwnerPrimCount() const { return mOwnerPrimCount; }
520 S32 getGroupPrimCount() const { return mGroupPrimCount; } 520 S32 getGroupPrimCount() const { return mGroupPrimCount; }
@@ -525,7 +525,7 @@ public:
525 525
526 S32 getCleanOtherTime() const { return mCleanOtherTime; } 526 S32 getCleanOtherTime() const { return mCleanOtherTime; }
527 527
528 void setMaxPrimCapacity(S32 max) { mMaxPrimCapacity = max; } 528 void setMaxPrimCapacity(S32 max) { mMaxPrimCapacity = max; } // Does not include prim bonus
529 // simwide 529 // simwide
530 void setSimWideMaxPrimCapacity(S32 current) { mSimWideMaxPrimCapacity = current; } 530 void setSimWideMaxPrimCapacity(S32 current) { mSimWideMaxPrimCapacity = current; }
531 void setSimWidePrimCount(S32 current) { mSimWidePrimCount = current; } 531 void setSimWidePrimCount(S32 current) { mSimWidePrimCount = current; }
@@ -587,12 +587,12 @@ protected:
587 F32 mDrawDistance; 587 F32 mDrawDistance;
588 U32 mParcelFlags; 588 U32 mParcelFlags;
589 S32 mSalePrice; // linden dollars 589 S32 mSalePrice; // linden dollars
590 LLString mName; 590 std::string mName;
591 LLString mDesc; 591 std::string mDesc;
592 LLString mMusicURL; 592 std::string mMusicURL;
593 LLString mMediaURL; 593 std::string mMediaURL;
594 std::string mMediaDesc; 594 std::string mMediaDesc;
595 std::string mMediaType; 595 std::string mMediaType;
596 S32 mMediaWidth; 596 S32 mMediaWidth;
597 S32 mMediaHeight; 597 S32 mMediaHeight;
598 U8 mMediaAutoScale; 598 U8 mMediaAutoScale;
@@ -604,7 +604,7 @@ protected:
604 F32 mPassHours; 604 F32 mPassHours;
605 LLVector3 mAABBMin; 605 LLVector3 mAABBMin;
606 LLVector3 mAABBMax; 606 LLVector3 mAABBMax;
607 S32 mMaxPrimCapacity; 607 S32 mMaxPrimCapacity; // Prims allowed on parcel, does not include prim bonus
608 S32 mSimWidePrimCount; 608 S32 mSimWidePrimCount;
609 S32 mSimWideMaxPrimCapacity; 609 S32 mSimWideMaxPrimCapacity;
610 //S32 mSimWidePrimCorrection; 610 //S32 mSimWidePrimCorrection;
diff --git a/linden/indra/llinventory/llpermissions.cpp b/linden/indra/llinventory/llpermissions.cpp
index afa2772..b25faa8 100644
--- a/linden/indra/llinventory/llpermissions.cpp
+++ b/linden/indra/llinventory/llpermissions.cpp
@@ -650,7 +650,7 @@ BOOL LLPermissions::importFile(LLFILE* fp)
650 650
651BOOL LLPermissions::exportFile(LLFILE* fp) const 651BOOL LLPermissions::exportFile(LLFILE* fp) const
652{ 652{
653 char uuid_str[256]; /* Flawfinder: ignore */ 653 std::string uuid_str;
654 654
655 fprintf(fp, "\tpermissions 0\n"); 655 fprintf(fp, "\tpermissions 0\n");
656 fprintf(fp, "\t{\n"); 656 fprintf(fp, "\t{\n");
@@ -662,16 +662,16 @@ BOOL LLPermissions::exportFile(LLFILE* fp) const
662 fprintf(fp, "\t\tnext_owner_mask\t%08x\n", mMaskNextOwner); 662 fprintf(fp, "\t\tnext_owner_mask\t%08x\n", mMaskNextOwner);
663 663
664 mCreator.toString(uuid_str); 664 mCreator.toString(uuid_str);
665 fprintf(fp, "\t\tcreator_id\t%s\n", uuid_str); 665 fprintf(fp, "\t\tcreator_id\t%s\n", uuid_str.c_str());
666 666
667 mOwner.toString(uuid_str); 667 mOwner.toString(uuid_str);
668 fprintf(fp, "\t\towner_id\t%s\n", uuid_str); 668 fprintf(fp, "\t\towner_id\t%s\n", uuid_str.c_str());
669 669
670 mLastOwner.toString(uuid_str); 670 mLastOwner.toString(uuid_str);
671 fprintf(fp, "\t\tlast_owner_id\t%s\n", uuid_str); 671 fprintf(fp, "\t\tlast_owner_id\t%s\n", uuid_str.c_str());
672 672
673 mGroup.toString(uuid_str); 673 mGroup.toString(uuid_str);
674 fprintf(fp, "\t\tgroup_id\t%s\n", uuid_str); 674 fprintf(fp, "\t\tgroup_id\t%s\n", uuid_str.c_str());
675 675
676 if(mIsGroupOwned) 676 if(mIsGroupOwned)
677 { 677 {
@@ -784,21 +784,21 @@ BOOL LLPermissions::importLegacyStream(std::istream& input_stream)
784 784
785BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const 785BOOL LLPermissions::exportLegacyStream(std::ostream& output_stream) const
786{ 786{
787 char uuid_str[256]; /* Flawfinder: ignore */ 787 std::string uuid_str;
788 788
789 output_stream << "\tpermissions 0\n"; 789 output_stream << "\tpermissions 0\n";
790 output_stream << "\t{\n"; 790 output_stream << "\t{\n";
791 791
792 char buffer[256]; /* Flawfinder: ignore */ 792 std::string buffer;
793 snprintf(buffer, sizeof(buffer), "\t\tbase_mask\t%08x\n", mMaskBase); /* Flawfinder: ignore */ 793 buffer = llformat( "\t\tbase_mask\t%08x\n", mMaskBase);
794 output_stream << buffer; 794 output_stream << buffer;
795 snprintf(buffer, sizeof(buffer), "\t\towner_mask\t%08x\n", mMaskOwner); /* Flawfinder: ignore */ 795 buffer = llformat( "\t\towner_mask\t%08x\n", mMaskOwner);
796 output_stream << buffer; 796 output_stream << buffer;
797 snprintf(buffer, sizeof(buffer), "\t\tgroup_mask\t%08x\n", mMaskGroup); /* Flawfinder: ignore */ 797 buffer = llformat( "\t\tgroup_mask\t%08x\n", mMaskGroup);
798 output_stream << buffer; 798 output_stream << buffer;
799 snprintf(buffer, sizeof(buffer), "\t\teveryone_mask\t%08x\n", mMaskEveryone); /* Flawfinder: ignore */ 799 buffer = llformat( "\t\teveryone_mask\t%08x\n", mMaskEveryone);
800 output_stream << buffer; 800 output_stream << buffer;
801 snprintf(buffer, sizeof(buffer), "\t\tnext_owner_mask\t%08x\n", mMaskNextOwner); /* Flawfinder: ignore */ 801 buffer = llformat( "\t\tnext_owner_mask\t%08x\n", mMaskNextOwner);
802 output_stream << buffer; 802 output_stream << buffer;
803 803
804 mCreator.toString(uuid_str); 804 mCreator.toString(uuid_str);
@@ -826,7 +826,7 @@ LLXMLNode *LLPermissions::exportFileXML() const
826{ 826{
827 LLXMLNode *ret = new LLXMLNode("permissions", FALSE); 827 LLXMLNode *ret = new LLXMLNode("permissions", FALSE);
828 828
829 ret->createChild("group_owned", TRUE)->setBoolValue(1, (const BOOL*)&mIsGroupOwned); 829 ret->createChild("group_owned", TRUE)->setBoolValue(mIsGroupOwned);
830 830
831 ret->createChild("base_mask", FALSE)->setByteValue(4, (U8*)&mMaskBase, LLXMLNode::ENCODING_HEX); 831 ret->createChild("base_mask", FALSE)->setByteValue(4, (U8*)&mMaskBase, LLXMLNode::ENCODING_HEX);
832 ret->createChild("owner_mask", FALSE)->setByteValue(4, (U8*)&mMaskOwner, LLXMLNode::ENCODING_HEX); 832 ret->createChild("owner_mask", FALSE)->setByteValue(4, (U8*)&mMaskOwner, LLXMLNode::ENCODING_HEX);
@@ -869,7 +869,11 @@ bool LLPermissions::importXML(LLXMLNode* node)
869 if (node->getChild("group_id", sub_node)) 869 if (node->getChild("group_id", sub_node))
870 success = success && (1 == sub_node->getUUIDValue(1, &mGroup)); 870 success = success && (1 == sub_node->getUUIDValue(1, &mGroup));
871 if (node->getChild("group_owned", sub_node)) 871 if (node->getChild("group_owned", sub_node))
872 success = success && (1 == sub_node->getBoolValue(1, (BOOL*)&mIsGroupOwned)); 872 {
873 BOOL tmpbool = FALSE;
874 success = success && (1 == sub_node->getBoolValue(1, &tmpbool));
875 mIsGroupOwned = (bool)tmpbool;
876 }
873 if (!success) 877 if (!success)
874 { 878 {
875 lldebugs << "LLPermissions::importXML() failed for node named '" 879 lldebugs << "LLPermissions::importXML() failed for node named '"
@@ -1114,12 +1118,12 @@ void LLAggregatePermissions::unpackMessage(LLMessageSystem* msg, const char* blo
1114 mBits[PI_TRANSFER] = bits & TWO_BITS; 1118 mBits[PI_TRANSFER] = bits & TWO_BITS;
1115} 1119}
1116 1120
1117const LLString AGGREGATE_VALUES[4] = 1121const std::string AGGREGATE_VALUES[4] =
1118 { 1122 {
1119 LLString( "Empty" ), 1123 std::string( "Empty" ),
1120 LLString( "None" ), 1124 std::string( "None" ),
1121 LLString( "Some" ), 1125 std::string( "Some" ),
1122 LLString( "All" ) 1126 std::string( "All" )
1123 }; 1127 };
1124 1128
1125std::ostream& operator<<(std::ostream &s, const LLAggregatePermissions &perm) 1129std::ostream& operator<<(std::ostream &s, const LLAggregatePermissions &perm)
diff --git a/linden/indra/llinventory/llsaleinfo.cpp b/linden/indra/llinventory/llsaleinfo.cpp
index 7aabdda..4895378 100644
--- a/linden/indra/llinventory/llsaleinfo.cpp
+++ b/linden/indra/llinventory/llsaleinfo.cpp
@@ -128,7 +128,7 @@ bool LLSaleInfo::fromLLSD(LLSD& sd, BOOL& has_perm_mask, U32& perm_mask)
128LLXMLNode *LLSaleInfo::exportFileXML() const 128LLXMLNode *LLSaleInfo::exportFileXML() const
129{ 129{
130 LLXMLNode *ret = new LLXMLNode("sale_info", FALSE); 130 LLXMLNode *ret = new LLXMLNode("sale_info", FALSE);
131 LLString type_str = lookup(mSaleType); 131 std::string type_str = ll_safe_string( lookup(mSaleType));
132 ret->createChild("type", TRUE)->setStringValue(1, &type_str); 132 ret->createChild("type", TRUE)->setStringValue(1, &type_str);
133 ret->createChild("price", TRUE)->setIntValue(1, &mSalePrice); 133 ret->createChild("price", TRUE)->setIntValue(1, &mSalePrice);
134 return ret; 134 return ret;
diff --git a/linden/indra/llinventory/lltransactionflags.cpp b/linden/indra/llinventory/lltransactionflags.cpp
index a45cdba..175cd99 100644
--- a/linden/indra/llinventory/lltransactionflags.cpp
+++ b/linden/indra/llinventory/lltransactionflags.cpp
@@ -32,9 +32,9 @@
32 32
33#include "linden_common.h" 33#include "linden_common.h"
34 34
35#include "lluuid.h"
35#include "lltransactionflags.h" 36#include "lltransactionflags.h"
36#include "lltransactiontypes.h" 37#include "lltransactiontypes.h"
37#include "lluuid.h"
38 38
39const U8 TRANSACTION_FLAGS_NONE = 0; 39const U8 TRANSACTION_FLAGS_NONE = 0;
40const U8 TRANSACTION_FLAG_SOURCE_GROUP = 1; 40const U8 TRANSACTION_FLAG_SOURCE_GROUP = 1;
@@ -69,12 +69,12 @@ BOOL is_tf_owner_group(TransactionFlags flags)
69void append_reason( 69void append_reason(
70 std::ostream& ostr, 70 std::ostream& ostr,
71 S32 transaction_type, 71 S32 transaction_type,
72 const char* description) 72 const std::string& description)
73{ 73{
74 switch( transaction_type ) 74 switch( transaction_type )
75 { 75 {
76 case TRANS_OBJECT_SALE: 76 case TRANS_OBJECT_SALE:
77 ostr << " for " << (description ? description : "<unknown>"); 77 ostr << " for " << (description.length() > 0 ? description : std::string("<unknown>"));
78 break; 78 break;
79 case TRANS_LAND_SALE: 79 case TRANS_LAND_SALE:
80 ostr << " for a parcel of land"; 80 ostr << " for a parcel of land";
@@ -95,12 +95,21 @@ std::string build_transfer_message_to_source(
95 const LLUUID& dest_id, 95 const LLUUID& dest_id,
96 const std::string& dest_name, 96 const std::string& dest_name,
97 S32 transaction_type, 97 S32 transaction_type,
98 const char* description) 98 const std::string& description)
99{ 99{
100 lldebugs << "build_transfer_message_to_source: " << amount << " " 100 lldebugs << "build_transfer_message_to_source: " << amount << " "
101 << source_id << " " << dest_id << " " << dest_name << " " 101 << source_id << " " << dest_id << " " << dest_name << " "
102 << (description?description:"(no desc)") << llendl; 102 << transaction_type << " "
103 if((0 == amount) || source_id.isNull()) return ll_safe_string(description); 103 << (description.empty() ? "(no desc)" : description)
104 << llendl;
105 if(source_id.isNull())
106 {
107 return description;
108 }
109 if((0 == amount) && description.empty())
110 {
111 return description;
112 }
104 std::ostringstream ostr; 113 std::ostringstream ostr;
105 if(dest_id.isNull()) 114 if(dest_id.isNull())
106 { 115 {
@@ -135,13 +144,20 @@ std::string build_transfer_message_to_destination(
135 const LLUUID& source_id, 144 const LLUUID& source_id,
136 const std::string& source_name, 145 const std::string& source_name,
137 S32 transaction_type, 146 S32 transaction_type,
138 const char* description) 147 const std::string& description)
139{ 148{
140 lldebugs << "build_transfer_message_to_dest: " << amount << " " 149 lldebugs << "build_transfer_message_to_dest: " << amount << " "
141 << dest_id << " " << source_id << " " << source_name << " " 150 << dest_id << " " << source_id << " " << source_name << " "
142 << (description?description:"(no desc)") << llendl; 151 << transaction_type << " " << (description.empty() ? "(no desc)" : description)
143 if(0 == amount) return std::string(); 152 << llendl;
144 if(dest_id.isNull()) return ll_safe_string(description); 153 if(0 == amount)
154 {
155 return std::string();
156 }
157 if(dest_id.isNull())
158 {
159 return description;
160 }
145 std::ostringstream ostr; 161 std::ostringstream ostr;
146 ostr << source_name << " paid you L$" << amount; 162 ostr << source_name << " paid you L$" << amount;
147 append_reason(ostr, transaction_type, description); 163 append_reason(ostr, transaction_type, description);
diff --git a/linden/indra/llinventory/lltransactionflags.h b/linden/indra/llinventory/lltransactionflags.h
index 9a27c3f..ffb17cb 100644
--- a/linden/indra/llinventory/lltransactionflags.h
+++ b/linden/indra/llinventory/lltransactionflags.h
@@ -31,6 +31,8 @@
31#ifndef LL_LLTRANSACTIONFLAGS_H 31#ifndef LL_LLTRANSACTIONFLAGS_H
32#define LL_LLTRANSACTIONFLAGS_H 32#define LL_LLTRANSACTIONFLAGS_H
33 33
34class LLUUID;
35
34typedef U8 TransactionFlags; 36typedef U8 TransactionFlags;
35 37
36// defined in common/llinventory/lltransactionflags.cpp 38// defined in common/llinventory/lltransactionflags.cpp
@@ -55,7 +57,7 @@ std::string build_transfer_message_to_source(
55 const LLUUID& dest_id, 57 const LLUUID& dest_id,
56 const std::string& dest_name, 58 const std::string& dest_name,
57 S32 transaction_type, 59 S32 transaction_type,
58 const char* description); 60 const std::string& description);
59 61
60std::string build_transfer_message_to_destination( 62std::string build_transfer_message_to_destination(
61 S32 amount, 63 S32 amount,
@@ -63,6 +65,6 @@ std::string build_transfer_message_to_destination(
63 const LLUUID& source_id, 65 const LLUUID& source_id,
64 const std::string& source_name, 66 const std::string& source_name,
65 S32 transaction_type, 67 S32 transaction_type,
66 const char* description); 68 const std::string& description);
67 69
68#endif // LL_LLTRANSACTIONFLAGS_H 70#endif // LL_LLTRANSACTIONFLAGS_H